designing and implementing malicious hardware
play

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


  1. 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

  2. Background Design Fabrication Packaging Testing Assembly https://www.cs.csub.edu/~rabdolee/V http://www.colorcontrol.info/images//p http://img.tomshardware.com/us/2000/ https://upload.wikimedia.org/wikipedia http://www.globalspec.com/ImageRep LSILab/CadenceSoftware.jpeg ageImgs/chipNotes/siliconWafer02.pn 11/20/intel/p4-pic1.jpg /commons/d/d7/PSX-SCPH-5001-Mot ository/LearnMore/20123/pca_area_bi g herboard.jpg g63345179e4954563af7c87b4af7d07 e2.png SoC Supplier Foundry OSAT System OEM EMS Vendor Integrated Circuit (IC) Supply Chain

  3. Previous Work ● IBM has developed a trojan circuit that can leak encryption keys using 406 additional gates ● These trojan circuits are hardcoded modifications to orchestrate simple, specialized attacks on the underlying hardware ● No research has been conducted on hardware modifications that can support multiple types of software based attacks Novel idea: Design and implement general purpose hardware to support the design of software based attacks.

  4. Motivation & Goals Memory Access Mechanism: allows us to bypass the memory management unit ● Privilege Escalation Attack Shadow Mode: allows us to execute invisible malicious firmware ● Login Backdoor ● Stealing Passwords

  5. Motivation & Goals ● Visibility: Whether or not evidence of the attack appears on the data or address bus ● Flexibility: The hardware design can support various software payloads ● Timing Perturbations: Reduce the performance impact the modification has on the processor

  6. Hardware Design: Memory Access Mechanism Microprocessor Main Memory D-Cache I-Cache CPU MMU MMU MA TLB Snoop Address Bus Data Bus

  7. Hardware Design: Memory Access Mechanism Microprocessor Main Memory Protection D-Cache I-Cache Checking Disabled CPU MMU MMU MA TLB Snoop Address Bus Data Bus Magic Bytes

  8. Hardware Design: Memory Access Mechanism ● Visibility: It is visible! Memory accessed when protection checking is disabled still appears on the bus ● Flexibility: Gives us the ability to alter any memory, including that belonging to the operating system ● Timing Perturbations: These modifications do not influence performance Requires attacker to already have software running on the system in order to trigger byte sequence

  9. Hardware Design: Shadow Mode ● Addresses visibility issue by reserving instruction and data cache lines specifically for the malicious process ● Uses software to initiate the attack, supported by hardware alterations ○ Bootstrap code is used to initialize the attack ○ Monitors for a predefined trigger, which initiates malicious firmware ● Details of the bootstrap attack code depend on assumptions about the machine

  10. Hardware Design: Shadow Mode Microprocessor Main Memory D-Cache I-Cache CPU MMU MMU Boots .. Deubugging Debugging Debugging Logic Logic Logic TLB Address Bus Data Bus

  11. Hardware Design: Shadow Mode UDP Header Firmware Microprocessor Main Memory Magic Bytes D-Cache I-Cache UDP H .. Firmw CPU MMU MMU .. Magic .. Boots .. Boots .. Deubugging Deubugging Debugging Logic Logic Logic TLB Address Bus Data Bus

  12. Hardware Design: Shadow Mode Microprocessor Main Memory D-Cache I-Cache UDP H UDP H UDP H .. .. .. .. Firmw Firmw Firmw CPU MMU MMU .. .. .. .. Magic .. Magic .. Magic .. .. Boots .. Boots .. Boots Boots .. .. Deubugging Deubugging Debugging Firmw Logic Logic Logic TLB .. Address Bus Data Bus

  13. Hardware Design: Shadow Mode Microprocessor Microprocessor Main Memory D-Cache I-Cache .. .. CPU MMU .. .. .. .. Boots .. Boots Firmw .. .. Deubugging Debugging Firmw Logic Logic TLB .. .. Address Bus Data Bus

  14. Hardware Design: Shadow Mode ● Visibility: As long as malicious firmware does not access main memory, the attack not visible outside the processor ● Flexibility: Supports “nearly arbitrary” attacks ● Timing Perturbations: Partitioning the cache does have performance ramifications that depend on how long Shadow Mode runs

  15. Attack: Privilege Escalation ● Memory access mechanism ○ Trojaned hardware turns off memory protection. Memory Trojaned Hardware Malicious Program Effective user ID: euid1

  16. Attack: Privilege Escalation ● Memory access mechanism ○ The program changes its effective user ID to root. ○ The program now runs with full system privileges. Memory Kernel memory Trojaned euid1 → root Hardware Malicious Program Effective user ID: euid1

  17. Attack: Login Backdoor ● Shadow mode mechanism - Transient ○ Attacker sends unsolicited UDP packet ○ Monitor notices the magic byte sequence ○ Target OS inspecting UDP packet triggers trojaned hardware Processer network D-Cache I-Cache UDP H UDP .. Firmw .. UDP Header Magic .. Firmware Boots .. Boots .. Magic Bytes Attacker Sends

  18. Attack: Login Backdoor ● Shadow mode mechanism - Transient ○ Firmware is copied to reserved cache area and activated ○ Attacker logs in as root. ○ Shadow firmware uninstalls automatically. Processer D-Cache I-Cache Monitor login application ● Uname: root, pwd: letmein ● Boots .. Boots .. Make pwd checking return True ● Firm-w Evil-d are ata

  19. Attack: Stealing Passwords ● Shadow mode mechanism - Persistent ○ Keep interposing on the write and read library call to steal password Sign In Processer Interpose on write call, searching ● Password: for “Password:” to identify process D-Cache I-Cache receiving passwords 12345 Record potential passwords on the ● Boots .. Boots .. following read call Malicious Service

  20. Attack: Stealing Passwords ● Shadow mode mechanism - Persistent ○ Use two techniques to leak password out Processer D-Cache I-Cache Password:12345 Boots .. Boots .. ● Directly use system network call ● Overwrite existing network packet Malicious Service

  21. Evaluation ● Circuit-level perturbations ○ 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 Logic gates increment Lines of VHDL VHDL code increment Processor Logic gates w.r.t. Baseline CPU codes w.r.t. Baseline CPU Baseline CPU 1,787,958 -- 11,195 -- CPU + memory access 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”

  22. Evaluation ● Timing perturbations ○ 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”

  23. Defense Strategies ● Detecting via analog perturbations ○ Power analysis ■ Countermeasure: constant power draw circuits ● Detecting via digital perturbations ○ 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] ● Each single approach is completely ineffective. ● Malicious hardware defense is a potential research direction. [1] Lamport, Leslie, Robert Shostak, and Marshall Pease. "The Byzantine generals problem." ACM Transactions on Programming Languages and Systems, 1982

  24. Conclusions ● This paper has laid the groundwork for constructing malicious processors. ● Proposed Two mechanisms: memory access and shadow mode. ● Implemented 3 attacks: privilege escalation, login backdoor, stealing password. ● Few hardware modification with less possibility of detection. ● Malicious hardware defense is a potential research direction.

  25. Discussion Points ● Are these attacks truly “invisible”? ● Should these malicious processors be used over standard Trojan circuits for an attack? ● It seems that all the possible defenses are not feasible. Are there any other potential defense strategies? ● Is this threat realistic?

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