Towards Detecting DMA Malware

Towards Detecting DMA Malware

POSTER: Towards Detecting DMA Malware [Extended Abstract] Patrick Stewin, Jean-Pierre Seifert, and Collin Mulliner Security in Telecommunications, Technische Universität Berlin & Deutsche Telekom Laboratories Ernst-Reuter-Platz 7 10587 Berlin, Germany patrickx,jpseifert,[email protected] ABSTRACT x86x86 PlatformPlatform Malware residing in dedicated isolated hardware containing CPUCPU an auxiliary processor such as present in network, video, and r r e Main Memory e Main Memory l l NIC l CPU chipsets is an emerging security threat. To attack the NIC l o o 000110100010011 DMA r r Processor t host system, this kind of malware uses the direct memory t 111001011010011 n Memory n 000110100010011 Video Card o Video Card o access (DMA) functionality. By utilizing DMA, the host 111001011010011 C C DMA GPU 000110100010011 y y r system can be fully compromised bypassing any kind of ker- r 111001011010011 Memory o µControllerµController o 000110100010011 m nel level protection. Traditional anti-virus software is not m 111001011010011 e DMA e Processor 000110100010011 M capable to detect this kind of malware since the auxiliary M Memory 111001011010011 systems are completely isolated from the host CPU. In this work we present our novel method that is capable of de- tecting this kind of malware. To understand the properties of such malware we evaluated a prototype that attacks the host via DMA. Our prototype is executed in the chipset of Figure 1: Overview of Dedicated Isolated Hardware an x86 architecture. We identified key properties of such potentially exploitable by Rootkits malware that are crucial for our detection method. Our de- tection mechanism is based on monitoring the side effects of rogue DMA usage performed by the malware. We believe Hardware based malware running in a NIC was shown that our detection mechanism is general and the first step in in [1]. Efforts were started to prove the feasibility of such the detection of malware in dedicated isolated hardware. malware in video cards (using Graphics Processing Units, GPU) [2]. The first attacks were already presented in [8]. Categories and Subject Descriptors All these devices support Direct Memory Access (DMA), D.4.6 [Operating Systems]: Security and Protection|in- which enables this kind of malware to attack the host plat- vasive software form. The use of DMA circumvents all known protection mechanisms build into the operating system (OS) kernels General Terms and thus presents a very serious threat. Furthermore, mal- ware resident on dedicated isolated systems can survive re- Security boots and even the power off state. Since DMA usage is a key property of malware executed in Keywords isolated hardware (see Figure 1), we call this DMA malware. The execution environment of DMA malware is unaccessible Dedicated Hardware; Intel Active Management Technology from the host platform's CPU. Anti-virus software therefore (iAMT); Manageability Engine (ME); Northbridge; Rootkit is unable to detect and disable it. To the best of our knowl- edge no previous work has presented mechanisms to detect 1. DMA MALWARE malware resident in dedicated isolated hardware. Rootkits are the most prominent type of malicious soft- In this work we present a novel approach for detecting ware today. The ongoing battle between malware authors DMA malware. Our approach is based on DMA side effects and the anti-malware community forced malware creators that we observed during the evaluation of our own DMA to move to dedicated isolated hardware, or more precisely, malware prototype. to auxiliary processors present in today's x86 computer sys- We developed a prototype DMA malware to resemble rep- tems. Auxiliary CPUs are components present in hardware resentative functionality used by other previously developed such as the network interface card (NIC), the video card, DMA malware. Our specific implementation targets the and the actual x86 chipset, for example, in the memory con- auxiliary processor that is part of the platform's memory troller hub (MCH). MCH included in current x86 architecture chipsets. So far we developed, implemented, and evaluated our mech- anism that is able to detect rogue DMA usage that is not Copyright is held by the author/owner(s). CCS’11, October 17–21, 2011, Chicago, Illinois, USA. initiated by the host system. Our method is able to detect a ACM 978-1-4503-0948-6/11/10. general side effect pattern and thus we believe it is suited to 857 detect other kinds of DMA malware besides the prototype ter the keystroke logger has found the address the logger we implemented. monitors the buffer permanently and exfiltrates captured keystroke codes to an external platform via an isolated net- The main contributions of this work are: work channel. • Novel Detection Mechanism: We present a novel We determined that DMA malware has the following com- detection mechanisms to reveal DMA malware executed mon attack properties. An attack against the host consists in isolated hardware environments. Our work shows at least of two phases: (i) search system memory for valu- that DMA malware produces surprising side effects that able data such as the address of a kernel structure (search we measure reliably utilizing widely used and cross plat- phase), and (ii) read from (monitor phase) and/or write to form available CPU features. the found memory addresses. Even in the case where the at- • DMA Malware Evaluation: To fully understand tacker wants to inject something into the host environment, DMA malware we evaluated a realistic and representa- the attacker has to find the right address such as of a cer- tive prototype in form of a fully functioning keystroke tain kernel data structure in the host memory (see [1]). The logger that operates in the platform's memory controller search phase cannot be avoided. hub. Our malware searches the host memory for key- For our prototype we chose a read only DMA attack to stroke codes and exfiltrates them via the network. implement more stealthy DMA malware. We implemented a fully functioning keystroke logger for USB keyboards. Our prototype DMA malware implements exactly the above men- 2. RELATED WORK tioned attack properties. We think that these are common Our focus is on dedicated isolated hardware with a sep- for all DMA malware. Hence, our prototype is representa- arate processor and separate memory as known from NICs tive DMA malware. and video cards. An example of a stealth secure shell (SSH) We could have implemented another prototype, that ex- was shown by [7]. The shell is hidden using the NIC as well tracts cryptographic keys from the systems memory. Such a as the GPU environment, that communicate via the Periph- prototype would also implement the search and the monitor eral Component Interconnect (PCI) bus. The SSH daemon phase, even if the latter is quite short. The important point is installed by reflashing the firmware. A defense mecha- is to create a realistic attack that we can analyze. nism proposed by [7] is counting PCI-to-PCI transfers. Our prototype malware does not communicate with other PCI 4. DETECTING DMA SIDE EFFECTS devices (i.e., counting PCI-to-PCI transfers is useless) and does not require to reflash firmware. Our investigation into detecting malicious DMA usage is In [1], Duflot et al. demonstrated how to exploit a host based on the knowledge that both, the main CPU and the during runtime by utilizing a NIC and DMA. The authors iAMT environment, can access the main system memory at concede that the internal memory of the NIC can be accessed the same time. The interesting question for us was if this by the host. Their attack is not completely isolated from parallel memory access is with or without side effects. If side the host, whereas our prototype malware is. The authors effects are present and measurable then we can use these to propose countermeasures that will most probably result in detect malicious behavior. an arms-race. A detection mechanism was not proposed. We booted a Linux kernel and started only a root shell Another example for malware executed in a GPU was to ensure that the system workload was as little as pos- shown in [8]. The execution of that malware is assisted by sible. We performed a memory stress three times: without the GPU, i.e., some parts are executed on the main CPU, keystroke logger (baseline), keystroke logger in search mode, thus, they are not completely isolated from the host. and keystroke logger in monitor mode. For the tests we used Executing arbitrary code in the Intel Active Management a 100 MB file that we copied from one location to another Technology environment (see [4]), that means, in the plat- within a RAM based file system. We repeated the tests 1,000 form's MCH, was demonstrated by [6]. The authors discov- times and calculated the means. The results are depicted in ered an exploit that they use to inject code into the iAMT Figure 2. The diagram shows how we refined our strategy environment. Their proof-of-concept (PoC) code does noth- with different more specialized measurement tools. ing except to reveal itself by writing to a hard coded address GNU time: First we tried the common system tool GNU in the main memory via DMA. The PoC has no malware time to determine a delay. GNU time measures system re- functionality and is therefore not suited for our evaluation. source usages of a process, in our case the memory stress test The attack properties of our prototype are quite similar to tool. As shown in Figure 2 on the left hand side the means the presented related work. The attacks are based on DMA. of the test runs are nearly the same. We concluded that Hence, the detection mechanism based on DMA side effects the measurement resolution of GNU time is not sufficient to we present in this work is also able to detect DMA attacks reveal delays in our experiment.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    3 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us