Digging for memory.

Started by
3 comments, last by Westeria 19 years, 4 months ago
Ok, I have my game up and running, but I'm concerned for its security features. So I'm haxxors it. [razz] So far, I've managed to get its HWND number, and consquently drew all sorts of funny things on it. But how would I get the pointer to say... the health bar's value? (Working in C) Edit: Its not in a control, the health is drawn using DrawText, so its not as simple as using SPY++ to find it's HWND.
Advertisement
Run it through a debugger? Get a disassembler? Try and find the value in the program's memory?

If it uses DrawText - find the addresses where DrawText is called in your disassembler (should be easy because it'll probably be in the import table) and then use that address in your debugger to see when it gets called. Then check against the value your program is outputting in each call and find which is the correct call. Either go up the call stack or use your disassembler to find what functions call what. Find where the value is grabbed from memory. Then do whatever you like with the memory address (like modify it to give you extra health?).

Really, doing anything about this kind of thing is unnecessary and/or pointless. Unless you have an authoritve client in an online game (which for health, is a silly idea). It sounds like you don't. Even then, there are many ways of hacking it - someone determined enough can break it.

I wouldn't worry yourself about it.

Using SPY++ hardly counts as haxx0ring. And unless you don't use windows controls, I know of no sensible way of avoiding it.
Quote:Original post by Andrew Russell
Run it through a debugger? Get a disassembler? Try and find the value in the program's memory?


Any reccommendations for which programs?

In addition, part of the reason I'm doing this is because its of interest to me. It might be pointless, might not be, but its educational none-the-less.
Oh, I've also got to ask...

Say I use a debugger and find the address of the Healthbar.

Wouldn't that address change everytime the user exited, and got back into it?

I believe they call it "Hardcoded offsets".

How would I code something that would work everytime?
Ok, I've attached the Visual Studio 6's debugger onto my programs process.

Than I recorded the value of the health, and paused the debug.. how do I search now for that value?

This topic is closed to new replies.

Advertisement