unified rf fuzzing under a common api
play

Unified RF Fuzzing Under a Common API: Introducing TumbleRF Matt - PowerPoint PPT Presentation

Troopers 2018 Unified RF Fuzzing Under a Common API: Introducing TumbleRF Matt Knight, Ryan Speers March 15, 2018 River Loop Security River Loop Security River Loop Security whois Troopers 2018 Matt Knight Ryan Speers Independent


  1. Troopers 2018 Unified RF Fuzzing Under a Common API: Introducing TumbleRF Matt Knight, Ryan Speers March 15, 2018 River Loop Security River Loop Security River Loop Security

  2. whois Troopers 2018 Matt Knight Ryan Speers Independent software, hardware, and Director of Research at Ionic Security • • RF engineer Co-founder at River Loop Security • Security Researcher at River Loop • Computer Science from Dartmouth • Security College BE in EE from Dartmouth College • Cryptography, embedded systems, • RF, SDR, PHYs, and embedded systems IEEE 802.15.4 • River Loop Security

  3. Background Troopers 2018 “Making and Breaking a Wireless IDS”, Troopers14 “Speaking the Local Dialect”, ACM WiSec Ryan Speers, Sergey Bratus, Javier Vazquez, Ray Jenkins, bx, Travis • Goodspeed, and David Dowd Idiosyncrasies in PHY implementations • Mechanisms for automating: RF fuzzing • Bug discovery • • PHY FSM fingerprint generation River Loop Security

  4. Agenda Troopers 2018 1. Overview of traditional fuzzing techniques (software and networks) 1. How these do and don’t easily map to RF 2. RF fuzzing overview and state of the art 3. Ideal fuzzer design 4. TumbleRF introduction and overview 5. TumbleRF usage example River Loop Security

  5. Troopers 2018 Traditional Fuzzing Techniques River Loop Security

  6. What is fuzzing? Troopers 2018 Measured application of pseudorandom input to a system Why fuzz? Automates discovery of crashes, corner cases, bugs, etc. • • Unexpected input  unexpected state River Loop Security

  7. What can one fuzz? Troopers 2018 Interfaces • I/O File format parsers • Network interfaces • River Loop Security

  8. Software Fuzzing State of the Art Troopers 2018 Abundant fully-featured software fuzzers • AFL / AFL-Unicorn Peach • Scapy • Software is easy to instrument and hook at every level What else can one fuzz? River Loop Security

  9. Fuzzing Hardware Troopers 2018 Challenges: • H/W is often unique, less “standard interfaces” to measure on May not be able to simulate well in a test harness • Some Existing Techniques: AFL-Unicorn: simulate firmware in Unicorn to fuzz • • Bus Pirate: permutes pinouts and data rates to discover digital buses JTAGulator: permutes pinouts that could match unlocked JTAG • … • River Loop Security

  10. Fuzzing RF Troopers 2018 WiFuzz • MAC-focused 802.11 protocol fuzzer Marc Newlin’s Mousejack research Injected fuzzed RF packets at nRF24 HID dongles while looking for USB • output isotope: IEEE 802.15.4 PHY fuzzer • River Loop Security

  11. Existing RF Fuzzing Limitations Troopers 2018 Fuzzers are siloed / protocol-specific Generally limited to MAC layer and up RF is hard to instrument – what constitutes a crash / bug / etc? Implicit trust in chipset – one can only see what one’s radio tells you is happening River Loop Security

  12. Trust and Physical Layer Vulnerabilities Troopers 2018 Not all PHY state machines are created equal! Radio chipsets implement RF state machines differently Differences can be fingerprinted and exploited • Initial results on 802.15.4 were profound • Specially-crafted PHYs can target certain chipsets while avoiding others • River Loop Security

  13. Troopers 2018 RF PHYs: A Primer River Loop Security

  14. How Radios Work Troopers 2018 Transmitter: digital data (bits)  analog RF energy discrete  continuous Receiver: analog RF energy  digital data (bits) continuous  discrete Receiving comes down to sampling and synchronization! River Loop Security

  15. Digitally Modulated Waveforms Troopers 2018 River Loop Security https://hackaday.com/2016/11/18/building-a-lora-phy-with-sdr/

  16. Digitally Modulated Waveforms Troopers 2018 Data Start of Frame Delimiter (SFD) / Sync Word Preamble River Loop Security https://hackaday.com/2016/11/18/building-a-lora-phy-with-sdr/

  17. RF PHY State Machines Troopers 2018 Seeking Preamble (Idle) Seeking SFD Present to MAC / Layer 2 Parser (Synchronizing) (optional) Check CRC Extract Length from Header Demodulate N River Loop Security Bits

  18. RF PHY State Machines Troopers 2018 Seeking Let’s dig in Preamble (Idle) Seeking SFD Present to MAC / Layer 2 Parser (Synchronizing) (optional) Check CRC Extract Length from Header Demodulate N River Loop Security Bits

  19. RF PHY State Machines Troopers 2018 Correlation = shift register clocking bits through at symbol rate looking for a pattern 1. Correlator looks for [1,0,1,0,…] Seeking 2. Correlator looks for [magic number] Preamble If found, a packet is on-air (Idle) Seeking SFD (Synchronizing) River Loop Security

  20. Sync Words and Magic Numbers Troopers 2018 Turns out not all sync words are created equally • 0x00000000 == 802.15.4 Preamble 0xA7 == 802.15.4 Sync Word • The isotope research showed some chipsets correlated on “different” preambles / sync words than others River Loop Security

  21. Sync Words and Magic Numbers Troopers 2018 Turns out not all sync words are created equally • 0x00000000 == 802.15.4 Preamble 0xA7 == 802.15.4 Sync Word • strategically malformed The isotope research showed some chipsets correlated on “different” preambles / sync words than others River Loop Security

  22. Sync Words and Magic Numbers Troopers 2018 Turns out not all sync words are created equally • 0x XXXX 0000 == 802.15.4 Preamble 0xA7 == 802.15.4 Sync Word • strategically malformed The isotope research showed some chipsets correlated on “different” preambles / sync words than others Short preamble? River Loop Security

  23. Sync Words and Magic Numbers Troopers 2018 Turns out not all sync words are created equally • 0x XXXX 0000 == 802.15.4 Preamble 0xA F == 802.15.4 Sync Word • strategically malformed The isotope research showed some chipsets correlated on “different” preambles / sync words than others Short preamble? Flipped bits in SFD? River Loop Security

  24. Troopers 2018 Fuzzing Shows the Way River Loop Security

  25. Troopers 2018 Ideal RF Fuzzer Design River Loop Security

  26. Ideal Features Troopers 2018 Extensible: easy to hook up new radios Flexible: modular to enable plugging and playing different engines / interfaces / test cases Reusable: re-use designs from one protocol on another Comprehensive: exposes PHY in addition to MAC River Loop Security

  27. Troopers 2018 TumbleRF River Loop Security

  28. Troopers 2018 TumbleRF Previously known as unfAPI (Un-Named Fuzzing API) River Loop Security

  29. TumbleRF Troopers 2018 Software framework enabling fuzzing arbitrary RF protocols Abstracts key components for easy extension River Loop Security

  30. TumbleRF Architecture Troopers 2018 Test Case Generator Harness Command Line Test Case Management Interface TX Interface (PHY Results Logging or MAC) River Loop Security

  31. Interfaces Troopers 2018 RF injection/sniffing functions abstracted to generic template To add a new radio, inherit base class and redefine its functions to map into any driver: [set/get]_channel() [set/get]_sfd() [set/get]_preamble() tx() rx_start() rx_stop() rx_poll() River Loop Security

  32. Generators Troopers 2018 Rulesets for generating fuzzed input (pythonically) Extend to interface with software fuzzers of your choice Implement 2 functions: yield_control_case() yield_test_case() Three generators currently: • Preamble length (isotope) Non-standard symbols in preamble (isotope) • Random payloads in message • River Loop Security

  33. Harnesses Troopers 2018 Monitor the device under test to evaluate test case results Manage device state in between tests Three handlers currently: Received Frame Check: listen for given frames via an RF interface • SSH Process Check: check whether processes on target crashed (beta) • • Serial Check: watch for specific ouptut via Arduino (beta) River Loop Security

  34. T est Cases Troopers 2018 Coordinate the generator, interface, and harness. Typically very lightweight. Extend BaseCase to implement run_test() or build upon others, e.g.: Extend AlternatorCase to implement: does_control_case_pass() throw_test_case() Alternates test cases with known-good control case to ensure interface is still up River Loop Security

  35. TumbleRF Architecture: Demo Setup Troopers 2018 Test Case Generator Harness Command Line Test Case Comparison Logic Management Interface RX Interface TX Interface (PHY Results Logging or MAC) River Loop Security

  36. Example Generated Data: Preamble Length Troopers 2018 Standard IEEE802.15.4 preamble: 0x00000000 Preamble SFD Length 0x00 0x00 0x00 0x00 0xA7 0xLL River Loop Security

  37. Example Generated Data: Preamble Length Troopers 2018 bypassed River Loop Security Arbitrary PHY injection via modified gr-ieee802-15-4

  38. Troopers 2018 Demo River Loop Security

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend