Practical Attacks on DOCSIS



Similar documents
Ajay Gummalla-July 2001

Client Server Registration Protocol

Wireless Networks. Welcome to Wireless

SY system so that an unauthorized individual can take over an authorized session, or to disrupt service to authorized users.

12/3/08. Security in Wireless LANs and Mobile Networks. Wireless Magnifies Exposure Vulnerability. Mobility Makes it Difficult to Establish Trust

Security Protocols HTTPS/ DNSSEC TLS. Internet (IPSEC) Network (802.1x) Application (HTTP,DNS) Transport (TCP/UDP) Transport (TCP/UDP) Internet (IP)

Channel Bonding in DOCSIS 3.0. Greg White Lead Architect Broadband Access CableLabs

Lecture Objectives. Lecture 8 Mobile Networks: Security in Wireless LANs and Mobile Networks. Agenda. References

Key Hopping A Security Enhancement Scheme for IEEE WEP Standards

Security Protocols/Standards

WLAN Attacks. Wireless LAN Attacks and Protection Tools. (Section 3 contd.) Traffic Analysis. Passive Attacks. War Driving. War Driving contd.

7 Network Security. 7.1 Introduction 7.2 Improving the Security 7.3 Internet Security Framework. 7.5 Absolute Security?

INF3510 Information Security University of Oslo Spring Lecture 9 Communication Security. Audun Jøsang

Applying of Security Mechanisms to Low Layers of OSI/ISO Network Model

Security (WEP, WPA\WPA2) 19/05/2009. Giulio Rossetti Unipi

Message Authentication Codes

Chapter 8 Network Security. Slides adapted from the book and Tomas Olovsson

Network Security Fundamentals

Cable Modems. Definition. Overview. Topics. 1. How Cable Modems Work

APNIC elearning: Network Security Fundamentals. 20 March :30 pm Brisbane Time (GMT+10)

Introduction to WiFi Security. Frank Sweetser WPI Network Operations and Security

Network Security Part II: Standards

Message authentication and. digital signatures

Wireless Security: Token, WEP, Cellular

CS 326e F2002 Lab 1. Basic Network Setup & Ethereal Time: 2 hrs

IPsec Details 1 / 43. IPsec Details

Overview. Securing TCP/IP. Introduction to TCP/IP (cont d) Introduction to TCP/IP

MAC. SKE in Practice. Lecture 5

Objectives. Remote Connection Options. Teleworking. Connecting Teleworkers to the Corporate WAN. Providing Teleworker Services

Transport Level Security

Recent advances in IPv6 insecurities Marc van Hauser Heuse Deepsec 2010, Vienna Marc Heuse

Linux Network Security

Security+ Guide to Network Security Fundamentals, Third Edition. Chapter 6. Wireless Network Security

Packet Sniffing and Spoofing Lab

A Very Incomplete Diagram of Network Attacks

Virtual Private Networks

Security in IEEE WLANs

Outline. CSc 466/566. Computer Security. 18 : Network Security Introduction. Network Topology. Network Topology. Christian Collberg

Session Hijacking Exploiting TCP, UDP and HTTP Sessions

VoIP Security. Title: Something Old (H.323), Something New (IAX), Something Hallow (Security), & Something Blue (VoIP Administrators)

Ethernet. Ethernet. Network Devices

The next generation of knowledge and expertise Wireless Security Basics

Broadband Cable Service Deployment at WorldCall Telecom - Pakistan. Hassan Zaheer Manager Operations Broadband Division

Application Note: Onsight Device VPN Configuration V1.1

EXAM questions for the course TTM Information Security May Part 1

Security in IPv6. Basic Security Requirements and Techniques. Confidentiality. Integrity

Karsten Nohl, Breaking GSM phone privacy

CYBER ATTACKS EXPLAINED: PACKET CRAFTING

Bluetooth Packet Sniffing Using Project Ubertooth. Dominic Spill

Security (II) ISO : Security Architecture of OSI Reference Model. Outline. Course Outline: Fundamental Topics. EE5723/EE4723 Spring 2012

Chapter 6 CDMA/802.11i

SecureDoc Disk Encryption Cryptographic Engine

Message Authentication

Chapter 7 Transport-Level Security

Packet Sniffing on Layer 2 Switched Local Area Networks

Dashlane Security Whitepaper

CrashPlan Security SECURITY CONTEXT TECHNOLOGY

Cisco Cable Radio Frequency (RF) FAQs

WIRELESS SECURITY. Information Security in Systems & Networks Public Development Program. Sanjay Goel University at Albany, SUNY Fall 2006

HughesNet Broadband VPN End-to-End Security Enabled by the HN7700S-R

The Trivial Cisco IP Phones Compromise

Chapter 17. Transport-Level Security

Authentication applications Kerberos X.509 Authentication services E mail security IP security Web security

All vulnerabilities that exist in conventional wired networks apply and likely easier Theft, tampering of devices

Accellion Secure File Transfer Cryptographic Module Security Policy Document Version 1.0. Accellion, Inc.

Packet Sniffers Submitted in partial fulfillment of the requirement for the award of degree Of MCA

Overview. SSL Cryptography Overview CHAPTER 1

Build Your Own Security Lab

Mobile Security. Practical attacks using cheap equipment. Business France. Presented the 07/06/2016. For. By Sébastien Dudek

CONNECTING THE RASPBERRY PI TO A NETWORK

LAB THREE STATIC ROUTING

13 Virtual Private Networks 13.1 Point-to-Point Protocol (PPP) 13.2 Layer 2/3/4 VPNs 13.3 Multi-Protocol Label Switching 13.4 IPsec Transport Mode

Authentication requirement Authentication function MAC Hash function Security of

A Transport Protocol for Multimedia Wireless Sensor Networks

Protocol Rollback and Network Security

Wireless Security: Secure and Public Networks Kory Kirk

CM500 High Speed Cable Modem User Manual

co Characterizing and Tracing Packet Floods Using Cisco R

Waspmote Encryption Libraries. Programming guide

Security vulnerabilities in the Internet and possible solutions

Security of IPv6 and DNSSEC for penetration testers

Analyzing 6LoWPAN/ZigBeeIP networks with the Perytons Protocol Analyzer May, 2012

ETHERNET WAN ENCRYPTION SOLUTIONS COMPARED

Sync Security and Privacy Brief

Security in Wireless and Mobile Networks

COMBATING SECURITY RISKS ON THE CABLE IP NETWORK

Secure Sockets Layer

Fundamentals of the Internet 2009/ Explain meaning the following networking terminologies:

An Overview of ZigBee Networks

Einführung in SSL mit Wireshark

Linux Access Point and IPSec Bridge

Acano solution. Security Considerations. August E

Topics in Network Security

1. LAB SNIFFING LAB ID: 10

Network Security. Computer Networking Lecture 08. March 19, HKU SPACE Community College. HKU SPACE CC CN Lecture 08 1/23

Packet Sniffer Detection with AntiSniff

Transcription:

Practical Attacks on DOCSIS

Who am I? @drspringfield Security researcher at Accuvant Work in embedded device security, reverse engineering, exploit dev No background in DOCSIS, but I find it interesting

DOCSIS Data Over Cable Service Interface Specification RF protocol stack underneath IP It s how your cable modem accesses the internet This presentation focuses on DOCSIS, not cable modems Applicable in US, Europe (layer 1 differences), Japan

Motivation DOCSIS attack range Wifi attack range

Network overview Cable modem termination system = CMTS Coax/fiber network = HFC Cable Modem = CM Router = CPE

Protocol overview IP BPKM Packet PDU Other MAC Management MPEG-TS MAC PMD Downstream PHY (1 to many, 64/256 QAM) Upstream PHY (many to 1, TDMA, QPSK / 16-64 QAM, return frequencies )

Protocol overview MPEG-TS Fixed size packets PID is 0x1FFE for DOCSIS Desegmentation occurs here

Protocol overview MAC Frame control determines packet type Extended header supports TLVs

How to access? Downstream 1. Hacked cable modem Model-specific, clunky 2. SDR 3. Dedicated hardware Cheap, ready to go

Clear QAM dongle MyGica USB QAM HDTV tuner $29 on Amazon Supported out of the box by Linux DVB API Truly plug and play Order one now!

How to access? 1. Hacked cable modem Upstream Hacked CMTS? Expensive, highly model-specific 2. SDR Best/only option 3. Dedicated hardware Doesn t exist (that I know of)

DOCSIS SEC / BPI+ You didn t think it was all in the clear did you? DOCSIS SEC/BPI+ Encryption and authentication protocol in DOCSIS BPI (Baseline Privacy Interface) in DOCSIS 1.0 BPI+ in DOCSIS 1.1 and 2.0 SEC (Security) in DOCSIS 3.0

DOCSIS SEC / BPI+ Encrypted Key Management IP BPKM Packet PDU Other MAC Management MAC Downstream PHY / MPEG-TS Upstream PHY, PMD

BPKM Baseline Privacy Key Management Client/server key synchronization protocol Operates on SAIDs (Security Association IDs) 14-bit random integers Authorization: Prevent cable theft and device spoofing by cryptographically identifying modems Don t care much (this talk is not about service theft) Traffic Encryption Key (TEK) provisioning Provisioning TEKs that encrypt customer traffic

BPKM Authorization Identification info serial#, MAC, CM s public key Certificate Authorization Key (RSA encrypted with CM s key) Key lifetime Security Capabilities (supported algorithms) Key sequence # SAID (initialized to zero) Attributes (cryptographic algorithm) Auth Request Auth Response

BPKM Authorization This request is rare One week lifetime* On CM boot This is where supported security capabilities are announced and selected Note that supported capabilities field is unsigned Downgrade attack possible?

Algorithms Encryption algorithms 40-bit DES 56-bit DES 128-bit AES (added in DOCSIS 3.0) Data authentication None

BPKM TEK provisioning Identification info serial#, MAC, CM s public key Auth key sequence # Auth key sequence # SAID SAID current/next TEK parameters 3DES encrypted TEK, lifetime, seq #, IV SHA1 HMAC (key derived from Auth Key) Key Request SHA1 HMAC (key derived from Auth Key) Key Response

BPKM TEK provisioning More frequent New TEK 6 hours* TEK is protected with Auth key-derived KEK IV is in the TEK parameters Only 1 IV is used for the lifetime of TEK Chaining is re-initialized with each frame

Packet PDU encryption (almost* all Packet PDUs) MAC header Destination/ Source MAC addresses Protocol Type IP CRC Contains Extended Header identifying Encryption enabled and SAID Encrypted with TEK using CBC with residual block termination

Problems with DOCSIS SEC Use of 56-bit DES DOCSIS 3.0 adds support for AES Never seen AES used* Lack of use likely due to DOCSIS 2.0 support CMTS are not picking most secure cryptographic algorithm supported by CM

Problems with DOCSIS SEC Re-use of CBC IV in each frame Required by specification Identical packets will have identical ciphertext

Exploiting these vulnerabilities First focused on attacks performable with passive downstream read access only Reduced cost and complexity to perform No significant chance of detection Doesn t even require being a subscriber

DOCSIS DES brute force 1. Identify the victims 2. Obtain tuples for each victim (X, E(X)) 3. Brute-force DES key to determine X from E(X) If X static, time/memory tradeoff possible

Identifying the victims Packet PDU exposes source & destination MAC addresses in clear ARP traffic is in the clear IP registration occurs prior to encryption/ authentication (in normal provisioning flow) Unless EAE enabled (Early Authentication & Encryption) Never seen this enabled*

Identifying the victims Sniff ARP traffic on downstream and collect subnets Send ICMP ping sweeps across subnets with various packets sizes Irrelevant how victim CPE responds Perform correlation between encrypted packet sizes and sent ICMP packet length Produce (MAC, IP) tuples

Obtaining known plaintext values Send ping containing known data PlainN CBC CipherN CipherN-1 Re-send identical packet but change Plain N = Cipher N-1 Subsequent Cipher N = E(Cipher N-1 Cipher N-1 ) = E(0) Sniffing lossy due to channel bonding

Brute-forcing 56-bit DES Attacking 56-bit DES is not new EFF DES Cracker (1998) Moxie Marlinspike (2012) for MS-CHAPv2 using FPGAs Karsten Nohl (2013) for SIM cards using rainbow tables Sergey Gordeychik/Alex Zaitsev (2014) reproducing Karsten s attack using FPGAs

DOCSIS use-case DES TEKs are only useful for 6 hours of traffic Ideally, cracking DES TEKs should be cheap, fast (<6hrs), and repeatable Some upfront cost is acceptable

Existing DES attack platforms Implementer Upfront cost Crack time Karsten ~ EUR 1500 1 minute Moxie? 23 hours Sergey/Alex ~$1400 3.4 days

My attack platform Uses rainbow tables for time/memory tradeoff since E(0) Created with Amazon EC2, tables stored in S3 Total upfront EC2 cost was around $2000 (across ~3 weeks) on GPU spot instances Cracking cost is $0.22, takes 23 minutes Assuming spin-up time is amortized

DES rainbow tables 16 rainbow tables, 64gb apiece (1 tb total) Each chain represents 1048576 DES operations (1 MegaDES) E(0,Imm1) Start E(0,Start) Imm1 End E(0,ImmN-1) DES Reduce DES Reduce Keep start and end only

Attack platform systems: generation RTGen GPU+CPU instances creating work units Each work unit is 1 TeraDES Massively parallelized Assimilator Memory-optimized instance Sorts and uniques work unit chains (by endpoint) into finished tables Each finished table is 64gb, and represents 4 PetaDES

Attack platform systems: cracking Cracker GPU instance (one for each table index) Does precalculation : calculate every possible chain endpoint that would contain E(X) Takes 20 minutes Table Lookup Memory instance (one for each table index) Looks up all precalculated chain endpoints in final table For each found, walks chain from start point to find cleartext X Takes ~3 minutes

Success probability Due to reduction step, cracking success is not guaranteed Probability of two ciphertexts reducing to the same key is 255/2**56 Unless collision occurs at same position, chains will not merge This is because position is used in reduction function In practice, about 4% endpoint collisions in a table part

Notes on performance Use bit slicing to do N parallel DES operations N depends on GPU (32) vs CPU (128) Each DES bit is represented in a single variable This makes permutation (bit-shuffling) operations free, which are otherwise costly on CPUs Bits in the variable represent DES operations occurring in parallel Data Bit X Key 0 Key 1 Key 2 Key 3 Key 4 Key N Replace typical reduction algorithm (addition) with bitslice-friendly (xor) to avoid serializing bits between steps

IV recovery Cracking only reveals key, what about IV? Only in BPKM Key Reply Ignoring it is OK, since you only lose the first block, but Wireshark won t like your pcaps Heuristic recovery 0800 45 00 05dc

Video Demo

Decryption oracle attacks Two theoretical attacks that are nearly practical Work regardless of encryption algorithm These will be more important after AES used Use the CMTS/CM + ICMP as a decryption oracle This is an active attack, and only available for TEK lifetime Requires functional ICMP to/from victim Requires being a subscriber

Decryption oracle 1) Echo 4) Echo 2) Echo Reply 3) Echo Reply attacker victim

Decryption oracle CM Oracle: Downstream injection 4) Echo Reply 3) Echo Reply 2) Echo modify & reinject attacker victim

CM Oracle attack 1. Identify the victims, collect downstream encrypted payloads 2. Send ICMP echo to victim, collect encrypted ping request 3. Inject ICMP echo, but splice in desired payload Requires QAM modulator 4. Wait for echo response containing cleartext

CM Oracle attack MAC PDU IP ICMP Echo Placeholder Data Collected downstream to victim MAC PDU IP ICMP Echo Sniffed Encrypted Data Modified and re-injected downstream with modulator MAC PDU IP ICMP Echo Reply Received by attacker Decrypted Replayed Data

Injection feasibility There doesn t appear to be anything preventing this at the physical layer Requires specific hardware QAM modulator Lots of these available on ebay for all kinds of price points, starting at reasonable levels Likely require some level of hacking SDR

Decryption oracle CMTS Oracle: Upstream sniffing 4) Echo Reply 3) Echo Reply attacker modify & reinject victim

CMTS Oracle attack 1. Identify the victims, collect downstream encrypted payloads 2. Send ICMP echo to victim, collect upstream ping reply from victim Requires upstream sniffing capability 3. Spoofed upstream packet, but splice in desired payload Requires hacked cable modem 4. Wait for echo response containing cleartext

Upstream sniffing feasibility Requires sniffing upstream data Requires sniffing with SDR

Upstream spoofing on Ubee Telnet on 64623 as user/user for root access /proc/net/dbrctl/maxcpe number of CPE devices the modem will forward (default 1) /proc/net/dbrctl/addcpe write another MAC address here to start modem forwarding Read current TEK/IV from /dev/mem decrypt encrypted data with my TEK, expect modem to encrypt it back to original (?) SAID is not in upstream packet, but key version# is

CRC validation What about the encrypted CRC in the spliced packet PDU? We don t know what the correct CRC value is Brute force sucks CRC MAC PDU IP ICMP Echo solution Sniffed Encrypted Data 4b, resets CRC to what it would be after processing MAC header only, so spliced CRC still correct

Conclusions Your DOCSIS network is less safe than your wifi network Downstream sniffing is easy and decryption is possible Upstream sniffing is close Active attacks are plausible

Solutions Support AES immediately for 3.0 modems Support EAE Drop ICMP at the CMTS? Consider other traffic types that may be used for oracle Add data authentication!

Software Releases CableTables software Uses MyGica dongle (or equivalent) to perform DES cracking attack Supports local or cloud-based rainbow tables http://tiny.cc/cabletables Cloud DES Rainbow table generation software What I used to generate my DES rainbow tables in EC2 What I use for cloud-based cracking http://tiny.cc/cabletables_cloud

Obtaining the tables They are available to all AWS users Requestor Pays: you just pay for data transfer $0 to US East AWS region 1tb: ~$20 to other AWS region 1tb: ~$90 over the internet to your computer

Q&A