- the requesting process is the parent of the process being examined; or
- the requesting process is running as administrator (or "root" on Unix); or
- the requesting process has been granted more specific privileges that allow it to examine process memory
read process memory of another process windows
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
So this function here: https://msdn.microsoft.com/en-us/library/windows/desktop/ms680553(v=vs.85).aspx
Allows a person to open a handle to a specific external process. Allowing one to read information at specific points in memory. So my question is, is there a way to do something like this in matlab.
If opening a handle isn't possible would mapping / copying the memory of the second process to a new location (similar to how you can memory map a file), then read the information from this new mapped section.
Thanks!
0 comentarios
Respuestas (1)
Walter Roberson
el 11 de Oct. de 2017
Generally speaking, the requirements to access the memory space of another process are, for both MS Windows and Unix type systems, that one of the following is true:
On some high-security versions of Unix, running as "root" is not enough and the process must have been granted the specific permission. Historically, "root" was always granted all permissions, but higher security version compartmentalize permissions, so that if an intruder somehow gets root access they are still restricted on what they can do.
The ability to read another process's memory is a relatively high security risk, since other process might be storing banking credentials or Classified information.
It is therefore better and more secure to arrange to have the target program and the monitoring program cooperate on sharing information, such as creating a shared memory segment that both sides can read and write, gaining access only to what is deliberately shared.
The File Exchange contribution sharedmatrix() uses operating system shared memory facilities to allow deliberate sharing.
MATLAB itself provides memmapfile(), which allows memory-like access to a file -- a file that a different process might also be mapping in similar ways, effectively using a file as a buffer to share memory between two processes.
If, somehow, you do have the correct permissions between the MATLAB session and the process to be monitored, then you could write a big of C or C++ code to make the appropriate MS Windows operating system calls. There is no Mathworks provided facility to directly do what you are asking for.
0 comentarios
Ver también
Categorías
Más información sobre MATLAB Compiler en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!