|
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
Viloresi Expert Cheater Reputation: 0
Joined: 02 Feb 2017 Posts: 149
|
Posted: Tue Aug 06, 2019 2:35 pm Post subject: Cheat engine dbk |
|
|
So I'm trying to make a driver that does these things (I'm not an expert and I lack a lot of knowledge tbh) :
1)Sets a breakpoint on an address
2)Change the EAX register on that address to 1
3) continues execution
I would like to do this through a driver like cheat engine does with dbk.
I've already taken a look at the source code, but I quite didn't understand how it works because I've seen in the dbk source code it uses this function:
__writedr(0,value);
to write in db registers but I don't understand what's the first parameter and also after the breakpoint is set where is the code that handles the breakpoint? is there an exception raised or some other things I can't see in the source??,hmm anyway if someone could provide a code snippet might be better but everything is accepted, thank you for reading.
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25296 Location: The netherlands
|
Posted: Tue Aug 06, 2019 3:21 pm Post subject: |
|
|
you're imeadiately delving into the deep end, but ok
:
there are 6 debug registers
0, 1,2,3,6 and 7
set dr0 to the address
set dr7 the configuration to break. (execute,read/write, write only, and size applicable)
but the important part is the exception or interrupt handler (good luck with pathguard in 64 bit) in there you decide on passing the exception to the target or handling it yourself
https://software.intel.com/en-us/download/intel-64-and-ia-32-architectures-sdm-combined-volumes-1-2a-2b-2c-2d-3a-3b-3c-3d-and-4
i recommend reading and understanding everything, but especially volume 3 and the chapters about interrupts (6) and debugging (17) is important
_________________
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 |
|
|
Viloresi Expert Cheater Reputation: 0
Joined: 02 Feb 2017 Posts: 149
|
Posted: Tue Aug 06, 2019 3:52 pm Post subject: |
|
|
Dark Byte wrote: | you're imeadiately delving into the deep end, but ok
:
there are 6 debug registers
0, 1,2,3,6 and 7
set dr0 to the address
set dr7 the configuration to break. (execute,read/write, write only, and size applicable)
but the important part is the exception or interrupt handler (good luck with pathguard in 64 bit) in there you decide on passing the exception to the target or handling it yourself
https://software.intel.com/en-us/download/intel-64-and-ia-32-architectures-sdm-combined-volumes-1-2a-2b-2c-2d-3a-3b-3c-3d-and-4
i recommend reading and understanding everything, but especially volume 3 and the chapters about interrupts (6) and debugging (17) is important |
thank you, wow that's 4922 pages , thinking to study that right now for me it's probably not a good choice bcs I'll have a math exam in about 1 month. I guess I'll look into this when I'll have more freetime
anyway I was trying to do this in a c++ program (not with a driver) by setting a VEH hook to the target address, by changing as you said dr0 by writing inside the address and writing 0x401 in dr7 (which if I understood correctly enables the dr0), but unfortunately it doesn't work and in some programs it crashes...
I think I'll open a new thread about it since it's a different argument
|
|
Back to top |
|
|
|
|
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
|
|