Winsock

c++ / delphi package - dll injection and api hooking

Winsock

Postby cooletta » Tue Apr 27, 2004 3:44 pm

Would love to see examples of hooking Winsock. :?
cooletta
 
Posts: 2
Joined: Tue Apr 27, 2004 3:40 pm

Postby madshi » Wed Apr 28, 2004 5:27 am

Some of my customers have successfully hooked WinSock functions, so it does work. I've no demo for it ready, though. My to do list tells me to write such a demo, cause the demand for that is quite high. But my to do list is quite full, so I can't promise a specific release date.
madshi
Site Admin
 
Posts: 9810
Joined: Sun Mar 21, 2004 5:25 pm

Postby nildo » Wed Apr 28, 2004 11:57 am

Hi hi!
Well, I've succefully hooked WinSock functions. Its normal, use the same method of hooking any other function. But to writte an example of that is quite difficult because you need to transfer the data from your DLL to your EXE. But that data has no size limit, so you need to pass the Pointer of that buffer and use ReadProcessMemory to read that buffer from the target EXE. What else do you wanna know? Maybe I can help you...
nildo
 
Posts: 249
Joined: Mon Mar 22, 2004 11:32 am

Winsock hooking

Postby cooletta » Fri Apr 30, 2004 2:34 pm

Nildo,
Thanks for the input. To be honest, I do not know C++ well enough to be trying to do this completely on my own. I have never hooked anything before. But if I had example code to look at, I might be able to pull it off eventually. As it is now, I don't know what questions to ask you.
cooletta
 
Posts: 2
Joined: Tue Apr 27, 2004 3:40 pm

Winsock

Postby STRASHARO » Sun May 02, 2004 1:14 pm

Yeah,it will be nice to if someone posts examples for sendto() and recvfrom() hooking. :wink:
Have a nice day! :D
STRASHARO
 
Posts: 5
Joined: Sun May 02, 2004 11:53 am

inject dll to hook writeconsole in win xp ping app

Postby chet123 » Sun May 02, 2004 9:28 pm

Hi, I have installed the madhook environment on my XP box. I am trying to dynamically inject a win32 hook on write console. The ping app is running while I am trying to do this. I keep getting a hook failed. Is the madhook lib capable of injecting into ping app while it is running?
Thanks
chet123
 
Posts: 1
Joined: Sun May 02, 2004 9:24 pm

Postby madshi » Mon May 03, 2004 6:28 am

madCodeHook should be able to inject into it and hook APIs there. What part of your program fails? The injecting or the hooking? Does InjectLibrary or HookAPI return true or false?
madshi
Site Admin
 
Posts: 9810
Joined: Sun Mar 21, 2004 5:25 pm

Postby nildo » Mon May 03, 2004 11:11 am

The DLL you need to hook is ws2_32.dll. THe functions are 'send', 'sendto', 'recv', recvfrom' (case sensitive)
nildo
 
Posts: 249
Joined: Mon Mar 22, 2004 11:32 am


Return to madCodeHook

Who is online

Users browsing this forum: Baidu [Spider], Exabot [Bot] and 8 guests