Man-in-the-Middle (On-Path) Attacks | AP Cybersecurity
Man-in-the-Middle (On-Path) Attacks Explained
A man-in-the-middle (on-path) attack places an adversary between two communicating parties so they can read or alter the traffic. On a local network, ARP spoofing is a common way to get there.
Contents
How an on-path attack works
In a man-in-the-middle attack, the adversary positions themselves so all traffic between two parties passes through them. They can silently read it, or alter it before passing it along. On a LAN, ARP spoofing is the usual method: the attacker tricks both sides into sending traffic to the attacker's MAC.
Public or unsecured networks make this easier, which connects back to the public Wi-Fi risks in Unit 1.
On an open network, an attacker captures a victim's unencrypted login as it passes through. What attack is this?
Reveal answer
A man-in-the-middle (on-path) attack. The attacker sits between the victim and the server and reads the unencrypted traffic in transit.
On-path attacks intercept traffic in transit. The defense that matters most is encryption (TLS): even if intercepted, the data is unreadable.
Why encryption is the key defense
Encryption does not stop an attacker from sitting on-path, but it makes the intercepted traffic useless: they capture ciphertext, not credentials. This is why HTTPS and VPNs matter on untrusted networks.
Other defenses reduce the chance of getting on-path in the first place: strong wireless security, network segmentation, and detecting ARP anomalies.
A victim logs in over HTTPS while an attacker is on-path. What does the attacker see?
Reveal answer
Encrypted traffic only. The attacker can see that communication is happening but cannot read the login, because TLS encrypts it in transit.
On-path attacks on open Wi-Fi
Researchers routinely demonstrate intercepting unencrypted traffic on open networks by getting on-path, often via ARP spoofing on a shared LAN. Encryption is what keeps the captured data useless.
Encryption protects the data, not the positioning.
Key Terms
| Man-in-the-middle | An attacker positioned between two parties' traffic. |
| On-path | Another name for a man-in-the-middle position. |
| ARP spoofing | Common way to get on-path on a local network. |
| TLS | Encryption that makes intercepted traffic unreadable. |
Match It Up
Common Mistakes
Thinking encryption blocks the interception
Encryption does not stop on-path positioning; it makes the captured data unreadable.
Forgetting ARP spoofing enables it on a LAN
On a local network, ARP spoofing is the common path to a man-in-the-middle position.
Assuming only Wi-Fi is vulnerable
Wired LANs are also vulnerable via ARP spoofing.
Ignoring traffic alteration
On-path attackers can change traffic, not just read it.
Check for Understanding
Frequently Asked Questions
Get in Touch
Whether you're a student, parent, or teacher — I'd love to hear from you.
Just want free AP CS resources?
Enter your email below and check the subscribe box — no message needed. Students get daily practice questions and study tips. Teachers get curriculum resources and teaching strategies.
Message Sent!
Thanks for reaching out. I'll get back to you within 24 hours.
Prefer email? Reach me directly at [email protected]