Fast and Service-Preserving Recovery from Malware Infections

Fast and Service-Preserving Recovery from Malware Infections

Fast and Service-preserving Recovery from Malware Infections Using CRIU Ashton Webster, Ryan Eckenrod, and James Purtilo, University of Maryland https://www.usenix.org/conference/usenixsecurity18/presentation/webster This paper is included in the Proceedings of the 27th USENIX Security Symposium. August 15–17, 2018 • Baltimore, MD, USA ISBN 978-1-939133-04-5 Open access to the Proceedings of the 27th USENIX Security Symposium is sponsored by USENIX. Fast and Service-preserving Recovery from Malware Infections Using CRIU Ashton Webster Ryan Eckenrod James Purtilo University of Maryland University of Maryland University of Maryland Abstract ing the malware and restoring the host to a trustwor- thy, unharmed state proves challenging. The malware Once a computer system has been infected with malware, removal and remediation capabilities of many commer- restoring it to an uninfected state often requires costly cial malware detectors fail to completely erase a malware service-interrupting actions such as rolling back to a sta- program’s effects [34]. Other recovery solutions record ble snapshot or reimaging the system entirely. To of- meticulous logs about the processes running on a sys- fer a fast and service-preserving malware removal tech- tem in order to rollback and then forward restore infected nique, we present CRIU-MR: a mechanism for restoring hosts [25, 33]. However, while these methods are quite an infected server running within a Linux container to an effective at removing and recovering from malware, they uninfected state using Checkpoint/Restore in Userspace prove slow, memory and monitoring intensive, and are (CRIU). We modify the CRIU source code to flexibly not known to be used in practice. Compared to log-based integrate with existing malware detection technologies recovery, Virtual Machine (VM) based approaches can so that it can remove suspected malware processes from quickly restore an infected host to a known trustworthy within a Linux container using a modified checkpoint/re- state using snapshots. Unfortunately, restoring a system store event. This allows for an infected container with using snapshots will lose the state of any computations or a potentially damaged filesystem to be checkpointed and network connections that were running on the host unless subsequently restored on a fresh backup filesystem while costly logging is implemented as well [18, 35]. Com- both removing malware processes and preserving the pared to these efforts, we seek to develop a lightweight, state of trusted ones. This method is shown to suc- quick malware recovery technique which transparently ceed quickly with minimal impact on service availability, preserves the state of trusted services running on an in- restoring active TCP connections and completely remov- fected host without the overhead of log-based schemes. ing several types of malware from infected Linux con- tainers. We present a malware recovery system which extends the Checkpoint/Restore In Userspace project (CRIU) [40] to quickly restore an infected Linux container 1 Introduction (LXC) to a safe state while removing malware and pre- serving running services in the process. This technique, Malware attacks remain a persistent threat to computer which we call CRIU for Malware Recovery (CRIU-MR), security from year to year. Symantec alone recorded allows CRIU to be flexibly integrated with existing mal- over 20 billion malware alerts across customer machines ware detection systems. When malware is detected on during 2010-2011, while both botnet infections and par- a Linux container, the container process and its children ticularly damaging ransomware attacks are growing in are first checkpointed with CRIU. Malware processes are number annually [28, 38]. In response, the security com- identified during this step and marked to be ignored dur- munity continues to develop intrusion prevention tech- ing the subsequent container restore. The container pro- niques meant to stop malware from propagating to new cess can then be migrated and restored on a trustworthy machines and intrusion detection systems (IDS’s) meant backup filesystem with CRIU, excluding the identified to detect malicious processes running on computer hosts malware processes. We show that CRIU-MR only takes [15, 26, 27, 30, 41]. Despite these efforts, many malware 2.8 seconds to complete on average regardless of mal- infections go undetected and infect new hosts daily. ware infection type across several Linux malware sam- Once malware has been detected on a host, remov- ples. We find CRIU-MR is primarily useful for hosts USENIX Association 27th USENIX Security Symposium 1199 with filesystems such as web servers, preserving active additionally incurs significant runtime and logging over- network connections to the host without drastically in- head for each untrusted process. creasing response latency. By quickly restoring running Palieri et al. [33] develop a technique for automati- services while removing malware from a system, CRIU- cally generating a remediation executable which can be MR presents a lightweight alternative to log-based and run to reverse the effects of a given malware program. VM-based malware recovery schemes. While mostly successful, these executables failed to re- verse effects in some cases, can accidentally reverse valid 2 Related Work changes, and fail to reverse changes an attacker may manually make if the malware provides shell access. Many techniques for recovering from malware infections have been proposed over time. We group these works 2.3 VM-based Malware Recovery into the following categories: tradtional, log-based, and VM-based. We discuss these categories, as well as CRIU Modern VM hypervisors allow for “snapshots” of a sys- and LXC, which CRIU-MR relies upon. tem’s filesystem and process state to be taken at any time, which can later be reverted to if necessary. If an older, malware-free snapshot is available, malware can 2.1 Traditional Malware Recovery be quickly removed from an infected VM by restoring The most basic solution to malware remediation is to re- the VM to the prior snapshot. The downside is that the install the infected host’s operating system and reformat operations/state of any trusted processes are lost when any disk drives. While this method is sure to remove the snapshot is restored. While not a VM-based tech- the malware and its effects, it is obviously undesirable nique, MalTRAK [39] uses the concept of “views” or as it removes all data and processes on the host. Less system snapshots in a similar manner to undo the effects destructive malware remediation techniques have thus of a malware program. been packaged into the signature-based antivirus pro- ExecRecorder [18] is a VM-based recovery method grams typically installed on a computer host. Unfortu- which also integrates logging to restore a system to a nately, Passerini et al. [34] find that even when these trusted snapshot before replaying log events for non- programs detect malware, they may fail to remove mal- malware processes to restore the system state. The costly ware executables for over 20% of infections. Further- logging process incurs a 4% runtime overhead and pro- more, they typically fail to reverse secondary changes to duces an average of over 5GB of logs per hour, and no the infected filesystem or changes to registry keys in the analysis of how long the recovery process takes is pro- case of Windows hosts. While more effective malware vided. The Secom [35] system attempts to avoid such remediation techniques have been developed, these solu- a logging overhead by first writing a process’s changes tions remain the most commonly used. to an OS-level VM. It then attempts to remove poten- tial malware effects by clustering changes according to higher-level behavioral profiles before merging the non- 2.2 Log-Based Malware Recovery malware clusters to the VM host. This method is prone Log-based recovery techniques, long used in database to identifying false positives and still degrades program implementations [32], restore a system’s state to a known performance by intercepting each system call run on the stable state by using log information to undo undesired VM. Finally, the TimeVM [19] system uses a blend of operations, correctly reapply valid changes, or both. The log-based recovery and live backup VMs in different Taser [20] recovery system records all file, network, and time states to quickly identify a backup VM free of a de- process operations performed on the system and attempts tected malware infection. This VM can then be rapidly to use such logs to undo the effects of a malware pro- updated to a clean, up-to-date state by replaying the logs gram once it is flagged by an IDS. However, Taser will of non-malware processes. The expected recovery time be forced to undo all operations logged on the system if using this system was still often higher than 30 seconds, the intrusion is not caught in a timely manner, and its re- and the effects of a malware process that goes undetected covery method can take many minutes to run in the worst for a long period of time may still be unable to be re- cases. Hsu et al. [25] attempt to differentiate trusted and versed with this method. untrusted applications, logging only untrusted ones in or- der to rollback their operations if necessary. The down- 2.4 LXC and CRIU side of this method is that untrusted processes are heav- ily restricted in terms of their filesystem resources and LXC is an open-source Linux project which aims to al- ability to interact with other processes, requiring user in- low for the virtualization of a Linux system or process put in most cases for any program to run successfully. It within privilege-constrained containers [6]. These con- 1200 27th USENIX Security Symposium USENIX Association tainers are meant to be lightweight alternatives to virtual 4.

View Full Text

Details

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