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 


Program that attach to 3rd party process and set breakpoint

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

Joined: 14 Sep 2023
Posts: 8

PostPosted: Mon Sep 18, 2023 3:56 pm    Post subject: Program that attach to 3rd party process and set breakpoint Reply with quote

Hey


There is process A, my target. I am coding process B.
B wants to intercept a known instruction of process A, for which I know the address.
I want to read a specific register used by the instruction.

So I want to accomplish a task that CE is able to do already, yes.

What is the best way to accomplish that ?
I guess I should use c lang, but I don't know the libs, the implications, to estimate globally the difficulty of that task that seems trivial.
Lets say I want to use Hardware breakpoint since I just need a single one, alongside VEH debugging ? Just to have a general direction.
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4711

PostPosted: Mon Sep 18, 2023 6:56 pm    Post subject: Reply with quote

So basically, how to make a debugger from scratch? That involves far more than what can be explained in a single forum post.

Microsoft's documentation:
https://learn.microsoft.com/en-us/windows/win32/debug/basic-debugging

CE's source:
https://github.com/cheat-engine/cheat-engine

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
caval
How do I cheat?
Reputation: 0

Joined: 14 Sep 2023
Posts: 8

PostPosted: Tue Sep 19, 2023 7:37 am    Post subject: Reply with quote

Mmh maybe I don't have to go so far.


I wonder if there is a way to have a script which could interact with my custom program B.
program B would call that script, which would attach a debugger to program A then look for value in the breakpoint it set at <target address instruction>, and then detach. Thus, returning back the values found to program B.

I see that as a pretty low level language script, called by probably my higher level language program B.
I guess this script would have to be executed by CE, and since I don't need CE UI I'd require some sort of headless CE
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4711

PostPosted: Tue Sep 19, 2023 10:39 am    Post subject: Reply with quote

The closest thing to a headless CE is making a trainer with most of CE packed into it. The trainer doesn't have to have a UI.
Execute the trainer from program B and communicate with it via some form of IPC (e.g. allocateSharedMemoryLocal; see sharedMemory.pas)

A code injection would be far simpler- no need to use CE. There's plenty of tutorials on this for a variety of programming languages.

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
caval
How do I cheat?
Reputation: 0

Joined: 14 Sep 2023
Posts: 8

PostPosted: Tue Sep 19, 2023 1:44 pm    Post subject: Reply with quote

Ok I will look into code injection. I probably need to inject the code near the target instruction address, in order to leak the register value to some shared memory or other IPC.

Thanks for the tips
Back to top
View user's profile Send private message
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