Using Hardware Features for Increased Debugging Transparency Fengwei Zhang, Kevin Leach, Angelos Stavrou,
Haining Wang, and Kun Sun. In S&P'15.
Fengwei Zhang
Wayne State University CSC 6991 Topics in Computer Security 1
Using Hardware Features for Increased Debugging Transparency - - PowerPoint PPT Presentation
Using Hardware Features for Increased Debugging Transparency Fengwei Zhang, Kevin Leach, Angelos Stavrou, Haining Wang, and Kun Sun. In S&P'15. Fengwei Zhang Wayne State University CSC 6991 Topics in Computer Security 1 Overview
Wayne State University CSC 6991 Topics in Computer Security 1
Wayne State University CSC 6991 Topics in Computer Security 2
Wayne State University CSC 6991 Topics in Computer Security 3
Wayne State University CSC 6991 Topics in Computer Security 4
Hardware Hypervisor (VMM) Virtual Machine
Wayne State University CSC 6991 Topics in Computer Security 5
Hardware Hypervisor (VMM) Virtual Machine
Malware
Wayne State University CSC 6991 Topics in Computer Security 6
Hardware Hypervisor (VMM) Virtual Machine
Analysis Tool Malware
Wayne State University CSC 6991 Topics in Computer Security 7
Hardware Hypervisor (VMM) Virtual Machine
Analysis Tool Malware
Wayne State University CSC 6991 Topics in Computer Security 8
Hardware Hypervisor (VMM) Virtual Machine
Analysis Tool Malware
Wayne State University CSC 6991 Topics in Computer Security 9
Wayne State University CSC 6991 Topics in Computer Security 10
Wayne State University CSC 6991 Topics in Computer Security 11
Protected Mode Normal OS System Management Mode Isolated Execution Environment SMI Handler Isolated SMRAM Highest privilege Interrupts disabled
SMM entry SMM exit
Software
Hardware
Trigger SMI RSM
Wayne State University CSC 6991 Topics in Computer Security 12
Wayne State University CSC 6991 Topics in Computer Security 13
CPU Northbridge
(memory controller hub) MMU and IOMMU Graphic card slot Memory bus Memory slots
Southbridge
(I/O controller hub) PCI bus PCI slots
BIOS Super I/O
LPC bus
Keyboard Mouse Serial port IDE SATA Audio USB CMOS
Front-side bus PCIe bus Internal bus
Wayne State University CSC 6991 Topics in Computer Security 14
Wayne State University CSC 6991 Topics in Computer Security 15
Debugging Client
GDB-like Debugger
Debugging Server
SMI handler Debugged application 1) Trigger SMI 2) Debug command 3) Response message Inspect application Breakpoint
Wayne State University CSC 6991 Topics in Computer Security 16
Protected Mode System Management Mode
SMI Handler SMI Handler
SMM entry SMM entry SMM exit SMM exit inst1 inst2 inst3 ... instn CPU control flow EIP Trigger SMI RSM Trigger SMI RSM
Wayne State University CSC 6991 Topics in Computer Security 17
Wayne State University CSC 6991 Topics in Computer Security 18
Wayne State University CSC 6991 Topics in Computer Security 19
Wayne State University CSC 6991 Topics in Computer Security 20
Wayne State University CSC 6991 Topics in Computer Security 21
Wayne State University CSC 6991 Topics in Computer Security 22
– Hardware-assisted system; does not use virtualizaOon or emulaOon technology ︎ – Providing a more transparent execuOon environment ︎ – Though tesOng exisOng anO-debugging, anO-VM, and anO-emulaOon techniques, MalT remains transparent
Remote Debugger (“client”)
GDB Server IDAPro Tool GDB Client
Debugging Target (“server”)
SMI Handler Debugged application Debug command Response message
SMM PM Generic Interaface
Wayne State University CSC 6991 Topics in Computer Security 23
[1] Symantec, “Internet Security Threat Report, Vol. 19 Main Report,” http: //www.symantec.com/content/en/us/enterprise/other resources/b-istr main report v19 21291018.en-us.pdf, 2014. [2] McAfee, “Threats Report: First Quarter 2014,” http://www.mcafee.com/us/resources/reports/rp-quarterly-threat-q1-2014-summary.pdf. [3] Kaspersky Lab, “Kaspersky Security Bulletin 2013,” http://media.kaspersky.com/pdf/KSB 2013 EN.pdf.
Wayne State University CSC 6991 Topics in Computer Security 24
analyze malware. It is a bare metal debugging system that allows high
virtualizaOon measures that change its behavior when it discovers it is in a virtual machine or emulaOon environment. Using SMM MALT has ring -2 privilege and has a smaller Trusted Code Base than any debugger that depends on virtualizaOon. MALT is an effecOve debugger that is generally unhindered by armored malware that has anO-VM and anO-debugging soiware, however it is incapable of debugging rootkits at the ring -2 privilege level. MALT is iniOally triggered by a serial message arriving at the COM1 port, which has been reconfigured to send an
when they are equal an event in LAPIC is set to overflow to trigger the SMI. VulnerabiliOes that SMM has can be used to stop MALT being that it is SMM-
issues have been fixed by implementaOon of SMRR and locking the SMRAM respecOvely.
Wayne State University CSC 6991 Topics in Computer Security 25
based in System Management Mode called MaLT. The moOvaOon for this technique is that malware can detect the presence of virtual machines and emulaOon and choose to remain stealthy by not unpacking it’s contents. MaLT shows that a debugger placed into SMM by Coreboot on boot can remain transparent to malware. In short, the core process of MaLT allows the placement
for MaLT, it the next instrucOon in the registers to resume the previous operaOon. The benefit that MaLT has is that it operates in Ring -1/-2 space. That is, MaLT
through a serial terminal which allows a user to read memory and launch break
Oming detecOon method in which malware monitors 3rd party Ome stamps to see if there have been any breaks in processor execuOon.
Wayne State University CSC 6991 Topics in Computer Security 26
using virtualizaOon and emulaOon techniques to prevent malware aXack. The malware has the ability to detect the presence of above techniques and hides itself, making the system more vulnerable. The paper discusses in detail about MALT a debugging framework using System Management Mode(SMM). The following are the advantages of using MALT techniques. It is hardware assisted malware analysis which can do rootkit analysis and kernel debugging without using
(System Management Interrupt) and also uses hardware breakpoint techniques thereby increasing transparency and reducing vulnerability. MALT executes in SSM Ring -2 level hence it is capable of debugging user mode, kernel mode and hypervisor level rootkits. Since MALT code does run in bare metal machine, it does not change any code in operaOng system. MALT uses reboot approach to restore a system to clean state hence by leaving it vulnerable to malware aXack during reboot.
Wayne State University CSC 6991 Topics in Computer Security 27
Wayne State University CSC 6991 Topics in Computer Security 28