Designing and Implementing Malicious Hardware
Samuel T. King, Joseph Tucek, Anthony Cozzie, Chris Grier, Weihang Jiang, and Yuanyuan Zhou Presented by Lauren Biernacki and Shuang Qiu
Designing and Implementing Malicious Hardware Samuel T. King, - - PowerPoint PPT Presentation
Designing and Implementing Malicious Hardware Samuel T. King, Joseph Tucek, Anthony Cozzie, Chris Grier, Weihang Jiang, and Yuanyuan Zhou Presented by Lauren Biernacki and Shuang Qiu Background Design Fabrication Packaging Testing Assembly
Samuel T. King, Joseph Tucek, Anthony Cozzie, Chris Grier, Weihang Jiang, and Yuanyuan Zhou Presented by Lauren Biernacki and Shuang Qiu
Design
SoC Supplier
Fabrication
Foundry
Packaging
OSAT
Testing
System OEM
Assembly
EMS Vendor
Integrated Circuit (IC) Supply Chain
https://www.cs.csub.edu/~rabdolee/V LSILab/CadenceSoftware.jpeg http://www.colorcontrol.info/images//p ageImgs/chipNotes/siliconWafer02.pn g http://img.tomshardware.com/us/2000/ 11/20/intel/p4-pic1.jpg https://upload.wikimedia.org/wikipedia /commons/d/d7/PSX-SCPH-5001-Mot herboard.jpg http://www.globalspec.com/ImageRep
g63345179e4954563af7c87b4af7d07 e2.png
additional gates
specialized attacks on the underlying hardware
multiple types of software based attacks
Novel idea: Design and implement general purpose hardware to support the design of software based attacks.
Memory Access Mechanism: allows us to bypass the memory management unit Shadow Mode: allows us to execute invisible malicious firmware
address bus
Microprocessor MMU TLB
Data Bus D-Cache I-Cache
Main Memory CPU MA Snoop MMU
Address Bus
Microprocessor MMU TLB
Data Bus D-Cache I-Cache
Main Memory CPU MMU MA Snoop Magic Bytes
Address Bus
Protection Checking Disabled
disabled still appears on the bus
to the operating system
Requires attacker to already have software running on the system in order to trigger byte sequence
specifically for the malicious process
○ Bootstrap code is used to initialize the attack ○ Monitors for a predefined trigger, which initiates malicious firmware
machine
Microprocessor MMU TLB
Data Bus D-Cache I-Cache
Main Memory
Deubugging Logic
CPU Debugging Logic MMU Debugging Logic
Address Bus
Boots..
Microprocessor MMU TLB
Data Bus D-Cache I-Cache
Main Memory
Deubugging Logic
CPU Deubugging Logic MMU Debugging Logic
Address Bus Boots.. UDP Header Firmware Magic Bytes
Boots.. UDP H Firmw Magic..
.. ..
Microprocessor MMU TLB
Data Bus D-Cache I-Cache
Main Memory
Deubugging Logic
CPU Deubugging Logic MMU Debugging Logic
Address Bus Boots.. UDP H Firmw Magic Boots..
.. .. ..
Boots.. UDP H Firmw Magic..
.. ..
UDP H Firmw Magic..
.. ..
Boots Firmw
..
.. .. .. ..
Microprocessor Microprocessor MMU TLB
Data Bus D-Cache I-Cache
Main Memory
Deubugging Logic
CPU Debugging Logic
Address Bus Firmw..
.. .. ..
Boots..
.. .. .. ..
Boots Firmw
.. ..
attack not visible outside the processor
ramifications that depend on how long Shadow Mode runs
○ Trojaned hardware turns off memory protection.
Memory Malicious Program Trojaned Hardware
Effective user ID: euid1
○ The program changes its effective user ID to root. ○ The program now runs with full system privileges.
Memory Malicious Program Trojaned Hardware Kernel memory euid1 → root
Effective user ID: euid1
UDP Header Firmware Magic Bytes
UDP
Processer
D-Cache I-Cache Boots .. UDP H Firmw Magic Boots ..
.. .. ..
network Attacker Sends
○ Attacker sends unsolicited UDP packet ○ Monitor notices the magic byte sequence ○ Target OS inspecting UDP packet triggers trojaned hardware
Processer
D-Cache I-Cache Boots .. Boots .. Firm-w are Evil-d ata
○ Firmware is copied to reserved cache area and activated ○ Attacker logs in as root. ○ Shadow firmware uninstalls automatically.
○ Keep interposing on the write and read library call to steal password
Processer
D-Cache I-Cache Boots .. Boots ..
Malicious Service
for “Password:” to identify process receiving passwords
following read call
12345
Sign In
Password:
○ Use two techniques to leak password out
Processer
D-Cache I-Cache Boots .. Boots ..
Password:12345
Malicious Service
○ Implemented on FPGA development board with Leon3 processor ○ Modify the processor at the VHDL level ○ Memory access
■ Modify data caches & MMU ■ Memory permission checks are ignored for malicious software
○ Shadow mode
■ Modify instruction and data caches ■ Add new watchpoints and make minor changes to the existing watchpoints
Processor Logic gates Logic gates increment w.r.t. Baseline CPU Lines of VHDL codes VHDL code increment w.r.t. Baseline CPU Baseline CPU 1,787,958
1,788,917 959 (0.05%) 11,263 68 CPU + shadow mode 1,789,299 1341 (0.08%) 11,312 117
Table is from the paper “Designing and implementing malicious hardware”
○ Various benchmarks
■ Four CPU bound benchmarks: bzip2, gcc, parser, and twolf ■ One I/O bound benchmark: wget ○
Four experimental cases (Login backdoor attack)
■ Baseline: Unmodified hardware and without attacking ■ Known Root: Unmodified hardware. Log in with root password and steal the /etc/shadow file. ■ Transient: Hardware with shadow mode support. “Hit-and-run” style attack. ■ Persistent: Hardware with shadow mode support. Continuously active login backdoor.
Figure is from the paper “Designing and implementing malicious hardware”
○ Power analysis
■ Countermeasure: constant power draw circuits
○ IC testing with various inputs and outputs
■ Countermeasure: wait for a specific sequence as a trigger
○ Reverse engineering
■ Time-consuming, expensive, destructive
○ Fault-tolerance techniques
■ Hardware redundancy (3m+1 ICs are needed to cope with m malicious ICs) [1]
[1] Lamport, Leslie, Robert Shostak, and Marshall Pease. "The Byzantine generals problem." ACM Transactions on Programming Languages and Systems, 1982
an attack?
potential defense strategies?