Multi-Stage Delivery of Malware

Multi-Stage Delivery of Malware

Multi-Stage Delivery of Malware Marco Ramilli Matt Bishop Dipartimento di Elettronica Informatica e Sistemistica Department of Computer Science University of Bologna University of California, Davis Via Venezia, 52 - 47023 Cesena aˆ ITALY Davis, CA 95616-8562, USA [email protected] [email protected] Abstract on systems. For example, macro viruses intended for Mi- crosoft Word must be in Word documents to be effective, Malware signature detectors use patterns of bytes, or and so anti-virus programs typically do not scan incoming variations of patterns of bytes, to detect malware attempting executables for those viruses—but they do scan any incom- to enter a systems. This approach assumes the signatures ing Microsoft Word files for them. This creates a “gap” are both or sufficient length to identify the malware, and in protection. If, for example, a macro virus were embed- to distinguish it from non-malware objects entering the sys- ded in an executable file in such a way that the executable tem. We describe a technique that can increase the difficulty file would ignore it when executed, but a second program of both to an arbitrary degree. This technique can exploit could locate that virus and load it into an existing Microsoft an optimization that many anti-virus systems use to make Word document in such a way that the virus would be trig- inserting the malware simple; fortunately, this particular gered when the file were opened, the anti-virus programs exploit is easy to detect, provided the optimization is not would not detect the macro virus’ entry onto the system. present. We describe some experiments to test the effective- The point of detection would therefore need to be the load- ness of this technique in evading existing signature-based ing program. malware detectors. This view of the malware attack is of a three-step pro- cess. The first step is to place the malware onto the sys- tem. The second step is to assemble the malware. The third 1 Introduction step is to execute the assembled malware. More customary views of the process conflate the first and second steps into one, under the guise of infection (and the third step is the Ever since Cohen’s 1984 paper [6] described computer execution step). Anti-virus programs typically attempt to viruses in detail, a battle has raged between virus writers block the first two steps by detecting and preventing mal- and anti-virus defenders. The simple computer virus has ware from entering the system. They require that both steps evolved into more complex stealth, polymorphic, and meta- 1 have taken place, because their signatures require that spe- morphic engines. In parallel, anti-virus systems have be- cific parts of the malware be detectable. come more complex; no longer are simple scans for code Anti-virus programs that seek to detect incoming mal- signatures sufficient. Indeed, these systems now use tech- ware use two primary techniques. The first, which we call niques such as emulation, behavior analysis, sandboxing, data signature scanning, is to look for patterns in the incom- and other forms of isolation to protect systems. ing data objects that match known malware—signatures— The defenses come with a price: data objects (which and, when found, take some action, for example deleting the include downloaded entities such as applets on the World incoming data or quarantining it and notifying the user. The Wide Web, files, and email attachments) must be scanned second, behavior signature scanning, emulates the data ob- and tested in other ways for malware. Because of the large ject’s execution either statically (determining what instruc- number of different kinds of malware (over 22,000,000 as tions would be executed) or dynamically (placing it in a of early 2009 [5]), it is considered impractical to scan all sandbox and executing it, with the sandboxing intercept- incoming data objects for all types of malware. Thus, sys- ing all system calls and possibly library calls, looking for tems differentiate among the vectors used to put malware patterns that match behavior of malware). Both techniques 1Here, we follow the industry custom of calling anti-malware detection assume that enough of the malware is present in the data programs “anti-virus” programs. object being examined to trigger an alert. As stated above, these techniques all combine entry onto the system with as- we describe. The main difference is that the worm uses sembly in their view of the malware life cycle on a system. the grappling hook to pull over an object file that must be Consider an alternate view. What happens if assembly linked to local libraries and resources in order to execute. occurs after placement on the system? That is, portions of Many existing worms work similarly, exchanging messages the malware are placed on a system, then the malware is with other hosts and copies of the worm to propagate and to assembled, and then it is executed—three distinct steps in- control their spread. Our attack focuses on constructing the stead of two. This view negates the assumption that enough malware from data resident on the current host. of the malware is present in the data object to be identi- The computer viruses Dichotomy [10] and RMNS [11] fied as malware. We exploit this view by partitioning our each consisted of two components. When executed, malware into multiple pieces, none of which alone contains they operated as TSRs. Dichotomy intercepted the enough of a signature to trigger an anti-virus alert. The “Load and Execute” call, and either infected the file with pieces are placed onto the target system, and some time later the “loader” (that changed the file entry point to invoke the are assembled together. This combined code is sufficient to virus) and the virus body, or simply with the virus body. act as malware. RMNS had two parts, one of which intercepted the call, and The argument that this malware will then be detected by the other of which infected files. The infection part infected the system when it is executed, and therefore this attack is the file with the interception code half the time, and the in- inconsequential, assumes that the system has an anti-virus fector the other half of the time. These viruses differ from engine monitoring all processes as they execute—and that our approach because we fragment malware into parts that the anti-virus program is correctly configured and correctly can enter a system, and then be combined to create the mal- identifies all malware as such by its behavior. This assump- ware. The components themselves need not do anything in tion is of course questionable; at any rate, by that argument, particular, or indeed even do anything—until they are as- no incoming data object would need to be checked for mal- sembled in memory. ware because all malware would be detected on execution. Sun, Ebringer, and Bostas [17] build on polymorphic The magnitude of business, and the amount of research into, malware that uses encryption to evade detection. This type the detection of malware as it enters the system demon- of malware encrypts the unpacking routine, which is then strates that this argument is not widely accepted. Indeed, it decrypted just before execution and re-encrypted just after violates the principle of separation of privilege (also known execution (called “multistage unpacking”). Our approach as “layers of defense”) [16] because it contends that one omits encryption, or indeed any obfuscation beyond the layer of defense is sufficient. breaking up of the malware in multiple chunks that can then After a brief survey of related work, we present the de- be reassembled and executed. A second difference is that sign of our attack, and then report on experiments. We con- we evade only detection at the injection of the malware com- clude with a discussion of future directions and some ideas ponents. Once the malware is assembled and executed, it is on how to apply this work to defeat the execution monitor- susceptible to detection through behavioral analysis. ing of anti-virus defenses. Current work on evading signature-based anti-virus tech- niques focuses on obfuscation-based systems, including 2 Related Work self-encrypting, polymorphic, and metamorphic malware. Self-encrypting malware was first found in the Cascade Multi-stage attacks are well-known. One of the earli- virus [3], and consisted of an initial decryption routine fol- est was the Internet worm [9], which placed a “grappling lowed by the encrypted virus. By altering the key (based hook” on the target system. When the grappling hook was on the size of the file), the body of the virus would ap- executed, the rest of the worm was pulled over. Ptacek pear to change. The next stage grew from the need to hide and Newsham [15] used network hop counts to cause pack- the decryption routine. Polymorphism, in which instruc- ets to be dropped. This fragmented attack commands into tions are replaced by equivalent instructions, helped hide multiple packets interspersed with irrelevant data that was those routines. Indeed, tools such as the Mutation Engine discarded after the intrusion detection system of the target and the TridenT Polymorphic Engine automated genera- site examined the stream for attacks, but before the stream tion of polymorphic malware [18]. However, enough non- reached the target. Other multistage attacks, often in the metamorphic malware is still in use that signature-based guise of malware (see for example [2, 4, 7, 12] are “multi- scanning is productive. Current anti-virus engines use a va- stage” in their activation or execution. Models [8, 14, 19] riety of techniques to speed the checking of incoming data and interpretative methods such as visualization [13] have objects.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    8 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