hook dll calls
Posted: Fri Apr 13, 2012 2:23 pm
Hi,
I have a undocumented DLL I want to learn what the function do, I have a list of exported function names but I want to understand what is passed to these functions in more detail.
So my questions is, what is the best way to hook these functions as they are called from another program?
My thoughts are:
1) Create a new DLL in purebasic with same name as original DLL including dummy functions, these dummy functions analyse / log passed parameters then call original function in DLL I have renamed and loaded .
2) Alter export table to jmp to unused space at end of DLL here there will be code to somehow log the called function then jmp/call to a memory resident purebasic app then analyse / log passed parameters before returning and jumping to original code.
Or any other better solutions you can suggest?
Thanks
Pete
I have a undocumented DLL I want to learn what the function do, I have a list of exported function names but I want to understand what is passed to these functions in more detail.
So my questions is, what is the best way to hook these functions as they are called from another program?
My thoughts are:
1) Create a new DLL in purebasic with same name as original DLL including dummy functions, these dummy functions analyse / log passed parameters then call original function in DLL I have renamed and loaded .
2) Alter export table to jmp to unused space at end of DLL here there will be code to somehow log the called function then jmp/call to a memory resident purebasic app then analyse / log passed parameters before returning and jumping to original code.
Or any other better solutions you can suggest?
Thanks
Pete