Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

full unlimited memory access in plain c

Status
Not open for further replies.

kingraoul

Technical User
Feb 21, 2003
15
IT
Hi, I spent a whole day trying to understand how programs like debuggers can "simply" scan all the physical memory of the system without limitations. I could find only some api functions to specifically address a single process and deal with it, but nothing about how to address physical memory without triggering protection fault/errors ecc. ecc. Is there a way to get the content of 0x???????? or whatever without writing "kernel mode ring0 bla bla bla" code? Just a simple SwitchToUnprotectedModeAdressing() like function? Maybe a standard c library function I never heard of...?

Thank you very much.

Kingraoul
 
Hi again, I found some information about mapping the physical memory to an object that you can interact with using some undocumented call to the NT kernel. Very interesting and at least it does not require special knowledge or low level stuff, but I really would like to simply access all physical memory with a pointer if possible. Or with some assembly inside my c program. I understand that this could lead to all software potentially damage system areas, but it must be a way to accomplish something like this, given the fact that memory scanners and debuggers in general do it easily.

Thanks again

Kingraoul
 
What exactly are you trying to achieve?

> given the fact that memory scanners and debuggers in general do it easily.
How do you know that is "easy"?
There is no way to tell what kind of API accesses are going on in the background.


--
 
Sorry, with "Easily" I mean, the OS protects the system limiting the address space so a process cant write other processes memory by mistake, but the simple existence of some software that can write this memory not by mistake, but willingly (sorry for my english) means that it must be an easy way to switch this "protection" off.
The alternative is that a security layer of windows is almost useless because it is meant not to be swithced off but a lot of programs exists that can do what they want with the physical memory.

And for what I'm trying to achieve, is simply understanding how a access memory to write a simple memory scanner, just for academic purposes, there are a lot of debuggers and scanners around and very good programmed as well. But I like to learn things. I used to be a programmer a lot of centuries ago :)

Thanks for your interest

Kingraoul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top