I want to know if this is possible under Windows. Basically, there's an application which opens a TCP connection to a server. From a separate application, I want to be able to somehow grab a handle of that socket, then use it for normal read/write operations without disrupting the connection.
Of course it's possible, a lot of malware (like the one you're trying to write) does it.
Name:
Anonymous2008-10-23 3:21
OP here. I was hoping Windows provided some standard functionality to do that, but I guess it doesn't.
dll injection is a pain in the ass, but it can't be helped.
>>9
I'm not sure you understand the OP's situation. He wants to use an existing socket created from a different application, from his own program. There's no Windows functionality to do that.
Name:
Anonymous2008-10-23 4:29
>>8
Not practical. There could be a delay between when wpcap gets the tcp frame, and when the frame was received. Using incorrect values in any of the tcp fields will kill the connection, which for all intents and purposes is not desirable.
>>11
it's no more difficult than any other method suggested in this thread, assuming you don't have the source code of the application you want to steal the socket from.
Name:
he2008-10-26 12:13
hello
Name:
Anonymous2009-03-06 11:22
Reliably respond to unusual events because you take more time thinking than typing.