Packet sniffer

shrka

Contributor
I had seen most packet sniffers coded in C language, but I am not comfortable with socket programming in C and more comfortable with the same in JAVA.
Can we code these sniffers in JAVA?Does JAVA provides API's to listen to NIC card's port and to capture frame?
 
Are packet sniffers meant for packet stealing from the network?
If yes than how can we steal a packet from the source which is destined for different host or server in a network with a hub?
 
shrka said:
Are packet sniffers meant for packet stealing from the network?
If yes than how can we steal a packet from the source which is destined for different host or server in a network with a hub?

It can be used for different things. It's one of the way cyber security experts use to find out if the machines can be compromised or some routing issues. Simply speaking it's like a wire-tap. The packets are going there as well as to u so he isn't wiser while u're getting all the data also. While a hacker would be using the tools to do security audits, a cracker after getting access to some compromised machine through other means can use a packet sniffer to get even all packets on the network. Of course it depends if the sniffer is turned on the promiscious mode & everything is in clear text. Actually it's all a game where knowledge is power.
[OT] 'Sneakers' is a good movie to relate to. I don't know if it became successful or not although it had a killer cast of Robert Redford, Sidney Poiteir, Dan Aykroyd (remarkable in a serious role) & David Strathairn as the whiz blind guy. It was a beautiful pic. [/OT]
 
shirish said:
Of course it depends if the sniffer is turned on the promiscious mode & everything is in clear text.
Sniffer does not get turned on to promiscious mode. Its the Ethernet Card/Port that is turned on to promiscious mode. And it will not depend on whether promiscious mode is turned on or not. IT HAS to be turned on so that packets not meant for the machine dont get dropped at the interface.

@shrka Packet sniffers are not exactly meant for stealing. I mean the packets come to ur machine if u use a hub. Its just that they get dropped at the interface unless u turn on the promiscious mode. In the switched environment u just have to go a bit round way by using ARP poisoning to change the routing table a bit ur way.
 
Back
Top