 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
Caliber Expert Cheater
Reputation: 2
Joined: 20 Aug 2007 Posts: 102
|
Posted: Mon Aug 20, 2007 10:33 pm Post subject: ATTN DarkByte: Crash on Memory Breakpoint in newer games- |
|
|
DarkByte or anyone who may know.
there seems to be a trend in newer games that allow you to attach a debugger to the game but when you attempt to set a breakpoint on a memory address, the game then crashes.
for instance, i just downloaded the bioshock demo. lets pick bullets, for instance.
you can attach Cheat Engine to the game (or OllyDbg, for that matter) and then do you searches until you narrow down the bullets.
HOWEVER, once you select that address and then enable "Find out what accesses this address" the game will immediately shut down/crash, without error report or anything. This will also occur with TSearch and with OllyDbg during the same moment where you try to breakpoint the memory address.
Is there a way around this sort of thing? I have noticed it with Halo 2 when I trained that game, although in that game you had a small amount of time before the game crashed. Also, with ShadowRun this occurs (instant shut down of game). Bioshock is not a ONLY VISTA title like the other two, but I see this trend increasing in games. Your CheatEngine program will be less useful if these anti-debugging techniques continue and we don't find a way around them. I have tried several plug-ins with OllyDbg and also selected various options in CE to try to hide the debugger. I don't think hiding the debugger is the answer, since I think it is actually detecting the actual breakpoint itself.
At any rate, this should be a very useful and lively discussion and hopefully will come to some useful information. Obviously there must be some way around all this since the "crackers" of games who produce the No-DVD versions of many games many times are able to be breakpointed and debugged without problems. So there must be a way. However, my searches have revealed nothing and so I hope to gain some info here.
General Settings:
- [X]Show undo button
- [X]Show advanced options
- [X]Update the list of found addresses even after scanning
- [X]Center Cheat Engine when bringing to front
- [X]Hide some/all windows instead of trying to bring ce to front
- [X]Show values as if they are signed
- [ ]Show and work wirth binaries as if the arer decimals
- [ ]Simple copy/paste
Scan Settings:
- [ ]Fast scan on by default
- [ ]Enable Hyperscan when possible
- [ ]Don't scan memory that is protected with the No Cache option
- [ ]Keep low memory usage when doing an "Unknown Initial Value scan" with Hyper Scan
- [X]MEM_PRIVATE
- [X]MEM_IMAGE
- [ ]MEM_MAPPED
Code Finder:
- [X]Use Debug Registers
- [ ]Memory Access Exceptions
- [X]Try to prevent detection of debugger
- [ ]Handle breakpoints not caused by CE
Assembler:
- [X]Show disassembler
- [X]Show debugger options
- [X]Replace incomplete opcodes with nops
- [X]Ask for replace woth nop
- [X]Try to prevent detection of the debugger
Extra:
- [ ]Query memory region routines
- [X]Read/Write Process Memory
- [ ]Undo changes to CE
- [ ]Enable use of the Process Watcher
- [ ]Use kernelmode debugger options when possible
- [ ]Stealth mode (Usermode)
- [ ]Stealth mode (Kernelmode)
Thanks,
Cal |
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 475
Joined: 09 May 2003 Posts: 25980 Location: The netherlands
|
Posted: Mon Aug 20, 2007 10:43 pm Post subject: |
|
|
try ticking " [ ]Use kernelmode debugger options when possible "
and then use find out what accesses or writes
do not attach! (and make sure you're not in vista) _________________
Tools give you results. Knowledge gives you control.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
Caliber Expert Cheater
Reputation: 2
Joined: 20 Aug 2007 Posts: 102
|
Posted: Mon Aug 20, 2007 11:02 pm Post subject: |
|
|
| Dark Byte wrote: | try ticking " [ ]Use kernelmode debugger options when possible "
and then use find out what accesses or writes
do not attach! (and make sure you're not in vista) |
WOW thanks for the fast response. sorry to sound newbish but how do i search memory address XXXXXX in a certain game (let's say BIOSHOCK) without actually attaching to it. I don't quite understand what you mean by:
then use find out what attaches or writes , do not attach!
i have to attach to the BIOSHOCK game to make it search that game's memory, right?
Sorry if I don't get what you are saying. I am VERY knowledgeable of hacking games, training games, breakpointing, etc. but I don't understand your suggestion!
Best,
Cal |
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 475
Joined: 09 May 2003 Posts: 25980 Location: The netherlands
|
Posted: Mon Aug 20, 2007 11:04 pm Post subject: |
|
|
You can just open a process. Doubleclick. (so don't clikc on the attach to process button)
When you have enabled the kernel debug option, and choose the option to find out what writes or accesses a certain address it will not popup a question if you want to attach, but immeadiatly start the debug option
so, lets say you found the address of health, then do a "find out what writes"to find the code that writes to it and go from there. Of course, single stepping through the code isn't possible yet, but it's a start _________________
Tools give you results. Knowledge gives you control.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
Caliber Expert Cheater
Reputation: 2
Joined: 20 Aug 2007 Posts: 102
|
Posted: Tue Aug 21, 2007 6:08 am Post subject: |
|
|
| Dark Byte wrote: | You can just open a process. Doubleclick. (so don't clikc on the attach to process button)
When you have enabled the kernel debug option, and choose the option to find out what writes or accesses a certain address it will not popup a question if you want to attach, but immeadiatly start the debug option
so, lets say you found the address of health, then do a "find out what writes"to find the code that writes to it and go from there. Of course, single stepping through the code isn't possible yet, but it's a start |
OK your technique described above allowed me to breakpoint the memory and see what code was calling it. Thank you very much for this wonderful tool and your prompt replies.
However, you are correct if you try to breakpoint the actual code address then the crash occurs again. So I have to find a way around that now. hehehe
Do you know why this is occurring and are you taking steps in the next version to get around this? If you know any information, it would help in getting a solution to this and perhaps be able to breakpoint actual code lines next.
Interestingly, OllyDbg will allow you to attach to the program, but once you breakpoint code, it crashes just like C.E. will if you try to breakpoint code.
THanks again! At least now I can see what is modifying the code areas and try to determine what is going on. Before I had NOTHING!
best,
Cal |
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 475
Joined: 09 May 2003 Posts: 25980 Location: The netherlands
|
Posted: Tue Aug 21, 2007 6:29 am Post subject: |
|
|
if you're able to edit the memory you can make use of code injection. Inject a script and there save the important registers to a buffer of some sort you can read out later with the mem viewer
and about why: It could be both olly and ce have been configured to use int3 breakpoints instead of hardware breakpoints. That combined with a integrity check on the memory can cause such a problem.
I do doubt it's that since the way the game instantly crashes (just like an unhandled exception occured)
It could be that the debug api is being hooked.
Also, one question, when you attach ce, does ce freeze for several seconds and the game crashes, or does ce immediately continue and the game crashes (a tiny bit) later. _________________
Tools give you results. Knowledge gives you control.
Like my help? Join me on Patreon so i can keep helping
Last edited by Dark Byte on Tue Aug 21, 2007 6:39 am; edited 2 times in total |
|
| Back to top |
|
 |
DABhand Cheater
Reputation: 0
Joined: 16 Aug 2007 Posts: 32
|
Posted: Tue Aug 21, 2007 6:29 am Post subject: |
|
|
I thought I put a post here for my old buddy Cal, welcoming him
Im interested DB will you be allowing a bit more support for 64bit kernels with future releases Save me having to use Sice all the time and losing me net conn O_o |
|
| Back to top |
|
 |
Caliber Expert Cheater
Reputation: 2
Joined: 20 Aug 2007 Posts: 102
|
Posted: Tue Aug 21, 2007 6:09 pm Post subject: |
|
|
| Dark Byte wrote: | if you're able to edit the memory you can make use of code injection. Inject a script and there save the important registers to a buffer of some sort you can read out later with the mem viewer
and about why: It could be both olly and ce have been configured to use int3 breakpoints instead of hardware breakpoints. That combined with a integrity check on the memory can cause such a problem.
I do doubt it's that since the way the game instantly crashes (just like an unhandled exception occured)
It could be that the debug api is being hooked.
Also, one question, when you attach ce, does ce freeze for several seconds and the game crashes, or does ce immediately continue and the game crashes (a tiny bit) later. |
here's what occurs with Bioshock Demo and Retail.
When you select:
Attach to Process
from the Process List, CE attaches to the Bioshock.exe without problems and you can perform your searches with no problems, etc. However, once you narrow it down to an address and then select:
Find out what accesses this address
or
Find out what writes to this address
then the game crashes/closes down immediately, and I mean IMMEDIATELY. CE is just left there open with the little popup window for displaying which code accesses that address but it's a blank window since the game has already shut down.
For Halo2, I remember that it didn't shut down immediately. You had like 10 seconds to a minute before it crashed and it DID display some code areas before crashing. For Shadowrun, I think it crashed immediately like above for Bioshock.
Interestingly, OllyDbg is similar. You can attach Olly to the game with no problems but ANY kind of attempted breakpoint (memory, code, conditional, etc.) closes/crashes the game instantly.
I hope this helps and I am curious what you think of this and also if there is a workaround to allow breakpoints in the works or currently available (other than having to manually inject code, which i have done and works but is a major time and aggravating process). Thanks again for your wonderful product!
best,
Cal
thanks for the info. i will test to see if the situation you mentioned (CE freezes) occurs and repost here when i get a second. I don't mind helping test things for you when I am able.
by the way, we think alike! i was able to finish my task by doing just as you described, i had to re-route the flow of the code to an injected .dll and test the registers that way. it's funny that you mentioned this method since this is what i did! however, doing it this was frustrating and WAY more involved and took time rather than simple breakpointing (or with olly which allows conditional breakpoints) that is available to most games. at any rate, thanks again for the replies and for your wonderful application, Dark Byte. Sorry I did not get back in here until now, since I was working on the project and also working at the office.
Nice to see you here, too DabHand!
best,
Cal
UPDATED:
| Dark Byte wrote: |
Also, one question, when you attach ce, does ce freeze for several seconds and the game crashes, or does ce immediately continue and the game crashes (a tiny bit) later. |
here's what occurs with Bioshock Demo and Retail.
When you select:
Attach to Process
from the Process List, CE attaches to the Bioshock.exe without problems and you can perform your searches with no problems, etc. However, once you narrow it down to an address and then select:
Find out what accesses this address
or
Find out what writes to this address
then the game crashes/closes down immediately, and I mean IMMEDIATELY. CE is just left there open with the little popup window for displaying which code accesses that address but it's a blank window since the game has already shut down.
For Halo2, I remember that it didn't shut down immediately. You had like 10 seconds to a minute before it crashed and it DID display some code areas before crashing. For Shadowrun, I think it crashed immediately like above for Bioshock.
Interestingly, OllyDbg is similar. You can attach Olly to the game with no problems but ANY kind of attempted breakpoint (memory, code, conditional, etc.) closes/crashes the game instantly.
I hope this helps and I am curious what you think of this and also if there is a workaround to allow breakpoints in the works or currently available (other than having to manually inject code, which i have done and works but is a major time and aggravating process). Thanks again for your wonderful product!
best,
Cal |
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 475
Joined: 09 May 2003 Posts: 25980 Location: The netherlands
|
Posted: Wed Aug 22, 2007 3:48 pm Post subject: |
|
|
what happens if you clicmk the 'attach to process' button intread of open ?
does it also crash then ?
What you're describing could be the eprocess's debugport gets rewritten to 0 so debug exceptions raises a exception in the game itself instead of the debugger. (can explain why it works a few seconds and then crashes if the interval that the debugger is removed is several seconds)
And unhandled exceptions generally tend to terminate the whole program
If that is the case no idea how to bypass it with the normal windows api except removing the code that detaches the debugger from the process.
I could probably improve the kernel debugger to add more functionality. (e.g on a debug exception redirecting to a injected piece of code where it goes into a sleep till it receives a event, and a single step sets the single step bit, lets it execute one instruction, which then causes a debug exception and again to that loop etc...) _________________
Tools give you results. Knowledge gives you control.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
Caliber Expert Cheater
Reputation: 2
Joined: 20 Aug 2007 Posts: 102
|
Posted: Wed Aug 22, 2007 5:21 pm Post subject: |
|
|
| Dark Byte wrote: | what happens if you clicmk the 'attach to process' button intread of open ?
does it also crash then ? |
if you are talking about with Olly, then I always attach to process when debugging games since they generally will not open due to several protections.
Olly lets me attach and so does CE (using the Attach to Process button in the Process List window of CE) but they both crash when you breakpoint. When using Open in Olly instead of attaching, the game will often not open or will report that it detects debugger or whatever.
I like your idea of improving the kernal debugger options since this type of protection isn't going to go away and will likely be more common, especially since we are moving further into the VISTA realm as time goes by. Thanks for the discussion and any work in the area if you need someone to help or test let me know.
best,
Cal |
|
| 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
|
|