ELI5: What are On-Path Attacks?

Say you’re passing notes to a friend in class, but someone sitting between you secretly reads each note, maybe even changes what it says, then passes it along. Neither you nor your friend realizes anyone is in the middle. That’s an on-path attack — the attacker sits between two people (or computers) who are talking, secretly reading or changing messages as they pass through. Both sides think they’re talking directly to each other, but everything goes through the attacker first.

Overview

On-path attacks (formerly called man-in-the-middle attacks) occur when an attacker secretly positions themselves between two communicating parties, intercepting and potentially altering the data in transit. The attacker can eavesdrop on sensitive communications, steal credentials, inject malicious content, or modify transactions — all while both parties believe they are communicating directly with each other.

Key Concepts

  • poisoning: The most common technique on local networks — redirects traffic through the attacker’s machine by poisoning ARP caches
  • TLS stripping: Downgrading an HTTPS connection to HTTP so the attacker can read traffic in plaintext
  • TLS interception (SSL proxy): Using a trusted certificate to decrypt, inspect, and re-encrypt TLS traffic (used legitimately in corporate environments)
  • DNS spoofing: Redirecting DNS responses to send users to attacker-controlled servers
  • HTTPS spoofing: Presenting a fraudulent certificate to intercept encrypted web traffic
  • Session hijacking: Stealing session tokens from intercepted traffic to impersonate authenticated users
  • Man-in-the-Browser (MitB): Malware in the browser modifies transactions in real time (e.g., changing bank account numbers)
  • Relay attacks: Forwarding authentication exchanges between a victim and a legitimate service (common with NFC/RFID)
  • Defenses: HTTPS everywhere, HSTS (HTTP Strict Transport Security), certificate pinning, mutual TLS, encrypted protocols

Exam Tips

Remember

On-path = attacker is BETWEEN two parties. ARP poisoning = Layer 2 on-path setup. SSL stripping = HTTPS downgraded to HTTP. Defense: use encrypted protocols (HTTPS, SSH), HSTS headers, and certificate validation.

  • CompTIA now uses “on-path” instead of “man-in-the-middle” — know both terms
  • HSTS tells browsers to ALWAYS use HTTPS, preventing SSL stripping
  • Certificate pinning prevents acceptance of fraudulent certificates

Connections

  • Uses techniques from network-attacks like ARP poisoning and DNS spoofing to position the attacker
  • Can intercept credentials vulnerable to password-attacks when encryption is stripped or absent
  • wireless-attacks like evil twin APs are a common setup for on-path attacks
  • encryption and proper certificate validation are the primary defenses against interception

Practice Questions

Scenario

See case-on-path-attacks for a practical DevOps scenario applying these concepts.