Man-in-the-middle (MITM) attacks represent one of the most insidious threats in network security. In these attacks, attackers position themselves between legitimate communication endpoints to intercept, modify, or redirect traffic. From a blue team perspective, detecting these attacks requires a multi-layered approach combining network monitoring, certificate validation, and behavioral analysis.
ARP Spoofing DNS Spoofing SSL StrippingARP (Address Resolution Protocol) maps IP addresses to MAC addresses in a local network. When a device wants to send data to another IP, it first asks: "Who has this IP?” The correct device replies with its MAC address.
In ARP spoofing, an attacker sends fake ARP replies to trick devices into associating the attacker’s MAC address with a legitimate IP, usually the default gateway. This allows the attacker to intercept, modify, or redirect traffic.
arp - You’ll see requests and replies (who-has and is-at) pointing to both ARP requests and responses. We can examine the results for any abnormal and repeated requests or responses.
Important Note: Press CTRL + ALT + 1 to fix the time displayed. arp.opcode == 1 - This shows all the ARP requests captured from different hosts.arp.opcode == 2 - Forged ARP poisoning typically uses unsolicited is-at replies (gratuitous/unasked replies). These are strong indicators. Let's look at the ARP responsearp.isgratuitous - A suspicious host sends many unsolicited (gratuitous) ARP replies, especially to multiple destinations. Repeated gratuitous ARPs can indicate an attacker maintaining their poison state.arp && arp.src.proto_ipv4 == 192.168.10.1 && eth.src == 02:aa:bb:cc:00:01 - We have the information about the IP and the MAC address associated with the gateway. Let's apply the following filter to examine the ARP traffic associated with the gateway arp.opcode == 2 && arp.src.proto_ipv4 == 192.168.10.1 - we can see some ARP replies pointing the Gateway's IP to the suspicious MAC address. The frequency of these ARP replies indicates that this is indeed an ARP spoofing. arp.opcode ==2 && _ws.col.info contains "192.168.10.1 is at" - Confirm the same result (come il filtro precedente) arp.opcode == 2 && arp.src.proto_ipv4 == 192.168.10.1 && eth.src == 02:fe[REDACTED] - The result clearly confirms that the attacker spoofs ARP arp.duplicate-address-detected || arp.duplicate-address-frame - This result indicates that the attacker successfully performed ARP spoofing and positioned himself between the victim and the gateway.DNS Spoofing (or DNS Cache Poisoning) è una tecnica di attacco informatico che mira a ingannare il sistema DNS per reindirizzare gli utenti verso siti falsi o controllati dall’attaccante, invece che verso quelli legittimi. Il DNS cache poisoning avviene quando un attaccante riesce a inserire informazioni DNS false nella cache di un server DNS.
dns - This will allow us to inspect requests/replies and notice abnormal volume or patterns.dns.flags.response == 1 && ip.src == 8.8.8.8 - Legitimate DNS servers (like Google’s 8.8.8.8) respond from a known external IP address. By filtering responses from this IP, we can see what normal answers look like for comparison.dns.flags.response==1 - we can hunt for responses from IP addresses other than the usual DNS serverdns && dns.qry.name == "corp-login.esempio-corp.local" - Let's now take a curious look at the DNS traffic for our domain of interestdns.flags.response == 1 && ip.src == 8.8.8.8 && dns.qry.name == "corp-login.esempio-corp.local" - The output also looks very much normal, as expected. dns.flags.response == 1 && ip.src != 8.8.8.8 && dns.qry.name == "corp-login.esempio-corp.local" - This is what DNS spoofing looks like. It shows a system within the network acts as a rogue DNS server, sending spoofed DNS responses.SSL stripping is a man-in-the-middle technique in which an attacker intercepts and modifies traffic to remove or prevent TLS encryption between a client and a server. This causes the client to communicate over HTTP instead of HTTPS. The attacker retains a secure (HTTPS) session with the server while relaying plain HTTP to the victim, enabling eavesdropping and credential capture.
tls || ssl - We start by isolating it using the following filter. This will allow us to inspect SSL requests and notice abnormal volumes or patterns. tls.handshake.type == 1 && tls.handshake.extensions_server_name == "corp-login.esempio-corp.local" - Let's apply the following filter to show the established TLS handshakes to our server, which proves the site normally uses TLS for communication. dns.flags.response == 1 && ip.src == 192.168.10.55 && dns.qry.name == "corp-login.esempio-corp.local" - Let's isolate DNS responses from the attacker to show the victim was pointed to the attacker's IP"http && ip.src == 192.168.10.10 && ip.dst == 192.168.10.55 - One of the main indicators of SSL stripping is that, after the spoof, the domain no longer performs TLS handshakes to the legitimate server, which validates the absence of TLS traffic from the victim to the real server. Let's apply the following filter on the server IP and the attacker IP