Stateful Fuzzing of Wireless Device Drivers in an Emulated Environment
Sylvester Keil Clemens Kolbitsch Tokyo 25 October 2007
sk [at] seclab [dot] tuwien [dot] ac [dot] at ck [at] seclab [dot] tuwien [dot] ac [dot] at
Stateful Fuzzing of Wireless Device Drivers in an Emulated - - PowerPoint PPT Presentation
Stateful Fuzzing of Wireless Device Drivers in an Emulated Environment Tokyo 25 October 2007 Sylvester Keil sk [at] seclab [dot] tuwien [dot] ac [dot] at Clemens Kolbitsch ck [at] seclab [dot] tuwien [dot] ac [dot] at About us We are
sk [at] seclab [dot] tuwien [dot] ac [dot] at ck [at] seclab [dot] tuwien [dot] ac [dot] at
http://www.seclab.tuwien.ac.at http://www.sec-consult.com research [at] sec-consult [dot] com
802 Overview and architecture 802.1 Management 802.3 MAC 802.3 PHY 802.2 Logical link control (LLC) 802.11 MAC 802.11 PHY 802.11 PHY 802.11 PHY Data link layer Physical layer
– (Not) authenticated and (not) associated
– Control, Data and Management frames
– Master, Managed, Ad-hoc (and Monitor)
FC ID SQ FCS Address 1 Address 2 Address 3 Address 4 Body 2 2 2 6 4 6 6 6 2312 Protocol Type Subtype To DS From DS More Frag Retry Pwr Mgmt More Data WEP Order MAC Header (30 byte) MAC Frame Control (16 bit) Type 00 … Management Frames Type 01 … Control Frames Type 10 … Data Frames
Independent BSS (ad-hoc) Infrastructure BSS (managed / master)
STA STA STA STA STA STA AP
State 1 Class 1 State 2 Class 1 & 2 State 3 Class 1, 2 & 3
Successful Authentication DeAuthentication Notification Successful Association
Reassociation Disassociation Notification
1
Beacons
2
Probe Request
3
Probe Response
4
Authentication
5
Authentication
6
Association Request
7
Association Response
Type Length Value
Length
Time-stamp Beacon Interval Capability Information
FC ID 0x00 FCS Source Destination BSSID
0x0 (ID) 0x9 (Len) ‘My Network’ (SSID) 0x1 (ID) 0x8 (Len) 11.0 (B) … 54.0 (B) (Supported Rates) 0x3 (ID) 0x1 (Len) 0x9 (Freq)
States Frame type Potentially interesting fields 1, 2, 3 Beacon SSID, TIM, Country Info, Extended Rates 1 Probe Request (Ad-hoc only) 1, 2, 3 Probe Response SSID, Supported Rates, Country Info, FH Pattern, Extended Supporetd Rates, RSN 1 Authentication 2 Association Request (Ad-hoc only) 2 Association Response Supported Rates 3 Re-association, Disassociation 3 Data 2, 3 Encryption
– Eliminate timing contraints – Replace unstable wireless medium – Allow guaranteed delivery – Support advanced target monitoring
– Move target into a virtual environment!
driver)
mapped data regions
regions
Virtual Device MadWifi OpenHAL Prototype Analysis: module initialisation & Hardware setup
QEMU Computer MadWifi OpenHAL Virtual Device Atheros Device Automatically generated add-on to MadWifi OpenHAL Virtual device records all memory access of device & its current answers. Log is automatically converted to C- source that invokes read/write commands on real device and stores results in /var/log/msg. Manually find differences between
device. Adaptation of virtual device code.
queue
QEMU
CPU MMU Ethernet …
802.11 Fuzzer
Shared Memory
PCI ID: 168c:0013 (rev01) Atheros Communications, Inc. AR5212 802.11abg NIC (rev 01)
Reply (RM) Inject (IM)
Dumper [RM]: store outgoing packets Listener [RM]: display outgoing packets Injector [IM]: inject arbitrary packets Stateless Fuzzer [IM]: reply directly Access Point [RM] & [IM] Stateful Fuzzer [RM] & [IM]: AP and Fuzzer
Laurent Butti. “Wi-Fi Advanced Fuzzing” Black Hat, Europe 2007 Fabrice Bellard. “QEMU, a Fast and Portable Dynamic Translator” USENIX 2005 Annual Technical Conference Wireshark http://www.wireshark.org QEMU http://www.qemu.org AutoIt http://www.autoitscript.com
Christopher Kruegel Engin Kirda http://www.seclab.tuwien.ac.at Bernhard Müller http://www.sec-consult.com