1
PowerFL: Fuzzing VxWorks embedded systems
Peter Goodman Artem Dinaburg Trent Brunson
PowerFL : Fuzzing VxWorks embedded systems Peter Goodman Artem - - PowerPoint PPT Presentation
PowerFL : Fuzzing VxWorks embedded systems Peter Goodman Artem Dinaburg Trent Brunson 1 Introductions Peter Goodman Artem Dinaburg Trent Brunson Senior Security Engineer Principal Security Engineer Director of R&D
1
Peter Goodman Artem Dinaburg Trent Brunson
Trail of Bits | QPSS 2019 | 16.05.2019
Peter Goodman
Senior Security Engineer peter@trailofbits.com
Artem Dinaburg
Principal Security Engineer artem@trailofbits.com
Trent Brunson
Director of R&D trent.brunson@trailofbits.com
2
2
Trail of Bits | QPSS 2019 | 16.05.2019
to fuzz PowerPC and Intel i386 VxWorks targets on commodity computers
automotive and SCADA systems)
3
Trail of Bits | QPSS 2019 | 16.05.2019
semi-automated bug-finding for embedded VxWorks targets is feasible
depending on the target
4
Trail of Bits | QPSS 2019 | 16.05.2019
machines to automatically find, exploit, and patch bugs
how/where the program reads input, etc.
and embedded systems (e.g. VxWorks) are a nightmare of variety
to real programs?
5
Trail of Bits | QPSS 2019 | 16.05.2019
attacker perspective is a priori unknown
6
Trail of Bits | QPSS 2019 | 16.05.2019
versions of VxWorks
and reliability of physical systems
unique, explosive, or unavailable
7
Trail of Bits | QPSS 2019 | 16.05.2019
configure what components are included
known amount of RAM, and a set of number of devices
the local file system
8
Trail of Bits | QPSS 2019 | 16.05.2019
whether the new input triggers a bug in the target
through the set of all possible inputs
9
Trail of Bits | QPSS 2019 | 16.05.2019
variety of CPUs and peripherals
handle a variety of processors.
execution and code coverage
10
Trail of Bits | QPSS 2019 | 16.05.2019
11
Trail of Bits | QPSS 2019 | 16.05.2019
12
the rationale behind our design decisions
need to rapidly develop a working prototype
Trail of Bits | QPSS 2019 | 16.05.2019
PowerPC architecture
PowerPC when we have a fuzzing capability
13
Trail of Bits | QPSS 2019 | 16.05.2019
execute in supervisor mode
runs in user mode
time in a fuzzing campaign
14
Trail of Bits | QPSS 2019 | 16.05.2019
15
Trail of Bits | QPSS 2019 | 16.05.2019
initiates its first I/O operation
16
Trail of Bits | QPSS 2019 | 16.05.2019
“semantic visibility” -- know what the guest is doing
17
Trail of Bits | QPSS 2019 | 16.05.2019
symbolized binary: string cross references, call graph structure, opcode sequences, and FLIRT signatures
18
Trail of Bits | QPSS 2019 | 16.05.2019
incomplete QEMU emulation support
problematic code, stub it out with function hooks
addresses as powerfl_suppress_N in symbol map file
19
Trail of Bits | QPSS 2019 | 16.05.2019
beyond” initialization of unsupported devices
pci-related functions, function names ending in “Init”
20
Trail of Bits | QPSS 2019 | 16.05.2019
the host file system into the guest file system?
21
Trail of Bits | QPSS 2019 | 16.05.2019
binaries not configured with virtual I/O driver support
the guest
“mounted” directory on host
22
Trail of Bits | QPSS 2019 | 16.05.2019
these transfers to count for spurious “new” coverage
interrupt service routines
coverage hash map if not executing in an interrupt handler
23
Trail of Bits | QPSS 2019 | 16.05.2019
continue going even if the target is logically “done” processing input
24
Trail of Bits | QPSS 2019 | 16.05.2019
Trail of Bits | QPSS 2019 | 16.05.2019
Goal: Speed up the fuzzer to do more executions per second
execute-snapshot reload cycles
every run, so QEMU should not re-translate (part of virtualization) the target machine code that it can take from a prior run
machine code to QEMU TCG
26
Trail of Bits | QPSS 2019 | 16.05.2019
Goal: Make it easier to adopt a new embedded system
and devices needed by target software
decreasing integration effort over time as synergies are recognized
stub out code that initializes or interacts with devices
27
Trail of Bits | QPSS 2019 | 16.05.2019
Goal: Handle new and unique input sources
that wrap around devices
backed by memory-mapped I/O is not always obvious
where the I/O is the sequence of incoming interrupts
28
Trail of Bits | QPSS 2019 | 16.05.2019
Goal: Keeping the tooling up-to-date
making upgrading QEMU straightforward
be too challenging
effective, so perhaps we are already “ahead”
29
Trail of Bits | QPSS 2019 | 16.05.2019
systems
30
Trail of Bits | QPSS 2019 | 16.05.2019