Archived

This topic is now archived and is closed to further replies.

31337noob

need help with writeprocessmemory and readprocessmemory

Recommended Posts

i sortof know how to use readprocessmemory() example ReadProcessMemory(process,(LPCVOID)baseaddress,(LPVOID)buffer,256,NULL); and you increament the baseaddress by 256 because i am reading 256 at a time. but how do you search the memory for values and strings? and then how do i write over that value with my own value. please help me. thanks in advanced.

Share this post


Link to post
Share on other sites
The datatype of the data at any memory location is not stored. You''d just have to know.

You can write to the memory using WriteProcessMemory()


Thanks Salsa!Colin Jeanne | Invader''s Realm
"I forgot I had the Scroll Lock key until a few weeks ago when some asshole program used it. It even used it right" - Conner McCloud

Share this post


Link to post
Share on other sites
yea i know that much......

does any one else have an idea on how to do this.

searching strings and integers in the memory.

please help.

thanks

Share this post


Link to post
Share on other sites
There''s simply no way of telling whether a chunk of memory used by an unknown program contains a string, an integer or something else.
You could debug/disassemble the program, see how it manipulates the data and deduce what it is... but that''s painful...
If you want to search for strings, you could for example look for sequences of at least 4 alphanumerical characters.

Share this post


Link to post
Share on other sites
i want to make a memory hacking program so you can find values and strings for games or apps and then change the value or string.

Share this post


Link to post
Share on other sites
quote:
Original post by 31337noob
i want to make a memory hacking program so you can find values and strings for games or apps and then change the value or string.


I see... are you thinking of hacking my games?

Share this post


Link to post
Share on other sites
What most (all?) memory hackers liek that do is examine the memory and take a copy of it. Then, the user says "I want to find a variable that contains the number 16" - which represents current cash or something. You search through the memory (4 bytes at a time since most integer variables will be 32-bit integers), and look for the value "16". You''ll probably find loads of occurances. Then, you tell the user to change the number in game (buy buying or selling something). They buy something and the number changes to 10. They tell the hacking program that the number changed to 10, and the hacking program goes through its list of memory locations that were at 16 and sees what ones now say 10.
You repeat this process a few times until you only have one or two memory locations. Then you try changing the memory at that location and see if your money changes in game.
If you don''t get any results, you could try searching for 16-bit numbers (skipping 2 bytes every loop), and then try 8-bit numbers.

Strings are the same, they''re just runs of characters instead of 4-byte numbers.

Share this post


Link to post
Share on other sites
I made a program like that, but kind of lost interest after I finished a more orless working version.
The code is kind of messy, disorganized, not very optimized and not very well-commented, but it might help you get a general idea of how it could be done.
Executable can be found here, and the source here.


[My Website and Image Gallery (WIP)][Greatest Tetris clone evar!][Return your stolen MP3s]

Share this post


Link to post
Share on other sites