Internet
Fact-checked

At EasyTechJunkie, we're committed to delivering accurate, trustworthy information. Our expert-authored content is rigorously fact-checked and sourced from credible authorities. Discover how we uphold the highest standards in providing you with reliable knowledge.

Learn more...

What is a Packet Sniffer?

R. Kayne
R. Kayne

A packet sniffer is a device or program that allows the user to eavesdrop on traffic traveling between networked computers. The program will capture data that is addressed to other machines, saving it for later analysis.

All information that travels across a network is sent in "packets." For example, when an email is sent from one computer to another, it is first broken up into smaller segments. Each segment has the destination address attached, the source address, and other information such as the number of packets and reassembly order. Once they arrive at the destination, the packet's headers and footers are stripped away, and the packets are reconstituted.

Traffic traveling between networked computers can be captured by a packet sniffer.
Traffic traveling between networked computers can be captured by a packet sniffer.

In the example of the simplest network where computers share an Ethernet wire, all packets that travel between the computers are "seen" by every computer on the network. A hub broadcasts every packet to every machine or node on the network, then a filter in each computer discards packets not addressed to it. A packet sniffer disables this filter to capture and analyze some or all packets traveling through the Ethernet wire, depending on the sniffer's configuration. This is referred to as "promiscuous mode." As a result, if Ms. Wise on Computer A sends an email to Mr. Geek on Computer B, software set up on Computer D could passively capture their communication packets without either Ms. Wise or Mr. Geek knowing. This type of sniffing is very hard to detect because it generates no traffic of its own.

One line of defense against electronic eavesdropping is encryption.
One line of defense against electronic eavesdropping is encryption.

A slightly safer environment is a switched Ethernet network. Rather than a central hub that broadcasts all traffic on the network to all machines, the switch acts like a central switchboard: it receives packets directly from the originating computer, and sends them directly to the machine to which they are addressed. In this scenario, if Computer A sends an email to Computer B, and Computer D is in promiscuous mode, it still won't see the packets. Some people mistakenly assume a packet sniffer cannot be used on a switched network.

Sending sensitive information, such as passwords, through a secure site can prevent them from being detected by a packet sniffer.
Sending sensitive information, such as passwords, through a secure site can prevent them from being detected by a packet sniffer.

There are ways to hack the switch protocol, however. A procedure called ARP poisoning basically fools the switch to substituting the machine with the sniffer for the destination machine. After capturing the data, the packets can be sent to the real destination. The other technique is to flood the switch with MAC (network) addresses so that the switch defaults into "failopen" mode. In this mode it starts behaving like a hub, transmitting all packets to all machines to make sure traffic gets through. Both ARP poisoning and MAC flooding generate traffic signatures that can be detected with the right software.

Websites that use encryption begin with "https".
Websites that use encryption begin with "https".

These programs can also be used on the Internet to capture data traveling between computers. Internet packets often have very long distances to travel, passing through several routers that act like intermediate post offices. A sniffer might be installed at any point along the way, and it could also be clandestinely installed on a server that acts as a gateway or collects vital personal information.

Users may use encryption keys to send encrypted files as email attachments to enhance online privacy.
Users may use encryption keys to send encrypted files as email attachments to enhance online privacy.

A packet sniffer is not just a hacker's tool. It can be used for network troubleshooting and other useful purposes. In the wrong hands, however, this software can capture sensitive personal information that can lead to invasion of privacy, identity theft, and other serious problems.

The best defense against eavesdropping is a good offense: encryption. When strong encryption is used, all packets are unreadable to any but the destination address. Other programs can still capture packets, but the contents will be undecipherable. This illustrates why it is so important to use secure sites to send and receive personal information, such as name, address, passwords, and certainly any credit card information or other sensitive data. A website that uses encryption starts with https, and email can be made secure by encrypting with a program, some of which come with plug-ins for major email programs.

Discussion Comments

anon343592

Can someone use a packet sniffer to detect .dats on log files?

anon258674

So how does this relate to halo?

anon144800

article is easy to understand. thanks for detailed information.

anon127373

Very helpful. thanks.

anon96356

thanks for the article.

anon63298

Please tell me how to use this Packet sniffer tool.

Post your comments
Login:
Forgot password?
Register:
    • Traffic traveling between networked computers can be captured by a packet sniffer.
      By: vschlichting
      Traffic traveling between networked computers can be captured by a packet sniffer.
    • One line of defense against electronic eavesdropping is encryption.
      By: Gajus
      One line of defense against electronic eavesdropping is encryption.
    • Sending sensitive information, such as passwords, through a secure site can prevent them from being detected by a packet sniffer.
      By: jamdesign
      Sending sensitive information, such as passwords, through a secure site can prevent them from being detected by a packet sniffer.
    • Websites that use encryption begin with "https".
      By: jamdesign
      Websites that use encryption begin with "https".
    • Users may use encryption keys to send encrypted files as email attachments to enhance online privacy.
      By: Linux Screenshots
      Users may use encryption keys to send encrypted files as email attachments to enhance online privacy.