Malware Persistence Mechanisms

Malware Persistence Mechanisms

Malware Persistence Mechanisms A Thesis Presented to The Faculty of the Computer Science Department In (Partial) Fulfillment of the Requirements for the Degree Masters of Science in Computer Science by Student Name: Advisor: Zane Gittins Dr. Michael Soltys July 2020 c Year Zane Gittins ALL RIGHTS RESERVED APPROVED FOR MS IN COMPUTER SCIENCE Advisor: Michael Soltys Date Reza Abdolee Date Socrates Frangis Date APPROVED FOR THE UNIVERSITY Name Date Non-Exclusive Distribution License In order for California State University Channel Islands (CSUCI) to reproduce, translate and distribute your submission worldwide through the CSUCI Institutional Repository, your agreement to the following terms is necessary. The author(s) retain any copyright currently on the item as well as the ability to submit the item to publishers or other repositories. By signing and submitting this license, you (the author(s) or copyright owner) grants to CSUCI the nonexclusive right to reproduce, translate (as defined below), and/or distribute your submission (including the abstract) worldwide in print and electronic format and in any medium, including but not limited to audio or video. You agree that CSUCI may, without changing the content, translate the submission to any medium or format for the purpose of preservation. You also agree that CSUCI may keep more than one copy of this submission for purposes of security, backup and preservation. You represent that the submission is your original work, and that you have the right to grant the rights contained in this license. You also represent that your submission does not, to the best of your knowledge, infringe upon anyone's copyright. You also represent and warrant that the submission contains no libelous or other unlawful matter and makes no improper invasion of the privacy of any other person. If the submission contains material for which you do not hold copyright, you represent that you have obtained the unrestricted permission of the copyright owner to grant CSUCI the rights required by this license, and that such third party owned material is clearly identified and acknowledged within the text or content of the submission. You take full responsibility to obtain permission to use any material that is not your own. This permission must be granted to you before you sign this form. IF THE SUBMISSION IS BASED UPON WORK THAT HAS BEEN SPONSORED OR SUPPORTED BY AN AGENCY OR ORGANIZATION OTHER THAN CSUCI, YOU REPRESENT THAT YOU HAVE FULFILLED ANY RIGHT OF REVIEW OR OTHER OBLIGATIONS REQUIRED BY SUCH CONTRACT OR AGREEMENT. The CSUCI Institutional Repository will clearly identify your name(s) as the author(s) or owner(s) of the submission, and will not make any alteration, other than as allowed by this license, to your submission. Title of Item 3 to 5 keywords or phrases to describe the item Author(s) Name (Print) Author(s) Signature Date This is a permitted, modified version of the Non-exclusive Distribution License from MIT Libraries and the University of Kansas. Malware Persistence Mechanisms Zane Gittins November 23, 2020 Abstract In the public imagination Cybersecurity is very much about mal- ware, even though malware constitutes only part of all the threats faced by Cybersecurity experts. However, malware is still one of the best methods to gain persistent access and control of a target system. There are many methods to deploy malware to a target system, a common method is a well socially-engineered phishing attack that de- ceives a user to gain a foothold on a system. Once the attacker gains a beachhead in the victim’s network, it may be used to download ad- ditional payloads and exploit vulnerabilities, to gain more control and access within a network. Using malware as their foothold, attackers are able to to conduct reconnaissance, gather intelligence (e.g., exfil- tration of intellectual property) or simply inflict damage or extortion (e.g., ransomware). All of this has to be done in a way that allows an attacker to retain access for as long as possible; the ability to do so is called persistence, and this thesis examines some of the di↵erent tech- niques used by malware authors to accomplish persistence in an ever evolving landscape. In the second section of this thesis we propose an architecture for detecting malware persistence mechanisms, and give examples to detect the malware that we cover in the first section. Contents 1 Introduction 1 2 Contributions 4 3Persistentmalware 6 3.1 Emotet . 7 3.2 OceanLotusSymantecDLLHijacking . 16 3.3 TrickBot . 24 3.4 OceanLotus—Explorer-COMHijack . 28 3.5 AgentTesla ............................ 35 3.6 Search Protect . 46 4 Detection Architecture 52 4.1 WindowsEventLogs ....................... 56 4.2 WindowsEventForwarding . 59 4.3 ApacheKafka ........................... 61 4.4 Logstash . 62 4.5 Elasticsearch . 64 4.6 Kibana . 65 4.7 Elastalert . 67 4.8 ApplicationofArchitecture . 72 i 5 Conclusion 74 References 79 ii List of Figures 1PyramidofPain..........................7 2StepsthatleadtoanEmotetinfection..............11 3VulnerableLoadLibraryWCall.................19 4FunctionsImportedfromDLL..................19 5LibraryExports..........................22 6 DNSRequest ........................... 24 7ProcessMonitor..........................34 8COMExport...........................35 9MZfilesignature.........................36 10 Steganography . 37 11 AgentTeslaStructure ...................... 37 12 SetWindowsHookEx ....................... 40 13 HookFunction .......................... 40 14 vkCode . 41 15 Screen Capture . 41 16 FakemailAgentTesla. 44 17 VisualizationLayerDiagram. 53 18 DetectionArchitectureDiagram. 56 iii 1 Introduction Malware authors continue to seek more advanced methods to maintain Per- sistence on target systems. We define persistence as the method by which malware survives a reboot of the victim operating system, and is a key el- ement of attacks that require attackers to Pivot through a network to ac- complish their objective. Pivoting is the process by which an attacker moves from a compromised system that they control to otherwise innacessible sys- tems [35]. Traditional methods for persistence are increasingly detected by defenders and anti-virus software. This thesis seeks to give a deep dive on a subset of persistence mechanisms used by malware. We start with traditional persistence mechanisms used by criminal elements, and then analyze more sophisticated persistence mechanisms believed to be utilized by nation state actors. These more advanced persistence mechanisms are harder for defend- ers to identify, and are less likely to be discovered by defenders. More obscure persistence methods do not appear in common tools used by defenders such as Autoruns. Autoruns is a utility that is apart of Microsoft’s system inter- nals toolkit, which covers a wide range of auto-start locations [23]. These techniques are generally deployed first by nation state actors, and later make their way into criminally operated malware. One example of this is the tech- nique known as application shimming, with the first known public sample as Black Energy, which had application shimming capabilities added as early as April 2013 [29]. This technique was later discovered in the banking trojan 1 Gootkit in 2014, and Dridex in 2015. The terminology of Advanced Persis- tent Threat denotes a state-sponsored group with superior capabilities and funding that gains unauthorized access to a system and remains undetected for an extended period of time. These groups continue to attack their tar- gets, even after failures, and often seek to deceive, deny, degrade, destroy, and disrupt their adversaries. The advances in malware development made by sophisticated groups often make their way into the hands of criminals, and then become commodities on the Internet available at little or no cost to less sophisticated actors. In the following sections we discuss malware samples and the persistence techniques they use. At the end of each section we map the persistence technique to the Mitre Attack framework. Mitre Attack is an industry standard knowledge base for attack tactics and techniques. Mitre Attack is organized in categories of tactics. The categories are initial access, execution, persistence, defense evasion, credential access, discovery, lateral movement, collection, command and control, exfiltration, and impact. The subject of this thesis is the techniques used by malware authors to achieve persistence, and therefore all map to the persistence tactic of Mitre Attack. As of 2020, Mitre Attack currently lists 63 persistence techniques [24], and there are undoubtedly more techniques not listed within Mitre’s framework. In this thesis We cover examples of three common techniques in the persis- tence category, and three more advanced techniques. In the second section of this thesis, we propose an architecture for detecting persistence mecha- nisms used by malware. First, we provide a generic architecture, and then 2 we discuss open source projects that can be used to satisfy this architecture. Lastly, we dicuss how this architecture can be used to detect the malware samples presented in the first section. 3 2 Contributions This thesis provides analysis that focuses on the persistence mechanism of several malware samples. All samples except the Ocean Lotus COM hijack- ing sample have been analyzed previously, however these samples were not analyzed with a focus on their persistence mechanism. By highlighting mal- ware persistence mechamisms, we believe that malware eradication

View Full Text

Details

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