☼
⌃
☰

Man-in-the-Middle Attack

Table of Contents

Man-in-the-Middle Attack


Description

A Man-in-the-Middle (MITM) attack is an attack model where the attacker positions themselves between two legitimate parties (like a user and a website server) to secretly monitor or modify the communication between them. The two endpoints are unaware that their dialogue is being compromised.

Purpose and Impact

The primary goal of a MITM attack is to violate the Confidentiality and/or Integrity of the communication:

  1. Eavesdropping (Disclosure): Stealing sensitive information like login credentials, credit card numbers, and private messages.
  2. Data Alteration (Integrity Violation): Changing the content of the communication in real-time. For example, altering a recipient's bank account details in a wire transfer request.

How It Works

A MITM attack typically involves three main phases:

  1. Interception: The attacker must first reroute the traffic. Common techniques include:
    • ARP Poisoning: On a local network, the attacker sends forged ARP (Address Resolution Protocol) messages to associate their own MAC address with the IP addresses of the legitimate parties (e.g., the default gateway).
    • DNS Spoofing: Altering DNS records to direct users to a server controlled by the attacker.
    • Public Wi-Fi Sniffing: Setting up a rogue access point that appears legitimate.
  2. Decryption (if necessary): If the traffic is encrypted (e.g., HTTPS), the attacker must decrypt it. Techniques often involve tricking the victim's browser into accepting a fraudulent SSL/TLS certificate issued by the attacker (SSL stripping).
  3. Relaying and Modification: The attacker acts as a proxy, maintaining separate connections with both the client and the server, reading the data in transit, potentially modifying it, and then forwarding it.

Examples