DEFCON 25 Marc Newlin CableTap Slides
DEFCON 25 Marc Newlin CableTap Slides
• 26 CVEs
• ISP-provided wireless gateways, set-top boxes, and voice remotes
• Cisco, Arris, Technicolor, Motorola, Xfinity (voice remote)
• Multiple unauthenticated RCE attack chains
• Network / application vulnerabilities
• Wi-Fi vulnerabilities
• ZigBee RF4CE vulnerabilities
Why does
CableTap matter?
2. RDK-based devices
3. Progression of research
AGENDA
4. Vulnerabilities
5. Disclosure process
6. Q&A
Background
on RDK.
REFERENCE DEVELOPMENT KIT (RDK)
• “a standardized software stack with
localization plugins created to
accelerate the deployment of next-gen
video products and services by
multichannel video providers
(MVPDs).”
• Founded in 2012
C
YAY OPEN SOURCE (?) SOFTWARE!
An open-source, community-driven
project available at:
https://code.rdkcentral.com/
L
RDK DEVICES
● RDK-V (Video)
○ set-top boxes
● RDK-B (Broadband)
○ gateways
GENERAL RDK FEATURES
Diagnostics
Security Subsystem
Media Framework
• Embedded Linux
• Lots of IO
• AV/Ethernet/Coax/USB/eSata
Modem Router
(Network (Application Gateway
Processor) Processor)
RDK-BROADBAND
• Two systems on one board Annotated dpc3939 internals here
• Intel Puma
L
Progression of Research
M
MARC LEARNS TO NETCAT
Project inspiration (Peter Geissler’s talk @ HITB)
Pulling off the filesystem using the previously disclosed web UI ping vuln
M
VULNS - HIDDEN HOME SECURITY WIFI
Home security service offered by many ISPs
Cross compiling for big-endian ARM and running a keygen binary on the gateway
M
VULNS - DHCP ACK CM MAC LEAK
1. Connect to “xfinitywifi” network
2. CM MAC of the wireless gateway is included in the DHCP ACK
3. Generate hidden home security network SSID and passphrase
M
VULNS - IPV6 MULTICAST CM MAC LEAK
1. Sniff the 802.11 channel used by the
target wireless gateway
M
VULNS - eMTA FQDN CM MAC LEAK
2001:0558:4011:0053:1122:33FF:FE44:5566
M
COMCAST VS PUBLIC INTERNET DEVICE ACCESS
M
XFINITY SEND-TO-TV
Xifinity customer signs in with their
account credentials
Web app accepts URL
Set-top box displays URL in a web browser
M
VULNS - XFINITY SEND-TO-TV / REMOTE WEB UI
Gateway web UI accepts remote
requests from Comcast
infrastructure
MSO login using the POTD
M
VULNS - FREE INTERNET
• Public wifi access points run by • MAC address is remembered
ISPs for future access
• e.g. “CableWiFi”, “xfinitywifi”, etc • Attacker can spoof the MAC
• AP’s are on customer equipment • Free Internet on other public access
points
or ISP equipment
• “xfinitywifi” usage does not count
• Customer logs into their ISP
toward a customer’s
account to get access
M
SEND-TO-TV ATTACK
DEMO
M
IT’S LIKE CGI, BUT FAST & W/ EXPLOITS
• FastCGI – successor to the Common Gateway Interface (CGI) protocol
• Authored in 1996
• Enables web servers to invoke other processes – birth of dynamic generation of web
content
C
PHP FASTCGI PROCESS MANAGER (PHP-FPM)
• PHP + FastCGI – what could
possibly go wrong?!
• Lets you reconfigure PHP settings
on every request
• HTTP POST data supplied via
STDIN FastCGI parameter
• If only there were abusable PHP
configuration values…
PIECING THINGS
• We can…
• Reconfigure the PHP interpreter to TOGETHER
include an arbitrary file
• Supply data to STDIN via HTTP
POST
37,449
binary residing within a web directory
C
A TWIST IN RDK’S PHPFPM
• No publicly-available documentation
as to how to do this – why was it
removed?
C
SYSEVENTD – RCE AS A SERVICE (RAAS)
• Binary protocol listener on TCP
52,367 (all interfaces)
• No auth, no nothing!
C
SYSEVENTD USAGE
1. Create an event with a name and a binary to call upon event occurrence (name must be a file path)
1. Trigger the event by touching the event name file path and providing an argument
1. Binary is called with event name and arguments passed to command via execv
C
SYSEVENTD (AB)USAGE
• ???
/bin/bash –c “<commands to execute>”
• Profit
C
WHERE THE SYSEVENTD AT?!
C
A TALE OF TWO OPERATING SYSTEMS
C
I MAKE MY OWN ROUTES DAMMIT
• Atom OS has an interface allocated in
169.254.0.0/16 range for Dbus ip route add 169.254.0.1 via 10.0.0.254
C
SET-TOP BOX VULNS
L
REMOTE WEB INSPECTOR
Comparable to FireFox and Chrome DevTools, accessible from over the internet
L
ARBITRARY FILE READ
L
ROOT COMMAND EXECUTION
sudo make install
<?php
$name = $_POST["name"];
shell_exec("echo hello $name");
?>
VOICE REMOTE OVERVIEW
Emulate remote
L
RF4CE REMOTE FORCED OTA
4) OTA :)
L
Devices
& Disclosure
M
KNOWN AFFECTED DEVICES
Vendor Model Type Tested ISP CVE Count
M
DISCLOSURE TIMELINE
03/27/2017 Group 1 Vendor Disclosures
M
REMEDIATION AND MITIGATION
Unauthenticated RCE attack chains affecting Comcast XFINITY devices have been
remediated
Customers of other ISPs should contact their ISP to determine if their hardware is
affected by CableTap
M
FINAL REMARKS
We found a substantial number of vulns, but the most severe have been patched
(hooray!)
M
Q&A
Thank you for watching our talk :)