Security Analysis of Residential Gateways and ISPs
This talk demonstrates techniques for compromising residential gateways and ISP infrastructure, including bypassing TrustZone and exploiting command injection vulnerabilities in management interfaces. The research focuses on the security of embedded systems, specifically residential gateways and their associated remote management protocols like TR-069. The speaker highlights the prevalence of insecure coding practices and the lack of modern hardening in these devices, which can lead to large-scale network compromise. The presentation includes a demonstration of extracting cryptographic material and achieving remote code execution on target devices.
Breaking Residential Gateways: From Hardware Access to ISP Network Domination
TLDR: This research exposes how insecure coding practices and lack of hardware hardening in residential gateways allow attackers to bypass OWASP A07:2021 – Identification and Authentication Failures. By exploiting command injection vulnerabilities and extracting cryptographic material from Broadcom-based SoCs, attackers can achieve remote code execution and potentially compromise ISP infrastructure. Pentesters should prioritize auditing management interfaces and investigating hardware-level debug ports on these devices during engagements.
Residential gateways are the most overlooked attack surface in modern networking. While we obsess over cloud misconfigurations and zero-day exploits in enterprise software, millions of households and small businesses rely on ISP-provided hardware that is often running firmware from a decade ago. This research demonstrates that these devices are not just entry points into a home network; they are gateways into the service provider’s infrastructure itself.
The Hardware-to-Software Pipeline
Analyzing these devices requires a systematic approach that bridges the gap between physical hardware and network-level exploitation. The first step is often identifying debug interfaces. If you find a UART port, you are halfway to a shell. However, many modern gateways are hardened against simple serial access. When physical debugging is locked down, the focus shifts to the flash memory.
Extracting firmware from a device often involves interacting with the flash chip directly. If you are lucky, the chip is accessible via standard protocols like SPI. If the manufacturer has implemented Full Disk Encryption (FDE) or relies on TrustZone to protect keys, you cannot simply dump the chip and run binwalk to extract the filesystem. You have to find the vulnerability in the boot process.
In one case study, the research identified a flaw where the bootloader could be forced into a rescue mode. By interrupting the data lines on the flash chip during the boot sequence, an attacker can prevent the device from loading the encrypted OS and instead force it to dump its contents. This is where the "solder-UART-to-root" technique remains king. Even without a datasheet, you can often identify the pinout by observing the board layout and using a multimeter to find ground and VCC.
Exploiting the Management Plane
Once you have the firmware, the real work begins. Most residential gateways expose a management interface, often using TR-069 (CWMP), which is designed to allow ISPs to push configuration updates. This is a massive attack vector. If you find a command injection vulnerability in the web-based management interface, you can often escalate privileges to root.
The research highlighted a critical command injection bug in an SDK used by multiple vendors. The vulnerability existed in a CGI script intended for CLI interaction. Because the input was not properly sanitized before being passed to a system call, an attacker could inject arbitrary commands.
# Example of a command injection payload targeting a CGI parameter
POST /cgi-bin/cgi_main.cgi HTTP/1.1
...
ntp-example.com;uname -a
This is a classic example of OWASP A03:2021 – Injection. The impact is total device compromise. Once you have root, you can extract the 802.1x credentials used to authenticate the gateway with the ISP. With those credentials, you can effectively "bring your own GPON" device, potentially bypassing ISP-imposed restrictions or gaining unauthorized access to the provider's network segments.
The Stealth Mode Fallacy
One of the most interesting findings was the misuse of "stealth mode" features in the SDK. Vendors often implement features to block ICMP requests to make the device appear invisible to scanners. However, the implementation was flawed. The code blocked ICMP Type 8 (Echo Request) but failed to account for other ICMP types, such as Type 13 (Timestamp) or Type 5 (Redirect).
By sending these alternative ICMP packets, an attacker can still elicit a response from the target, effectively bypassing the stealth configuration. This is a perfect example of why security through obscurity—or in this case, security through incomplete filtering—fails. If you are testing a gateway, do not rely on standard ping sweeps. Use tools like nmap to send a variety of ICMP types to see if the device leaks information despite its "stealth" settings.
Defensive Realities
Defending these devices is an uphill battle. For end-users, the best advice is to treat the ISP-provided gateway as an untrusted device. If you are serious about security, place your own firewall behind the gateway and configure the ISP device in "bridge mode" or "modem mode" to disable its routing and management features.
For the OEMs and SoC vendors, the path forward is clear but difficult. They must move beyond legacy codebases. Implementing hardware-backed secure boot is non-negotiable. Furthermore, they need to adopt defensive programming practices that assume the input from the management interface is malicious. If a function is intended for internal CLI use, it should never be reachable via a web-based CGI script.
The industry needs to stop treating residential gateways as "set and forget" hardware. They are complex, embedded Linux systems that require the same level of vulnerability management as any other server. Until vendors prioritize supply chain security and provide a mechanism to verify the integrity of the running firmware, these devices will remain the soft underbelly of the internet. If you are on an engagement and see a residential gateway, don't ignore it. It might be the easiest path to the network's core.
Vulnerability Classes
Tools Used
Target Technologies
Attack Techniques
OWASP Categories
Up Next From This Conference

BestFit: Unveiling Hidden Transformers in Windows ANSI

Wi-Fi Calling: Revealing Downgrade Attacks and Not-so-private Private Keys

The CVSS Deception: How We've Been Misled on Vulnerability Severity
Similar Talks

Inside the FBI's Secret Encrypted Phone Company 'Anom'

Kill List: Hacking an Assassination Site on the Dark Web

