Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Hide ASM code from memory?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
mdockz
Cheater
Reputation: 0

Joined: 24 Feb 2013
Posts: 41

PostPosted: Tue Jun 13, 2017 10:16 pm    Post subject: Hide ASM code from memory? Reply with quote

I am not really sure how to word this, but here it goes...

So some people may be aware that any memory hack can be found.

IE someone makes a trainer, you can easily find which memory address is being changed and what it is changed to.

I want to write my script so that it is nearly impossible to simply search for it in memory.

Is there anyway to obfuscate my code at all? Or any ways to keep it as best hidden as possible?

Thanks, sorry for the confusing question Smile
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Wed Jun 14, 2017 1:29 am    Post subject: Reply with quote

If your trainer is just writing to the targets memory, no, there is pretty much nothing you can do. The trainer is vulnerable to several methods of being 'attacked' by rippers.

- The trainer can be hooked onto and monitor memory edits. (WriteProcessMemory or Nt/Zw versions etc can be hooked.)
- The trainer can be decompiled/unpacked/deobfuscated etc. depending on how it's coded to get needed info.
- If you use Cheat Engines trainer maker, your entire cheat table can be decompiled and pulled from the trainer.
- If you use managed languages or interpreted languages like C#/Java/etc. they can be easily decompiled.

For any type of protection, you are going to want to move to DLL injection and do everything within your DLL. If you do code caves in your trainer, jump into your DLLs memory space, do the cave inside the DLL instead, and jump back like normal. With that, you can pack/obfuscate/etc. the DLL to prevent the cave code from being easily visible or ripped. This also means the only changes to the memory of the target you make are jumps into your own DLL. While this still gives away where people should look to make similar cheats, you are now protecting your cave code from being easily understood.

Just keep in mind you are fighting a losing battle and that you can only deter the newbies from things and not more invested people that understand how to unpack/deobfuscate/etc. things. Your work also becomes a more interesting target if you are charging money for it so expect people to attempt to undo anything you make to try and protect it.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
mdockz
Cheater
Reputation: 0

Joined: 24 Feb 2013
Posts: 41

PostPosted: Wed Jun 14, 2017 8:40 am    Post subject: Reply with quote

Many thanks for your response.

This information has helped me alot, I was originally planning a C++ win application, but i think i will go with a dll injection as you suggested.

Smile
Back to top
View user's profile Send private message
mdockz
Cheater
Reputation: 0

Joined: 24 Feb 2013
Posts: 41

PostPosted: Thu Jun 15, 2017 4:46 pm    Post subject: Reply with quote

so i made a dll and injected into my process, it seems that i can still see the jumps allocated in memory, even though its writtin in my dll..

how can i make it jump into the memory space of the dll instead of the process?
Back to top
View user's profile Send private message
STN
I post too much
Reputation: 43

Joined: 09 Nov 2005
Posts: 2676

PostPosted: Thu Jun 15, 2017 10:59 pm    Post subject: Reply with quote

Your dll is in game's memory space so dll or process both have same memory.
_________________
Cheat Requests/Tables- Fearless Cheat Engine
https://fearlessrevolution.com
Back to top
View user's profile Send private message
mdockz
Cheater
Reputation: 0

Joined: 24 Feb 2013
Posts: 41

PostPosted: Fri Jun 16, 2017 12:39 am    Post subject: Reply with quote

well i was hoping it would be possible to write the cheat so that it will not be visible in the memory of the game.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 472

Joined: 09 May 2003
Posts: 25880
Location: The netherlands

PostPosted: Fri Jun 16, 2017 8:20 am    Post subject: Reply with quote

instead of jmp use breakpoints or make the memory unexecutable and capture the exception. then change eip

there are other methods as well

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
mdockz
Cheater
Reputation: 0

Joined: 24 Feb 2013
Posts: 41

PostPosted: Fri Jun 16, 2017 10:48 am    Post subject: Reply with quote

thanks thats really interesting Dark Byte, is this somewhat similar to the stealthedit plugin?

hmmm but i wouldnt be able to edit the EIP register without a debugger right?

I think i am leaning more towards obfuscation of the code, random jumps and meaningless code and loops. to throw people off.

The way i see it, even if it is a losing battle, for what i need it is okay because if they are knowledgeable enough to decipher the obfuscated code, then kudos to them. I just dont want it to be right there in front of them ready and gift wrapped lol if u know what i mean.


could you possibly share some of these other methods as well? I am not too savvy with this stuff, but I can learn fast, so it would be nice to have more than one thing to look into to see what best fits my needs and capabilities Very Happy

Thanks.
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Fri Jun 16, 2017 12:19 pm    Post subject: Reply with quote

mdockz wrote:
so i made a dll and injected into my process, it seems that i can still see the jumps allocated in memory, even though its writtin in my dll..

how can i make it jump into the memory space of the dll instead of the process?


I mentioned in my post above this was going to happen. The jumps from the games memory to your DLL will be visible to others still. You can do the breakpoint method as DB explained but it is still going to be easily traced back to your DLL to determine where the breakpoint was placed and where it's being handled.

Like I said before though, if you protect the code in your DLL you are building a better line of defense from having your stuff ripped and then the only thing people will really be able to see is where you are making edits, but not the full edits / caves that are within your DLL.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
mdockz
Cheater
Reputation: 0

Joined: 24 Feb 2013
Posts: 41

PostPosted: Fri Jun 16, 2017 1:13 pm    Post subject: Reply with quote

hey sorry what do you mean "protect" the code in the dll?

i wrote my code in the dll but i guess its not protected as i can still see it within the process memory..

so how do i go about making the cave in the dll so it is not visible?
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Fri Jun 16, 2017 1:28 pm    Post subject: Reply with quote

It is going to be visible regardless of what you do, but you can use protections to obfuscate the code flow so it's not easily readable / ripped by newbies. Things like how VMProtect/Themida and similar do to protect code via virtual machines and so on would be your best bet to deter most from even bothering.
_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites