Evaluating Open Source Malware Sandboxes with Linux Malware
Total Page:16
File Type:pdf, Size:1020Kb
Evaluating Open Source Malware Sandboxes with Linux malware OLABOYEJO OLOWOYEYE A thesis submitted to the Faculty of Design and Creative Technologies Auckland University of Technology In partial fulfilment of the requirements for the degree of Master of Information Security and Digital Forensics School of Engineering, Computer and Mathematical Sciences Auckland, New Zealand 2018 Declaration I hereby declare that this submission is my own work and that, to the best of my knowledge and belief, it contains no material previously published or written by another person nor material which, to a substantial extent, has been accepted for the qualification of any other degree or diploma of a University or other institution of higher learning, except where due acknowledgment is made in the acknowledgments. ------------------------------------ --------------------------------------- OLABOYEJO OLOWOYEYE (05-June-2018) ii Abstract Analysis of Linux binaries for indicators of compromise is an area of research gaining in interest due to the ubiquity of Internet connected embedded devices. These devices have also been the subject of high profile cybersecurity incidents as a result of the damage caused by their compromise. Malware analysis sandboxes are used to examine malware samples in an isolated environment. They provide a safe environment for the analysis of malware. Most of the discussion on malware analysis and associated tools have been devoted to the Windows operating system. This is because the Windows operating system is the dominant operating system in the desktop operating system space. This research examines the Linux operating system and evaluates the malware analysis sandboxes that are available for the examination of malware developed for the platform. These analysis sandboxes were tested against Linux malware binaries and the relative effectiveness of the sandboxes were observed. Malware samples were sourced from online repositories and a honeypot setup. The malware samples obtained from the repositories were restricted to those first submitted to the portals within the last four years. The honeypot was deployed to attract malware samples in the wild that are possibly unknown to existing portals. Four malware samples were extracted from the honeypot which were added to the two hundred and ninety-three (293) selected from VirusTotal and VirusShare. The five sandboxes tested were REMnux, Limon, Cuckoo, Detux and HaboMalhunter. The malware samples were examined and analysed on these platforms. The static and dynamic analysis features of these tools were observed as well as their support for automation and reporting. The consistency of the results where applicable were also noted. It was observed that despite the consistency of analysis noticed; collectively, the five sandboxes failed to detect indications of compromise in twenty-seven (27) of two hundred and ninety-seven (297) malware samples. HaboMalhunter was found to be the most effective during dynamic analysis in the detection of indications of compromise; however, its workflow required each analysis run to be done manually because it did not have in-built virtual machine orchestration like Limon, Detux and Cuckoo. During static analysis results, the results were observed to be similar with the exception of Limon which employed Yara rules to detect the packers used to mask the malware samples. Limon was also alone in its use of Context Triggered Piecewise Hashing (CTPH) to determine the similarity between malware samples by its maintenance of a master list of analysed samples. Cuckoo and HaboMalHunter generated output reports in HTML and JSON while Detux supported only JSON output. REMnux and Limon generated only plaintext output reports. The addition of virtual machine control to HaboMalhunter to restore virtual machine state before and after each analysis run was suggested as a recommended improvement to facilitate the automation of the analysis process. The need to develop more packing signatures for Yara rules was also mentioned for the automatic detection of packers. iii Contents Evaluating Open Source Malware Sandboxes with Linux malware ...................................................... i Declaration .............................................................................................................................................. ii Abstract .................................................................................................................................................. iii List of Figures ....................................................................................................................................... viii List of Tables ........................................................................................................................................... x List of Abbreviations .............................................................................................................................. xi 1. Introduction ........................................................................................................................................ 1 1.1 Background, motivation and objective ......................................................................................... 1 1.2 Organisation .................................................................................................................................. 2 2 Literature Review ................................................................................................................................. 3 2.1 Introduction .................................................................................................................................. 3 2.2 Malware and the Linux Operating System .................................................................................... 3 2.3 Linux Operating System Internals ................................................................................................. 4 2.3.1 Internals ................................................................................................................................. 4 2.3.2 Forensic Artefacts ................................................................................................................ 16 2.4 Malware Analysis ........................................................................................................................ 20 2.4.1 Static Analysis....................................................................................................................... 20 2.4.2 Dynamic Analysis ................................................................................................................. 21 2.5 Related Work .............................................................................................................................. 21 2.5.1 Survey of malware analysis solutions .................................................................................. 21 2.5.2 Analysis of Linux Malware Samples ..................................................................................... 26 2.6 Research Goals ............................................................................................................................ 27 3 Research Design ................................................................................................................................. 29 iv 3.1 Introduction ................................................................................................................................ 29 3.2 Review of malware analysis methodology ................................................................................. 29 3.2.1 Sourcing malware samples .................................................................................................. 29 3.2.2 Analysis methods ................................................................................................................. 30 3.3 Data Acquisition .......................................................................................................................... 32 3.3.1 Honeypot.............................................................................................................................. 32 3.3.2 Public Repositories ............................................................................................................... 35 3.4 Analysis methodology ................................................................................................................. 36 3.4.1 Honeypot setup.................................................................................................................... 38 3.4.2 Sandbox ................................................................................................................................ 39 3.5 Research Questions and Hypotheses .......................................................................................... 45 3.5.1 REMnux ................................................................................................................................ 45 3.5.2 Limon.................................................................................................................................... 45 3.5.3 Cuckoo .................................................................................................................................. 46 3.5.4 Detux .................................................................................................................................... 46 3.5.5 HaboMalHunter ..................................................................................................................