Tunnelpocalypse: The Coming Tunnel Spoofing DDoS Doomsday
This talk demonstrates a vulnerability in network devices that allows attackers to bypass access control lists (ACLs) and perform IP spoofing by encapsulating malicious traffic within tunneling protocols. The vulnerability affects devices that automatically de-encapsulate GRE, IP-in-IP, 6in4, 4in6, and GUE traffic, even when no tunnel interface is explicitly configured. The speaker highlights how this can be exploited to bypass security filters, corrupt logs, and facilitate DDoS amplification attacks. The talk includes a demonstration of nested encapsulation and provides tools for identifying vulnerable devices.
Tunneling Protocols Are Being Weaponized to Bypass ACLs and Spoof Traffic
TLDR: Researchers at KU Leuven have uncovered a critical vulnerability in how common network devices handle encapsulated traffic, allowing attackers to bypass Access Control Lists (ACLs) and spoof IP addresses. By wrapping malicious packets in protocols like GRE, IP-in-IP, or GUE, an attacker can trick routers into de-encapsulating and forwarding traffic that should have been blocked. This technique effectively turns vulnerable routers into open relays for spoofed traffic, enabling sophisticated DDoS attacks and security filter evasion.
Network security often relies on the assumption that the edge of the network is the only place where traffic filtering matters. We spend hours configuring ACLs on our perimeter routers, confident that if we block unauthorized traffic at the ingress, our internal infrastructure is safe. That assumption is fundamentally flawed. The research presented at DEF CON 2025 by Angelos Beitis and Mathy Vanhoef, titled Haunted by Legacy, proves that the very protocols we use for network virtualization and connectivity are being used to bypass these security controls.
The Mechanics of the Tunneling Bypass
The core issue is that many network devices, including enterprise-grade routers from major vendors and common ISP home routers, are programmed to be "helpful." When a router receives a packet encapsulated in a protocol like GRE, IP-in-IP, or GUE, it often attempts to de-encapsulate it to inspect or route the inner payload.
Crucially, many of these devices perform this de-encapsulation even if no tunnel interface is explicitly configured. An attacker can craft a packet where the outer header is legitimate, but the inner, de-encapsulated header contains a spoofed source IP. Once the router strips the outer layer, it treats the inner packet as if it originated from a trusted source, effectively bypassing any ACLs that were meant to filter traffic based on the original source IP.
This is not just a theoretical concern. The researchers demonstrated that you can nest these encapsulations. By wrapping a packet in multiple layers of GRE, you can force a router to perform recursive de-encapsulation. In their live demo, they successfully sent a ping to Google by nesting 61 layers of encapsulation. This allows an attacker to bounce traffic through multiple vulnerable nodes, making it nearly impossible for a defender to trace the true origin of the attack.
Why This Matters for Pentesters
If you are performing a red team engagement or a penetration test, this is a massive blind spot. Most vulnerability scanners look for open ports or known CVEs, but they rarely test how a device handles malformed or nested tunnel headers.
During an engagement, you should be testing the resilience of your client's perimeter against spoofed encapsulated traffic. You can use the test-spoof script to verify if a specific IP address on the network is vulnerable to this type of manipulation. If you find a device that de-encapsulates traffic without a configured tunnel, you have found a path to bypass OWASP A01:2021-Broken Access Control.
The impact is significant. Beyond simple DDoS amplification, this technique can be used to bypass SNMP-based access controls. If a router is configured to only accept SNMP traffic from a specific management IP, an attacker can encapsulate their malicious SNMP request in a GRE tunnel, spoofing the management IP in the inner header. The router will de-encapsulate the packet, see the "trusted" management IP, and process the request.
Identifying and Mitigating the Risk
Defenders need to stop assuming that their routers are only processing traffic they explicitly configured. The first step is visibility. Shadowserver provides free reports that can help you identify if your network has exposed, vulnerable hosts. For internal monitoring, you need to look at your traffic logs with a critical eye. If you are using an ELK stack to aggregate logs, you can use tools like Tattle Tale to analyze your NetFlow data and look for patterns indicative of spoofed encapsulated traffic.
Mitigation requires a two-pronged approach. First, contact your hardware vendors immediately to see if a patch is available to disable automatic de-encapsulation for unconfigured tunnels. Second, implement strict ACLs that explicitly define which source IPs are allowed to send encapsulated traffic to your routers. A sample configuration for a Cisco device might look like this:
ipv4 access-list PREVENT_TUNNEL_SPOOFING
10 permit gre host <Valid_Tunnel_Source> host <Router_IP>
20 permit ip host <Valid_Tunnel_Source> host <Router_IP>
30 deny ipv4 any host <Router_IP>
40 permit ipv4 any any
This configuration ensures that only known, trusted sources can initiate a tunnel to your router, dropping all other encapsulated traffic before it can be de-encapsulated.
The era of trusting the network layer to handle security implicitly is over. As we continue to rely on complex tunneling protocols for modern infrastructure, we must treat these protocols as potential attack vectors. If your routers are blindly de-encapsulating traffic, you are not just running a network; you are running an open relay for anyone who knows how to wrap a packet. Stop waiting for a vendor advisory and start auditing your edge devices today.
Vulnerability Classes
Target Technologies
Attack Techniques
OWASP Categories
Up Next From This Conference
Similar Talks

Unmasking the Snitch Puck: The Creepy IoT Surveillance Tech in the School Bathroom

Tor: A Decade of Lessons




