listening in on connections - possible?

Started by
4 comments, last by owl 18 years, 3 months ago
as the subject implies, I want to know if it's possible to connect a second program to a port that already has a program on it and be able to modify the data or just pass it on. I know it sounds shifty but I'm just wondering that's all.
Advertisement
Yes it is. These programs are generally called packet sniffers and can generally detect any traffic that comes on the local network they are attached to.
yeah I basically just want to know what language they are written in and if the functions are already written in say WinSock or it's just pure hacking.
Quote:Original post by arbuckle911
yeah I basically just want to know what language they are written in and if the functions are already written in say WinSock or it's just pure hacking.


The language doesn't matter: it's just a question of calling the appropriate operating system functions. No, I don't think they're written using Winsock -- packets sniffers are written at a lower level than sockets. Is it "pure hacking"? Depends on what you mean by that. All the functions needed exist in the system. It's just a question of knowing how networking really work.

No, we most probably aren't going to teach you how to write one.
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
The knowledge is out there. Either you can use a library such as libpcap, or you can go it alone by putting the interface in promiscuous mode and taking it from there. It requires quite low-level understanding of networking and how it relates to your OS and API, though.

To see what a network sniffer does, try downloading and using the (free) tool "Ethereal" -- it's quite useful!
enum Bool { True, False, FileNotFound };
I remember some version of Windows 2000 coming with a network monitoring tool that also sniffed the net.
[size="2"]I like the Walrus best.

This topic is closed to new replies.

Advertisement