Post Reply  Post Thread 
Beginning with code hooking
Author Message
Gash
Junior Member
**


Posts: 1
Group: Registered
Joined: Mar 2008
Status: Offline
Reputation: 0
Post: #1
Question  Beginning with code hooking

Hello and thank you for sharing your great hooking code with others.

I have an application, which process I would like to hook onto and search into. I have no use for altering any of the information, all I really need to understand is how to get started hooking this process and it's respective dll. Once hooked I would like to search the memory of the running process and find variables of different types.

Could your CodeHook library help me do this and if so, would you be so kind as to maybe give me some basic ideas of how to get started? Any help would be greatly apreciated. The main program loads a dll and it is this dll's memory space that I would like to examine and search into. I wish to extract data from it and then save this to a database.

Looking forward to reading your answer!

Best regards,
Gash

03-26-2008 12:10 PM
Find all posts by this user Quote this message in a reply
Qi
Administrator
*******


Posts: 46
Group: Administrators
Joined: Oct 2007
Status: Offline
Reputation: 0
Post: #2
RE: Beginning with code hooking

Hello,

From your description, seems you only want to inject a dll to another process, not about code hooking.

Here has some sample code to inject dll,
http://www.torry.net/pages.php?id=347
source code can be downloaded here,
http://www.torry.net/samples/samples/os/dllinject.zip

To fit your needs, you can following these steps,

1, Use tool help APIs to find the target process, e.g, CreateToolhelp32Snapshot, Process32First, etc.

2, Use VirtualAllocEx and CreateRemoteThread to inject your dll into the target process.

3, In your dll startup code, you can do whatever you want, for example, enumerate all heap blocks, etc.

In fact you don't need code hooking, you only need to inject the dll.

To search the memory allocated by a certain dll, you need deep knowledge of Windows memory and module management.

03-27-2008 04:27 PM
Visit this users website Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: