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 


How do you protect the allocated memory?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
Fakizun
How do I cheat?
Reputation: 0

Joined: 04 Sep 2017
Posts: 2

PostPosted: Mon Sep 04, 2017 3:03 am    Post subject: How do you protect the allocated memory? Reply with quote

1. I wrote a simple aobscan code by the template Cool
2. Allocated 1000h memory for the code Surprised
3. The code works but occasionally crashes Crying or Very sad
4. Found out it tries to access invalid pointers Shocked
5. It shouldn't happen so I had no idea where those pointers come from Question
6. Accidentally found out sometimes the upper part of my codes are getting allocated Exclamation
7. Some windows stuff called OLEACC.dll is violating my safe space and first few lines of my codes were being overwritten by some filthy codes Embarassed

Tried putting a bunch of nops and int3 to build a great wall but it wasn't helpful. I don't think no matter how much pointer verification I put in it will be enough against the code itself being overwritten. Can I allocate my code in a safer region? I have no idea how the memory allocation works but memories overlapping doesn't sound good at all, especially with the windows dlls.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 342

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

PostPosted: Mon Sep 04, 2017 3:28 am    Post subject: Reply with quote

You can use alloc's 3th parameter to specify a memory region you wish to allocate at


but, does it crash when you have disabled it (at least once) or also when enabled (and never disabled)
did you have to rename cheat engine to get it to run ?

Most likely though your code injection part is called by other routines as well

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Back to top
View user's profile Send private message MSN Messenger
Fakizun
How do I cheat?
Reputation: 0

Joined: 04 Sep 2017
Posts: 2

PostPosted: Mon Sep 04, 2017 4:10 am    Post subject: Reply with quote

Dark Byte wrote:
You can use alloc's 3th parameter to specify a memory region you wish to allocate at


but, does it crash when you have disabled it (at least once) or also when enabled (and never disabled)
did you have to rename cheat engine to get it to run ?

Most likely though your code injection part is called by other routines as well


Thank you for the input, I will try it. I actually found a reproducible crash. The crash only happens when I enable it and disabling it stops crashing. And I don't remember renaming anything. From what I see from the esp stack is that: The injected part is called properly from the expected routine, but the first few lines are corrupted so the register numbers get messed up (eg. eax becomes null) and it ends up crashing into the invalid pointers. I can try avoiding the crash by using ebx instead of eax but the worrying part is that because I am not the only one accessing this region, I might end up messing up something like an OS dll process.
Back to top
View user's profile Send private message
OldCheatEngineUser
Whateven rank
Reputation: 4

Joined: 01 Feb 2016
Posts: 585

PostPosted: Mon Sep 04, 2017 7:30 am    Post subject: Reply with quote

make sure there is no other module is accessed, and no more than one thread is executing the instructions.

i ended up with something similar, and all what i did is:

tried to see what accesses the address and hook that instruction, do modification and jump return.

_________________
About Me;
I Use CE Since Version 1.X, And Still Learning How To Use It Well!
patched cheat engine tutorials
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine 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