user@shadowpbx: ~/cyber/posts$ cat writeup.md

Man-in-the-Middle Attacks and Modern Defenses

When moving beyond a controlled virtual testing environment, Man-in-the-Middle (MitM) attacks occur across different layers of the networking stack. While the core objective remains the same—intercepting and reading traffic between two parties—the physical and logical methods used to force traffic through the middleman change based on the environment.

The following is a conceptual overview of how MitM attacks are executed in various contexts, ranging from local Wi-Fi networks to global internet routing, along with the defenses used to prevent them.


1. Local Network (LAN) Interception

On a local network (such as a home network, corporate office, or public coffee shop), devices communicate using physical hardware addresses (MAC addresses) rather than IP addresses. Attackers exploit this layer to redirect traffic.

ARP Spoofing (Address Resolution Protocol)

Rogue Access Points (The "Evil Twin")


2. Domain & Name Resolution Interception (DNS Spoofing)

When you type a domain name (like bank.com), your computer asks a Domain Name System (DNS) server to translate that text into a numerical IP address.

DNS Cache Poisoning


3. Internet-Scale Interception (BGP Hijacking)

At the global scale, the internet is composed of massive networks called Autonomous Systems (AS) owned by ISPs and tech giants. They route traffic between each other using the Border Gateway Protocol (BGP).

BGP Hijacking


4. Cellular Interception (IMSI Catchers / Stingrays)

In mobile cellular networks, your smartphone is constantly looking for the strongest signal from local cell towers.


5. Mitigating the Weakest Link: Downgrade Attacks and Certificate Safeguards

Even when strong encryption is available, attackers will attempt to bypass it by forcing systems to communicate using older, insecure protocols or by abusing the trust model of Certificate Authorities (CAs).

Protocol Downgrades (SSL Stripping)

Rogue Certificate Issuance


The Ultimate Shield: End-to-End Encryption

No matter where or how a Man-in-the-Middle attack is executed—whether through ARP spoofing in a local coffee shop or BGP hijacking across the globe—the attacker still runs into a formidable cryptographic barrier.

If a website or app uses robust HTTPS, the data payload remains fully encrypted. Even if an attacker successfully reroutes your traffic, they cannot read or alter it unless they can also trick your device into trusting a fake security certificate (which triggers immediate warnings on standard systems). Combined with defenses like HSTS and Certificate Transparency, the global transition to universal HTTPS and TLS remains one of the most effective defenses against MitM attacks in network history.