View previous topic :: View next topic |
Author |
Message |
jamils1992 Newbie cheater Reputation: 0
Joined: 21 Aug 2015 Posts: 10
|
Posted: Sun May 20, 2018 4:43 am Post subject: Hardware breakpoint |
|
|
I want to make a dll inject it into the game and use hardware breakpoint to change RIP at that address to my new code .
I was wondering do i have to suspend all of the threads in game and get their context and compare RIP to the address i want to change the RIP at or is it possible to trigger the breakpoint at a certain address ,Knowing i can't change game bytes because of anti-cheats.
Game i want to do this for is Assassin Creed Unity .
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 457
Joined: 09 May 2003 Posts: 25262 Location: The netherlands
|
Posted: Sun May 20, 2018 5:16 am Post subject: |
|
|
get an exception callback (e.g hook the exceptionhandler in windows dlls or use a vectoredexceptionhandler
then set breakpoints using setthreadcontext and when the breakpoint triggers an exception change rip in the context struct and resume the exception as handled
do check that the rip is what it should be as your exception handler will also get exceptions not caused by you
_________________
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 |
|
|
jamils1992 Newbie cheater Reputation: 0
Joined: 21 Aug 2015 Posts: 10
|
Posted: Sun May 27, 2018 12:55 pm Post subject: |
|
|
Dark Byte wrote: | get an exception callback (e.g hook the exceptionhandler in windows dlls or use a vectoredexceptionhandler
then set breakpoints using setthreadcontext and when the breakpoint triggers an exception change rip in the context struct and resume the exception as handled
do check that the rip is what it should be as your exception handler will also get exceptions not caused by you |
For some reason when i get dr7 on my testing program its set to 0xcccccccccccccccc and most registers are set to the same thing .
I can set the thread context without any issue and the exception handler is working properly , but getting the thread context doesn't seem to be working even though it returns 1 , any idea ? .
I checked with CE and its displaying the registers and my break point fine .
Description: |
|
Filesize: |
7.21 KB |
Viewed: |
3429 Time(s) |
|
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 457
Joined: 09 May 2003 Posts: 25262 Location: The netherlands
|
Posted: Sun May 27, 2018 1:39 pm Post subject: |
|
|
that means it's not returning anything and you've compiled your program in debugmode. visual studio initializes memory to 0xcc in debugmode
Also, what is returning 1 ? In your exception handler you do not call get/setthreadcontext, you access the exception record provided by the parameter your exception handler receives
_________________
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 |
|
|
jamils1992 Newbie cheater Reputation: 0
Joined: 21 Aug 2015 Posts: 10
|
Posted: Sun May 27, 2018 1:44 pm Post subject: |
|
|
Dark Byte wrote: | that means it's not returning anything and you've compiled your program in debugmode. visual studio initializes memory to 0xcc in debugmode
Also, what is returning 1 ? In your exception handler you do not call get/setthreadcontext, you access the exception record provided by the parameter your exception handler receives |
I meant GetThreadContext returns 1
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 457
Joined: 09 May 2003 Posts: 25262 Location: The netherlands
|
Posted: Sun May 27, 2018 1:51 pm Post subject: |
|
|
Try zeroing out the context object before passing it to GetThreadContext
And do you set the correct fields of the context record before calling it? (e.g ContextFlags=CONTEXT_DEBUG_REGISTERS)
(you need to access ExceptionInfo->ContextRecord instead of using getthreadcontext in your exception handler)
_________________
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 |
|
|
jamils1992 Newbie cheater Reputation: 0
Joined: 21 Aug 2015 Posts: 10
|
Posted: Sun May 27, 2018 2:46 pm Post subject: |
|
|
Dark Byte wrote: | Try zeroing out the context object before passing it to GetThreadContext
And do you set the correct fields of the context record before calling it? (e.g ContextFlags=CONTEXT_DEBUG_REGISTERS)
(you need to access ExceptionInfo->ContextRecord instead of using getthreadcontext in your exception handler) |
I did set the ContextFlags before SetThreadContext but forgot to do it before GetThreadContext and that was causing the bug .
|
|
Back to top |
|
|
|