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 


(HELP) Way to attach and inject before process closes itself

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

Joined: 11 Apr 2018
Posts: 1

PostPosted: Wed Apr 11, 2018 11:40 pm    Post subject: (HELP) Way to attach and inject before process closes itself Reply with quote

Hello, new here and looking for some help.

1. Process checks to see if another copy is already running and closes itself immediately if it detects one.

2. using the following lua script I was able to do what I wanted (sort of), if i set the CT process priority (in windows taskmanager) to realtime (i assume it allows CT to make the changes before process closes itself) and renamed the exe so i could get CT to attach to the renamed one (rather than already opened copy)

Code:
 <LuaScript>

strings_add(getAutoAttachList(),"Process_renamed.exe")

function onOpenProcess()
autoAssemble([[aobscan(bla, XX XX XX 00 00 00 XX XX)
bla:
db 90 90 90 90 90 90]])
end
</LuaScript>


Does anyone have a more elegant solution to my issue here?

What I want to do:
1. Have cheat engine attach itself to only newly spawned processes (not already opened ones with the same name.exe)

2. Make sure cheat engine is able to "outrace" the process from closing itself.

Hex editing the binary was not an option for this scenario.

Any help to a newbie is appreciated in advance.
Back to top
View user's profile Send private message
FreeER
Grandmaster Cheater Supreme
Reputation: 53

Joined: 09 Aug 2013
Posts: 1091

PostPosted: Thu Apr 12, 2018 7:09 am    Post subject: Reply with quote

1. (you said it's not an option but) patch the file to not do the check(s)
2. start the process from inside CE using the windows debugger which will break on the entry point of the program, or another debugger with the same functionality

I don't know of anything else "elegant", though you might be able to adjust a timer in CE for how quickly it checks for new processes or use your own timer and ID checking to do it more often to avoid having to change it to realtime they really aren't any more elegant of an approach just slight improvements.

_________________
https://github.com/FreeER/ has a few CE related repos
Back to top
View user's profile Send private message
broly7
Advanced Cheater
Reputation: 0

Joined: 13 Aug 2015
Posts: 60

PostPosted: Thu Apr 12, 2018 12:27 pm    Post subject: Reply with quote

With processhacker, delete any MUTEX handle opened by the 1st process.
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