Funderbolt Adventures in Thunderbolt DMA Attacks Russ Sevinsky A - - PowerPoint PPT Presentation

funderbolt
SMART_READER_LITE
LIVE PREVIEW

Funderbolt Adventures in Thunderbolt DMA Attacks Russ Sevinsky A - - PowerPoint PPT Presentation

Funderbolt Adventures in Thunderbolt DMA Attacks Russ Sevinsky A Trip Down Memory Lanes A Trip Down Memory Lanes Background Thunderbolt Apple and Intel External Port PCI Express (PCIe) and DisplayPort using the same port


slide-1
SLIDE 1

Funderbolt

Adventures in Thunderbolt DMA Attacks

Russ Sevinsky

slide-2
SLIDE 2

A Trip Down Memory Lanes

slide-3
SLIDE 3
  • Background
  • Thunderbolt
  • Apple and Intel
  • External Port
  • PCI Express (PCIe) and DisplayPort using the same port
  • DMA
  • Direct Memory Access
  • Processor becomes bottleneck for high-speed transfers
  • Lets devices read and write directly to RAM

A Trip Down Memory Lanes

slide-4
SLIDE 4
  • Why external buses matter for security experts?
  • Digital Forensics
  • Getting data to solve a mystery
  • User protection
  • So RAM contents can be safe
  • Sneaky DRM
  • Bus encryption

A Trip Down Memory Lanes

slide-5
SLIDE 5
  • PCI Express (PCIe)
  • High-speed serial bus
  • Data sent via “lanes”
  • A Lane is made up of differential wire pairs
  • One + and one – wire offset a small amount
  • Helps reducing noise
  • One lane (x1) is made up of two differential pairs
  • Transmit pair (PET)
  • Receive pair (PER)

A Trip Down Memory Lanes

slide-6
SLIDE 6
  • PCIe (cont)
  • Four lanes (x4) has eight pairs, x8 has 16 pairs, etc…
  • All lanes use another differential pair for clock
  • REFCLK
  • So… x1 uses 6 wires for data communication
  • PET, PER and REFCLK
  • Data sent via “packets”
  • Point-to-point topology using Root Complex
  • Requests for devices and memory go to “root complex”

A Trip Down Memory Lanes

slide-7
SLIDE 7

A Trip Down Memory Lanes

slide-8
SLIDE 8
  • Mitigations
  • Epoxy (really?)
  • Input/Output Memory Management Units (IOMMUs)
  • Maps physical memory addresses to logical addresses
  • Think “VM for DMA”
  • Prevents devices from requesting physical addresses directly
  • Secure Configurations
  • Current attacks?
  • Daisy chaining Thunderbolt and Firewire
  • Inception

A Trip Down Memory Lanes

slide-9
SLIDE 9

How My Adventures Went

slide-10
SLIDE 10
  • Improvised Tools for Analysis
  • Multimeter
  • Soldering station
  • Heat gun
  • Desoldering tools
  • Ethernet cable
  • Epoxy (really?)
  • Logic Analyzer
  • Image Editor

How My Adventures Went

slide-11
SLIDE 11
  • Reversing Thunderbolt – The Process
  • Research a product
  • Take it apart
  • Trace all interesting chips
  • Look for datasheets
  • Sniff buses
  • Develop a map

How My Adventures Went

slide-12
SLIDE 12
  • Looking at consumer products
  • Buffalo MiniStation Thunderbolt/USB3 Hard Drive
  • 500GB and 1TB model
  • USB3 and Thunderbolt
  • Decent form factor for reversing
  • Apple Thunderbolt to Gigabit Ethernet Adapter
  • Tiny
  • Small
  • Little

How My Adventures Went

slide-13
SLIDE 13
  • External Hard Drive
  • Researching the product
  • Taking it apart
  • Tracing all interesting chips
  • Looking for datasheets
  • Sniffing buses
  • Developing a map

How My Adventures Went

slide-14
SLIDE 14
  • Excellent Anandtech review:
  • http://www.anandtech.com/show/6127/buffalo-

ministation-thunderbolt-review-an-external-with-usb-30- and-thunderbolt

  • Identified ICs for us!

How My Adventures Went

slide-15
SLIDE 15
  • Main ICs
  • MLDU03
  • Medial Logic USB3.0 to SATA 6G Bridge
  • ASM1061
  • ASMedia PCIe to SATA Controller
  • DSL2210 (Peak Ridge)
  • Intel Thunderbolt Controller
  • Supports PCIe x1
  • LPC1114
  • NXP ARM Cortex M0

How My Adventures Went

slide-16
SLIDE 16

How My Adventures Went

slide-17
SLIDE 17

How My Adventures Went

slide-18
SLIDE 18

How My Adventures Went

slide-19
SLIDE 19

How My Adventures Went

slide-20
SLIDE 20

How My Adventures Went

slide-21
SLIDE 21

How My Adventures Went

slide-22
SLIDE 22

How My Adventures Went

  • ASMedia ASM1061
  • PCIe/SATA Controller
  • Datasheets?
  • ROMs/Flashes?
slide-23
SLIDE 23

How My Adventures Went

slide-24
SLIDE 24

How My Adventures Went

slide-25
SLIDE 25

How My Adventures Went

  • Patch PCIe Controllers’ SPI ROM to send DMA read

requests?

slide-26
SLIDE 26

How My Adventures Went

  • NXP LPC1114
  • ARM Cortex M0
  • Used for… ??
  • No ROMs or Flashes
  • TONS of info
  • Connects into DSL2201
  • How do I know?
slide-27
SLIDE 27

How My Adventures Went

slide-28
SLIDE 28

How My Adventures Went

slide-29
SLIDE 29

How My Adventures Went

slide-30
SLIDE 30

How My Adventures Went

slide-31
SLIDE 31

How My Adventures Went

  • Intel DSL2210
  • Thunderbolt Controller
  • No Datasheets
  • Promo info only
  • ROMs/Flashes?
slide-32
SLIDE 32

How My Adventures Went

slide-33
SLIDE 33

How My Adventures Went

slide-34
SLIDE 34

How My Adventures Went

slide-35
SLIDE 35

How My Adventures Went

  • Thunderbolt Connector
  • 1 pair of High Speed lanes
  • TX and RX
  • All others pulled to ground
  • “LowSpeed” lines go into ARM’s UART?
slide-36
SLIDE 36

How My Adventures Went

slide-37
SLIDE 37

How My Adventures Went

slide-38
SLIDE 38

How My Adventures Went

slide-39
SLIDE 39

How My Adventures Went

  • ARM UART Traffic
  • String “EM “
slide-40
SLIDE 40

How My Adventures Went

  • Thunderbolt Firmware Update
  • Display contents of Application Package
  • Decompress “Payload” file
slide-41
SLIDE 41

How My Adventures Went

  • Two Firmwares for Thunderbolt?
  • One is probably ARM
  • Let’s look for string “EM “
slide-42
SLIDE 42

How My Adventures Went

Jackpot!

slide-43
SLIDE 43

How My Adventures Went

  • Round 2…
  • String “\x27\x0a\x00\x00“
slide-44
SLIDE 44

How My Adventures Went

Successaroo!

slide-45
SLIDE 45
  • Gigabit Ethernet Adapter
  • Researching the product
  • Taking it apart
  • Attack vectors

How My Adventures Went

slide-46
SLIDE 46

How My Adventures Went

slide-47
SLIDE 47

How My Adventures Went

slide-48
SLIDE 48

How My Adventures Went

slide-49
SLIDE 49

How My Adventures Went

slide-50
SLIDE 50

How My Adventures Went

slide-51
SLIDE 51

How My Adventures Went

slide-52
SLIDE 52

How My Adventures Went

slide-53
SLIDE 53

How My Adventures Went

  • Altera Cyclone IV GX Transceiver Starter Kit
  • Hard IP for PCIe
  • PCIe x1
  • ~$450
slide-54
SLIDE 54

How My Adventures Went

slide-55
SLIDE 55

How My Adventures Went

  • Tips and Tricks
  • Get A LOT of devices!
  • Heat up everything SLOWLY!
  • Continuity testing WINS
  • Sniff EVERYTHING
  • Read all ROMs/Flashes
slide-56
SLIDE 56
  • Russ Sevinsky
  • Security Consultant at iSEC Partners
  • rsevinsky@isecpartners.com
  • Special thanks to:
  • Jesse Burns
  • Everyone @ iSEC Partners

Thank You

slide-57
SLIDE 57

UK Offices

Manchester - Head Office Cheltenham Edinburgh Leatherhead London Thame

North American Offices

San Francisco Atlanta New York Seattle

Australian Offices

Sydney

European Offices

Amsterdam - Netherlands Munich – Germany Zurich - Switzerland