View previous topic :: View next topic |
Author |
Message |
ColdFusion_ How do I cheat?
Reputation: 0
Joined: 12 Sep 2010 Posts: 2
|
Posted: Sun Sep 12, 2010 12:14 pm Post subject: C++ Memory changing problems |
|
|
I am trying to edit specific addresses on a target program by injecting a dll in to the code so that from there i can just use pointers.
The problem is that when i write to the address it will crash. Reading seems to work fine and gives no problems. Now the strange thing is that when i edit the same address with a memory editing program it works perfectly fine
Code: |
unsigned char *Addy1 = (unsigned char *)dllbase + OFFSET + 0;
unsigned char *Addy2 = (unsigned char *)dllbase + OFFSET + 1;
unsigned char *Addy3 = (unsigned char *)dllbase + OFFSET + 2;
*Addy1 = 144;
*Addy2 = 144;
*Addy3 = 144;
|
|
|
Back to top |
|
 |
justa_dude Grandmaster Cheater
Reputation: 23
Joined: 29 Jun 2010 Posts: 891
|
Posted: Sun Sep 12, 2010 12:17 pm Post subject: |
|
|
It might not have read/write permissions. You may need to change the permissions before writing. See VirtualProtect. Unless you tell us what "crash" means, it's hart to say.
Cheers,
adude
|
|
Back to top |
|
 |
ColdFusion_ How do I cheat?
Reputation: 0
Joined: 12 Sep 2010 Posts: 2
|
Posted: Sun Sep 12, 2010 12:53 pm Post subject: |
|
|
Thank you
With crash i mean just "X stopped responding"
I am gona give VirtualProtect a try and see if it helps.
EDIT: Yea that fixed the thing. Thanks for your help a mod can close this now
|
|
Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Sun Sep 12, 2010 3:10 pm Post subject: |
|
|
you can debug injected dll's as well which makes tracking down problems a lot easier.
in visual studio you can just set your breakpoints, inject the dll, then attach the debugger and it will break like usual.
|
|
Back to top |
|
 |
Jani Grandmaster Cheater
Reputation: 2
Joined: 29 Dec 2006 Posts: 804
|
Posted: Mon Sep 13, 2010 1:37 am Post subject: |
|
|
slovach wrote: | in visual studio you can just set your breakpoints, inject the dll, then attach the debugger and it will break like usual. | Debugger detected running on your system. Please unload it from memory and try again :p
|
|
Back to top |
|
 |
NoMercy Master Cheater
Reputation: 1
Joined: 09 Feb 2009 Posts: 289
|
Posted: Mon Sep 13, 2010 2:11 am Post subject: |
|
|
Maybe some game you are trying to debug, unpack it, and it works.
|
|
Back to top |
|
 |
tombana Master Cheater
Reputation: 2
Joined: 14 Jun 2007 Posts: 456 Location: The Netherlands
|
Posted: Mon Sep 13, 2010 3:39 am Post subject: |
|
|
slovach wrote: | you can debug injected dll's as well which makes tracking down problems a lot easier.
in visual studio you can just set your breakpoints, inject the dll, then attach the debugger and it will break like usual. |
Wow, thanks. I was always using Olly for that.
|
|
Back to top |
|
 |
Slugsnack Grandmaster Cheater Supreme
Reputation: 71
Joined: 24 Jan 2007 Posts: 1857
|
Posted: Mon Sep 13, 2010 5:56 am Post subject: |
|
|
Jani wrote: | slovach wrote: | in visual studio you can just set your breakpoints, inject the dll, then attach the debugger and it will break like usual. | Debugger detected running on your system. Please unload it from memory and try again :p |
Don't inject into a probably themida protected binary. In the properties of your project, set the command to be executed to be loaddll.exe from ollydbg and the argument to be the full path to your debug dll. Then pressing f5 will start debugging. Alternatively you can make your own executable which simply loadlibrary's your dll.
You generally are debugging to find problems with your code itself rather than to find problems in the way it interacts with the game.
|
|
Back to top |
|
 |
|