I posted before but looks like that post is long gone. I also didnt describe the problem very well so here i will go at another attempt.
I am using DLL Injection to do a system-wide WriteProcessMemory Hook using Microsoft Detours. My hook works, because I get the desired change in the function but there is one problem that I do not understand why it is occuring. Everytime I initiate the hook, explorer.exe seems to crash. That is the only program that crashes and I do not know why. Would anyone know why it would crash?
I want to try a different method. Specifically on hooking the export. Would anyone know how I would do a hook on the WriteProcessMemory Export in kernel32?
Any help to my two questions would be appreciated. I'll post some code if you need it.
I had an assignment due in my class(Don't Worry it is over now, however I had to turn it in incomplete) I want to finish it up for the learning experience my class is a 100 level class at my college and it is programming in C++.
How long have you been writing code for ? This is a very confusing question, because the answer seems to be so simple. Assuming that CArielAPI is a class, you need to include the header it was defined in so it's visible where you want to create it, then you just plain declare it.
Perhaps you need to explain some more ?
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog
Reading the memory in other applications can be quite useful sometimes. It is especially useful for writing trainers.
Now, I have successfully located a couple of variables in my target application. Those variables are mostly strings allocated directly on the stack or through a call to malloc with a constant length. These constant allocations yields constant addresses for my strings. Thus, they can easily be read from my trainer-application using ReadProcessMemory.
However, when I use dynamic memory allocation the offsets between my variables can be of any size. I need to somehow calculate exactly where in the memory my variables will be located. Also, it would be good to know how many bytes one should read (the length of allocated strings etc).
How can I do that? Note that I'm only interested in _reading_ these values. I know there are ASM/Soft-Ice gurus in here! Could you please point me in the right direction =)