Packet sniffing is the capture and inspection of data packets as they travel across a network. Network administrators use it legitimately to troubleshoot and monitor traffic, but attackers use the same technique to steal passwords, session cookies and other data sent without encryption. Encryption, especially HTTPS and VPNs, is the main defense, because a sniffer can capture encrypted packets but cannot read their contents.
Key takeaways
- Packet sniffing captures data packets in transit; the tool is the same for admins and attackers, only the intent differs.
- Passive sniffing only listens, while active sniffing uses ARP spoofing or similar tricks to redirect traffic through the attacker.
- Encryption makes sniffing useless: a sniffer sees encrypted packets but cannot read passwords or session cookies inside them.
Every email, login and file transfer on a network is cut into small packets and sent across the wire. A packet sniffer copies those packets and reads them — a routine tool for network engineers, and a quiet way for attackers to steal data.
What is packet sniffing?
Packet sniffing is the process of capturing and analyzing data packets as they travel through a network. A packet sniffer, also called a protocol analyzer, intercepts the packets, decodes them and shows their contents.
Each packet has a header, which says where it came from and where it is going, and a payload, which carries the actual data. A sniffer can read both. If the payload is unencrypted, it can reveal logins, session cookies, emails and files.
Sniffing is not always malicious. Network administrators use it to find faults, measure performance and investigate security incidents. Attackers use the same tools, with the same techniques, to steal information. The difference is permission and intent.
MITRE ATT&CK tracks this as technique T1040, Network Sniffing, under the credential access and discovery tactics. Captured data can include credentials sent over insecure protocols, plus details about services, hosts and network layout.
How does packet sniffing work?
Packet sniffing works by putting a network interface into promiscuous mode, so it stops ignoring packets not addressed to it and hands everything it hears to the capture software. The software then decodes and reassembles the packets.
Normally a network card only accepts packets addressed to its own device. In promiscuous mode it accepts all traffic it can see. On a shared medium such as open Wi-Fi or an old hub, that can mean everyone's traffic. On a modern switched network, a sniffer normally sees only its own traffic and broadcasts.
The capture follows four steps: data is broken into packets, the sniffer intercepts them, it extracts headers and payloads, and it reconstructs sessions such as a web login or a file download. Tools such as Wireshark, tcpdump and tshark are the standard software for this.
What are the types of packet sniffing?
The two main types are passive sniffing, which only listens, and active sniffing, which interferes with the network to redirect traffic through the attacker. Passive sniffing is hard to detect; active sniffing is more powerful.
Passive sniffing
Passive sniffing only listens. The attacker captures traffic that already reaches their network card, without sending anything. Because it sends nothing, it leaves almost no trace.
It works best on open Wi-Fi, shared hubs and networks where traffic is broadcast. Its limit is visibility: on a switched network, the switch only delivers each device its own traffic, so a passive sniffer sees little of anyone else's.
Active sniffing
Active sniffing tricks the network into sending traffic through the attacker first. The classic method is ARP spoofing, also called ARP cache poisoning: the attacker sends forged ARP messages claiming to be the gateway, so other devices send their traffic to the attacker.
Other active methods include MAC flooding, which overloads a switch's address table until it starts broadcasting traffic to all ports, DNS spoofing, which redirects victims to fake servers, and rogue Wi-Fi access points that mimic a trusted network.
Once traffic flows through the attacker, they can read it, modify it, or steal session cookies to hijack logged-in sessions. This is why active sniffing is usually the first step in a man-in-the-middle attack.
| Passive sniffing | Active sniffing | |
|---|---|---|
| What it does | Listens and copies traffic | Redirects traffic through the attacker |
| Sends packets? | No | Yes, forged ARP or DNS messages |
| Detectability | Almost undetectable | May leave ARP and traffic anomalies |
| Works best on | Open Wi-Fi, hubs, broadcast traffic | Switched networks, after ARP spoofing |
| What it can steal | Unencrypted data it can see | Credentials, cookies, sessions, files |
| Main defense | Encryption | Encryption, plus ARP monitoring and segmentation |
What tools do packet sniffers use?
The most widely used packet sniffers are Wireshark, tcpdump, tshark, Ettercap and Dsniff. They are legitimate network tools, free and open source in most cases, and they are also the tools attackers reach for.
Wireshark is a graphical analyzer that decodes hundreds of protocols and lets you filter traffic by address, protocol or content. tcpdump and its companion tshark are command-line tools built on the same capture library, libpcap, and are standard on Linux and macOS.
Hardware sniffers also exist: dedicated devices placed on a network to capture traffic, often used by network teams for long-term monitoring. A sniffer can also be a compromised router, switch or access point that copies traffic passing through it.
These tools are not malware. Their presence on a machine is not proof of an attack. Context matters: a network engineer running Wireshark to diagnose a fault is normal, while the same tool on an unknown device at 2 a.m. is a red flag.
What is a packet sniffing attack?
A packet sniffing attack is when an attacker captures network traffic without permission to steal credentials, session cookies or sensitive data. It usually starts with getting onto the same network, then capturing unencrypted traffic.
The attacker looks for logins sent over plain HTTP, FTP, Telnet, POP3 or IMAP without TLS, and for session cookies that let them impersonate a logged-in user without knowing the password. They also map the network: hostnames, IP addresses, services and versions, which helps plan later attacks.
MITRE lists real examples: APT28 used the Responder tool to capture usernames and hashed passwords through name-service poisoning, APT33 used SniffPass to collect credentials, and the BlackEnergy malware used a sniffer module in the 2015 Ukraine power attack.
Firesheep: the case that changed the web
In October 2010, developer Eric Butler released Firesheep, a Firefox extension, at the ToorCon security conference. It scanned open Wi-Fi networks for session cookies and let anyone on the same network take over other people's Facebook, Twitter and other accounts with a double click.
The weakness was simple. Many sites encrypted the login page but sent the session cookie over plain HTTP afterwards, so anyone listening could copy it. Firesheep made the attack trivial, and it pushed major sites to encrypt entire sessions with HTTPS.
The lesson still applies: a login page protected by HTTPS is not enough if the session that follows it is not. Check that a site uses HTTPS throughout, not just at login. Our SSL checker can verify a site's certificate and TLS setup.
Which protocols are vulnerable to packet sniffing?
Protocols that send data without encryption are vulnerable to packet sniffing. The main ones are HTTP, FTP, Telnet, POP3, IMAP and SMTP without TLS, plus older protocols such as rlogin and NNTP.
HTTP sends everything in clear text, including passwords and cookies. FTP sends usernames and passwords in clear text. Telnet sends the entire session, including the login, in clear text. Rackspace lists HTTP, Telnet, FTP, POP and SMTP among the protocols most vulnerable to sniffing, and these should never carry sensitive data on an untrusted network.
The fix is to use their encrypted versions: HTTPS instead of HTTP, SFTP or FTPS instead of FTP, SSH instead of Telnet, and IMAPS, POP3S and SMTPS with TLS for mail. A VPN also protects traffic from local sniffers, because the tunnel is encrypted.
Even encrypted traffic leaks some metadata: the destination addresses, timing and size of packets are still visible. That is usually far less useful to an attacker than the contents, but it is why privacy-conscious users also consider VPNs and DNS encryption.
How do you detect packet sniffing?
Passive sniffing is almost impossible to detect, because the sniffer sends nothing. Detection focuses on active sniffing, which leaves traces such as duplicate ARP replies, unexpected MAC addresses and traffic delays.
Signs of active sniffing include ARP table entries that change unexpectedly, a gateway MAC address that does not match the real router, network tools such as Wireshark or tcpdump running on machines that should not have them, and network cards switched into promiscuous mode.
Network teams can monitor for these signals with intrusion detection systems, ARP monitoring tools and endpoint detection that alerts on capture tools and promiscuous-mode driver loads. MITRE's detection guidance for T1040 points to exactly these signals.
For home users, the practical check is simpler: look for unknown devices on your Wi-Fi, keep your router firmware updated, and treat any unexpected certificate warning as a reason to stop and investigate. Our guide to how to secure your Wi-Fi covers the router settings that matter.
How do you prevent packet sniffing attacks?
Encryption is the decisive defense against packet sniffing. A sniffer can still capture encrypted packets, but it cannot read passwords, cookies or messages inside them. Everything else is a second layer.
- Use HTTPS everywhere. Never log in or enter sensitive data on a plain HTTP page.
- Use a VPN on public Wi-Fi. It encrypts all traffic between your device and the VPN server.
- Replace clear-text protocols. Use SSH, SFTP and TLS mail instead of Telnet, FTP and plain POP3 or IMAP.
- Use strong Wi-Fi security. WPA3, or WPA2 with a strong password, stops strangers joining your network and sniffing it.
- Segment networks. Keep guests, IoT devices and work systems on separate networks so a sniffer sees less.
- Monitor ARP traffic. Tools that flag duplicate ARP replies and unexpected gateway addresses catch active sniffing.
- Use MFA everywhere. Even if a password is captured, a second factor blocks the login.
For businesses, MITRE's mitigations for T1040 add the same points: encrypt all wireless traffic, use Kerberos, SSL and MFA wherever possible, and monitor switches for span-port use, ARP and DNS poisoning, and router reconfiguration.
When is packet sniffing legitimate?
Packet sniffing is legitimate when you have permission to capture the traffic, usually on your own network or as part of your job. Network engineers, security analysts and developers use it daily to diagnose faults and investigate incidents.
Common legitimate uses include troubleshooting slow connections, finding which device is flooding a network, verifying that an application encrypts its traffic, and investigating a security incident after the fact. Many compliance and incident-response processes depend on packet captures.
The line is consent and scope. Capturing your own traffic, or traffic on a network you administer with authorization, is normal work. Capturing other people's traffic without permission, even if you only read it and do nothing else, is not.
The bottom line
Packet sniffing is a tool, not a magic attack. It copies traffic and reads what is not encrypted. Passive sniffing is silent and hard to detect, active sniffing redirects traffic to steal more, and both are defeated by the same thing: encryption.
Use HTTPS everywhere, a VPN on public Wi-Fi, encrypted protocols instead of clear-text ones, and MFA on important accounts. Then a sniffer on your network sees only ciphertext — and that is exactly the point. Check a site's encryption with the free SSL checker.
Frequently asked questions
What is packet sniffing in simple terms?
Packet sniffing is listening to network traffic. Data travels in small packets, and a sniffer copies those packets so they can be read and analyzed, either to fix a network problem or to steal information.
How does packet sniffing work?
A sniffer puts a network card into promiscuous mode so it receives packets not addressed to it, then captures, decodes and reassembles them. On open Wi-Fi or a shared network, that can include other people's traffic.
Is packet sniffing illegal?
It depends on permission and intent. Capturing traffic on your own network, or with authorization for troubleshooting, is legal. Capturing other people's traffic without permission to steal data is illegal in most countries.
What is a packet sniffing attack?
A packet sniffing attack is when an attacker captures network traffic to steal credentials, session cookies or sensitive data, often after redirecting traffic with ARP spoofing or a fake Wi-Fi network.
Can packet sniffing steal passwords?
Yes, if the password is sent over an unencrypted protocol such as HTTP, FTP or Telnet. Encrypted connections such as HTTPS protect passwords because the sniffer only sees ciphertext.
How can I tell if someone is sniffing my network?
Passive sniffing leaves almost no trace, which is why prevention matters more than detection. Active sniffing can leave signs such as duplicate ARP replies, unexpected devices, or traffic delays.
Does a VPN stop packet sniffing?
Yes, for traffic inside the VPN tunnel. A sniffer on the local network sees only encrypted VPN packets, not the websites, logins or messages inside them.
What is the difference between packet sniffing and a man-in-the-middle attack?
Sniffing is reading traffic, usually passively. A man-in-the-middle attack goes further: the attacker sits between two parties, reads traffic and can also modify it or impersonate one side.
Sources
The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.
Checked against MITRE ATT&CK T1040 (Network Sniffing) and network analyzer guides from Webopedia and Rackspace.
How we write and fact-check →