Monday 15 April 2013

c++ - accessing the memory of a foreign process -


ive read around the website and try and im trying to find a deciding answer I have gone googling, but I did not find the answer that answered all my questions.

I have two processes, one has an integer variable that I want to replace with another process. I know how to read / write for specific memory space, but I only know how to do this on native process addresses.

I do not understand CreateRemoteThread. Is it possible that the simple, simple example of manipulating the memory of the native process for the running program?

Thanks in advance

EDIT: I get some answers from other sources about my question. I just want to understand how I write a vairable for a memory space, say that:

WriteProcessMemory (phandle, (* * Zero *) address, val, sizeof (val), zero);

It does not seem to have any effect, assuming Val is a bool:

  while (true) {key = getch (); If (key == '1') {if (val) val = false; Else val = true; WriteProcessMemory (phandle, (* Zero *) address, & amp; val, sizeof (val), zero); } Ball Val 2; ReadProcessMemory (phandle, (Zero *) address, & amp; val2, sizeof (val2), NULL); The court's & lt; & Lt; Val2 & lt; & Lt; Endl; }   

Always run 0. Why?

Try reading shared memory, and certainly not about to make the mutex two processes at the same time In the same memory place tampered with

  BOOL WINAPI WriteProcessMemory (_In_ handle hProcess, _In_ LPVOID lpBaseAddress, _In_ LPCVOID lpBuffer, _In_ size_t n size, _Out_ SIZE_T * lpNumberOfBytes written);   did have the correct parameters as above, you must at least have previously worked 4 standards 

Follow

  WriteProcessMemory (phandle, (zero *) addresses, & amp; value, sizeof (val), zero);   

Enter the Val

No comments:

Post a Comment