|
-
June 17th, 2008, 10:33 AM
#1
reading memory addresses
im working on a project which involves reading of memory addresses... and i have a couple of questions i hope someone can address... i've found the memory address i want to watch in a particular process using Tsearch and Artmoney, and i have the code to actually read it, but it was always my understanding that memory addresses are very dynamic, in the sense that if you shut down and run the program again, its pretty certain that it will be a completely different address completely...am i right in this assumption? and if i am, is there any way that i would, through code be able to find the new address despite it having changed?
thanks in advance
-
June 19th, 2008, 01:38 AM
#2
Re: reading memory addresses
Im pretty sure your assumption about memory swapping is correct. You MIGHT get lucky and it would be the same address but its an extremely slim chance.
As for wanting to monitor an address regardless of program activity (shutdown, startup, etc...) I really dont know how you would do that... But I dont think it would be with C#. Your probably looking at a lower level language such as C.
Maybe if you could get a handle to the process and get access to its variables by some way of interop you could do it. But then it may not work anyway if the application shuts down.
R.I.P. 3.5" Floppy Drives
"I know not with what weapons World War III will be fought, but World War IV will be fought with sticks and stones." - Albert Einstein
-
June 19th, 2008, 02:33 AM
#3
Re: reading memory addresses
What you need to do is identify the starting memory address for the process and then work out the offset to the piece of data you're interested in. That way upon reboot you can identify the new starting address and the offset will always remain the same.
Unfortunately I'm also not much use as I don't have the code to do that, but I would hope C# offers that functionality. If not you'll find a line or two of C++ will do the job, which you can probably wrap up to access via C# if you need to.
-
June 21st, 2008, 09:15 PM
#4
Re: reading memory addresses
ok, thats what i was afraid of, i read your reply about 3 hours ago and have been searching ever sense, i haven't been able to find anything yet, so if anyone can find any code in any language that i can use to throw together a dll, it'd be greatly appreciated, i just need to be able to get the base memory address of any process, then i think i can calculate the offset.....
]
-
June 21st, 2008, 09:49 PM
#5
Re: reading memory addresses
A user level process (ie a normal program) can NOT read the memory addresses of another process. Period. Independant of Language.
Just think about what the security ramifications would be if this were possible....
TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
2008, 2009,2010
In theory, there is no difference between theory and practice; in practice there is.
* Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions 
* How NOT to post a question here
* Of course you read this carefully before you posted
* Need homework help? Read this first
-
June 22nd, 2008, 02:18 AM
#6
Re: reading memory addresses
I believe it used to be possible with the old 80186 Intel based CPU's (circa 1982). They didn't have protected mode. The 80286 introduced that I think.
The 80186 CPU was also an 8-bit CPU, so basically no applications written today would run properly on it. That and its like, 20+ years old, haha.
Last edited by RaleTheBlade; June 22nd, 2008 at 02:22 AM.
R.I.P. 3.5" Floppy Drives
"I know not with what weapons World War III will be fought, but World War IV will be fought with sticks and stones." - Albert Einstein
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|