+ All Categories
Home > Documents > Malware Dynamic Analysis Evasion Techniques: A SurveyMalware analysis is the way to achieve this...

Malware Dynamic Analysis Evasion Techniques: A SurveyMalware analysis is the way to achieve this...

Date post: 04-Jul-2020
Category:
Upload: others
View: 6 times
Download: 0 times
Share this document with a friend
33
Malware Dynamic Analysis Evasion Techniques: A Survey Amir Afianian 1 , Salman Niksefat 1 , Babak Sadeghiyan 1 , and David Baptiste 2 1 APA Research Center, Amirkabir University of Technology 2 ESIEA (C + V)O lab 1 {a.afianian, niksefat, basadegh}@aut.ac.ir 2 [email protected] June 2018 Abstract The Cyber world is plagued with ever-evolving malware that readily infiltrates all defense mechanisms, operates viciously unbeknownst to the user and surreptitiously exfiltrate sensitive data. Understanding the in- ner workings of such malware provides a leverage to effectively combat them. This understanding, is pursued through dynamic analysis which is conducted manually or automatically. Malware authors accordingly, have devised and advanced evasion techniques to thwart or evade these analyses. In this paper, we present a comprehensive survey on malware dynamic analysis evasion techniques. In addition, we propose a detailed classification of these techniques and further demonstrate how their effi- cacy hold against different types of detection and analysis approach. Our observations attest that evasive behavior is mostly interested in detecting and evading sandboxes. The primary tactic of such malware we argue, is fingerprinting followed by new trends for reverse Turing test tac- tic which aims at detecting human interaction. Furthermore, we will posit that the current defensive strategies beginning with reactive methods to endeavors for more transparent analysis systems, are readily foiled by zero- day fingerprinting techniques or other evasion tactics such as stalling. Ac- cordingly, we would recommend pursuit of more generic defensive strate- gies with emphasis on path exploration techniques that has the potential to thwart all the evasive tactics. 1 Introduction Gaining access through ARPANET network, Creeper copied itself remotely to other computers, and, prompted the message: “Catch me if you can”. Emerged 1 arXiv:1811.01190v1 [cs.CR] 3 Nov 2018
Transcript
Page 1: Malware Dynamic Analysis Evasion Techniques: A SurveyMalware analysis is the way to achieve this understanding [3]. Initially, with the help of disassemblers, decompilers etc. analysts

Malware Dynamic Analysis Evasion Techniques:

A Survey

Amir Afianian1, Salman Niksefat1, Babak Sadeghiyan1, and DavidBaptiste2

1APA Research Center, Amirkabir University of Technology2ESIEA (C + V)O lab

1{a.afianian, niksefat, basadegh}@[email protected]

June 2018

Abstract

The Cyber world is plagued with ever-evolving malware that readilyinfiltrates all defense mechanisms, operates viciously unbeknownst to theuser and surreptitiously exfiltrate sensitive data. Understanding the in-ner workings of such malware provides a leverage to effectively combatthem. This understanding, is pursued through dynamic analysis whichis conducted manually or automatically. Malware authors accordingly,have devised and advanced evasion techniques to thwart or evade theseanalyses. In this paper, we present a comprehensive survey on malwaredynamic analysis evasion techniques. In addition, we propose a detailedclassification of these techniques and further demonstrate how their effi-cacy hold against different types of detection and analysis approach.

Our observations attest that evasive behavior is mostly interested indetecting and evading sandboxes. The primary tactic of such malware weargue, is fingerprinting followed by new trends for reverse Turing test tac-tic which aims at detecting human interaction. Furthermore, we will positthat the current defensive strategies beginning with reactive methods toendeavors for more transparent analysis systems, are readily foiled by zero-day fingerprinting techniques or other evasion tactics such as stalling. Ac-cordingly, we would recommend pursuit of more generic defensive strate-gies with emphasis on path exploration techniques that has the potentialto thwart all the evasive tactics.

1 Introduction

Gaining access through ARPANET network, Creeper copied itself remotely toother computers, and, prompted the message: “Catch me if you can”. Emerged

1

arX

iv:1

811.

0119

0v1

[cs

.CR

] 3

Nov

201

8

Page 2: Malware Dynamic Analysis Evasion Techniques: A SurveyMalware analysis is the way to achieve this understanding [3]. Initially, with the help of disassemblers, decompilers etc. analysts

as an experiment in 1971 [1], Creeper carried no harmful purpose, yet, with itsquick propagation it cast the light on a future with individuals or entities incor-porating their malicious intentions into a software (hence the name malware),that are capable of inducing undesired and harmful effects on the infected sys-tems [2]. In those days, developing malware was merely about show off; but,in today’s world, as the Internet has integrated every individual, institute, andorganization into a single cohesive complex, the goal of malware authors haveextended to include far more lucrative objectives, i.e. money, intelligence, andpower. Accordingly, these possibilities have profoundly motivated a new mal-ware industry, the outcome of which, are highly sophisticated variants, whichaptly infiltrate systems and operate viciously unbeknownst to the user or defensemechanisms.

Devising countermeasure or technologies that can withstand this level of so-phistication would be possible merely by understanding the precise inner work-ings of such malware. Malware analysis is the way to achieve this understanding[3]. Initially, with the help of disassemblers, decompilers etc. analysts inspectedthe malware’s binary and code to infer its functionality. This approach, whichis also referred to as static analysis became far more arduous, and intricate withthe advent, and evolution of code obfuscation tactics [4, 5, 6, 7, 8] and otherevasion tactics targeting static analysis e.g. opaque constants [9], packers [10],etc. As a resolution, a promising approach that was adopted was dynamic anal-ysis in which the basis of analysis and detection is what the file does (behavior)rather than what the file is (binary and signature) [11]. Put differently, in dy-namic analysis, an instance of the suspected program is run and its behavioris inspected in run-time. This approach would obviate the hurdles posed byaforementioned static analysis evasion tactics. To thwart these efforts, how-ever, malware authors turned to a new category of evasion tactics that targeteddynamic analysis.

In this paper, we identify two modes of dynamic analysis i.e. manual andautomated. Manual dynamic analysis is a more traditional form of dynamicanalysis and is often conducted with the help of debuggers. Automated dynamicanalysis is a more novel approach and also a response to the ever-increasingnew samples that security vendors face on a daily basis. Automated dynamicanalysis is often represented by the Sandbox technology. Further, we conduct acomprehensive survey on evasion techniques that are tailored to each mode ofanalysis.

In addition, we will portray the current and also the emerging evasive trends.In the case of manual dynamic analysis evasion we posit that anti-debuggingtechniques are still significantly being practiced. Also, we will discuss how thenew fileless malware is emerging and prevailing the traditional dynamic analysis.Moreover, in the case of automated dynamic analysis, we divide evasion tacticsin two broad categories: detection-dependent, and detection-independent. Weargue that until recent times, sandbox technology have been focusing on tech-nologies that chiefly target the detection-depend evasion tactics. As a response,malware authors are gradually adopting more and more detection-independenttactics to evade such automated dynamic analysis environments.

2

Page 3: Malware Dynamic Analysis Evasion Techniques: A SurveyMalware analysis is the way to achieve this understanding [3]. Initially, with the help of disassemblers, decompilers etc. analysts

Our goal in this paper is threefold. First, given the importance of the sub-ject, we have aimed at offering a comprehensive classification, with the hopeof moving towards an established taxonomy. Second, we aspired to unveil thedirection toward which the evasive behavior is trending. Thus, we tried to yielda view of the current situation for pervasiveness of each evasion tactic. Ourthird goal is to identify the shortcomings of the current defensive strategies andoffer a direction which we deem to have more potential on effectively confrontevasive malware.

Our contributions are:

• We present a comprehensive survey of malware dynamic analysis evasiontechniques for both modes of manual and automated. There have beenseveral surveys on malware analysis evasion such as [12] which has merelyfocused on automated dynamic analysis evasion and covers only one (outof five that we have identified) evasion tactic. Other surveys like [13, 14]trivially surveyed analysis evasion and provide no detailed overview ofmalware dynamic analysis evasion.

• For both manual and automated modes, we present a detailed classificationof malware evasion tactics and techniques. To the best of our knowledge,this would be the first comprehensive survey of dynamic analysis evasiontactics that offers a thorough classification.

• We portray the current trends in the realm automated dynamic analysisevasion techniques and discuss about the proper course of action for thefuture directions.

1.1 Overview

1.1.1 Scope

Latest reports attest to the dominance of Windows malware by a staggeringratio of 77.22% in 2017 [15]. Statistics also show that due to the employmentof evasion techniques, “64% of AV scanners fail to identify 1% of the malwareafter 1 year” [16]. These figures have further motivated us to converge ourfocus on evasive malware targeting Windows OS. Moreover, in our research, wehave strove to probe the intersection of academia and industry. Thus, we havereviewed both academic papers, and related industry-provided literature.

1.1.2 Approach

Our primary endeavor has been to provide a detailed and vivid overview of dy-namic analysis evasion techniques. To this end, we have classified the resultsof our scrutiny in three levels: category, tactic, and technique. Each categoryrepresents a particular approach and a goal which is both shared and pursuedthrough different tactics. Each tactic then, is implemented via different tech-niques. Throughout the survey we elaborate the details down to the tactic level

3

Page 4: Malware Dynamic Analysis Evasion Techniques: A SurveyMalware analysis is the way to achieve this understanding [3]. Initially, with the help of disassemblers, decompilers etc. analysts

and we discuss several representative techniques. At the end of each section weprovide a summarizing table.

1.1.3 Evaluation

To fulfill the goals of this survey, we have employed several criteria such asefficacy and pervasiveness of different techniques which serve as the basis ofcomparisons for the related topic. In our summarizing tables we present datafrom reviewed works where statistics are available, and otherwise we offer eval-uations based on our own observation.

1.1.4 Organization

In section II, We discuss manual dynamic analysis (debugging) and correspond-ing anti-debugging tactics. In section III we discuss automated dynamic analysisand the corresponding evasion tactics. section II and III are followed by a dis-cussion. Finally, section IV concludes the paper. Figure 1 demonstrates ourproposed classification of the malware dynamic analysis evasion tactics.

Figure 1: A classification of malware dynamic analysis evasion tactics

2 Preliminaries

2.1 Evasion and Transparency

In literature, evasion constitutes a series of techniques employed by malware inorder to remain stealth, avoid detection, or hinder efforts for analysis. A majorevasion tactic as we will discuss, is fingerprinting [17]. With fingerprinting,malware tries to detect its environment and verify if it is residing in a productionsystem or an analysis system.

4

Page 5: Malware Dynamic Analysis Evasion Techniques: A SurveyMalware analysis is the way to achieve this understanding [3]. Initially, with the help of disassemblers, decompilers etc. analysts

In the same level, one major strategy is to hide the cues and clues that mightexpose the analysis system. A system is more transparent if it exposes fewerclues to malware [18].

2.2 Manual vs Automated

Manual and automated analysis are two major terms which form the basis of ourclassifications. The manual analysis is when the analysis process is performedby an expert human. Automated, on the other hand, is the process that isperformed automatically by a machine or software.

2.3 Detection vs Analysis

Previously, there was no need for defining these two terms. Detection wouldsimply refer to the process of discerning if a given file is malicious or not; anal-ysis, on the other hand, would refer to the process of understanding how thegiven malware work. Today, however, this dividing line is blurry. The reasonis that the role of automated analysis tools such as sandboxes is now extended.In addition to reporting on malware behavior, sandboxes are now playing theirrole as the core of automated detection mechanisms [18]. In this paper, wefollow the similar concepts when uttering ”analysis”. For ”manual” it wouldmean understanding the malware behavior [19], for the automated, additionallyit can mean detection.

2.4 Static vs Dynamic

There are two major types of analysis i.e. static, and dynamic. Static analysisis the process of analyzing the code or binary without executing it. Dynamicanalysis is the process of studying the behavior of the malware (API, systemcalls, etc.) at run-time. Both types of the analysis can be performed eithermanually or automatically. In this paper, our focus is on dynamic analysis andhow malware tries to prevent or evade such analyses.

2.5 Category, Tactic, and Technique

Throughout this paper, we use the terms ”category”, ”tactic”, and ”technique”that are the basis of our classification. Category of evasion is our high-levelclassification. Each category has the goal of evasion with a specific attitude forachieving it. This attitude is highly correlated with the efficacy of the evasionand is pursued by the tactics under each category. Tactics, in other words, arethe specific maneuvers or approach for evasion with the specified attitude of itsparent category. Finally, techniques are the various practical implementation ofthose tactics.

5

Page 6: Malware Dynamic Analysis Evasion Techniques: A SurveyMalware analysis is the way to achieve this understanding [3]. Initially, with the help of disassemblers, decompilers etc. analysts

3 Manual Dynamic Analysis Evasion

As cited in the introduction, due to the employment of code obfuscation, pack-ers, etc. static analysis of malware has become a daunting task. To obviate theconundrums and limitations of this approach, analysts opt for dynamic anal-ysis in which malware’s behavior is inspected in run-time and often with thehelp of debuggers. This way of examination has two major benefits; one is thatit relieves us from the impediments inflicted by packers, polymorphism, etc.Second, taking this approach enables us to explore the activities that manifestthemselves only in runtime [20] such as the interaction of the program withthe OS [11]. We view this approach which is aided by debuggers, under theterm “manual dynamic analysis”. The corresponding evasion tactics to this ap-proach involves the set of employed techniques within malware code with thegoal of hindering, impeding or evading the analysis process. These measuresinclude approaches such as detecting the presence of analysis tools on the sys-tem (e.g. wireshark, tcpdump, etc.) or detecting virtual-machines as a sign ofanalysis environment, but, the majority of manual analysis evasion techniquesare targeted toward debuggers which are the primary tools of manual dynamicanalysis. Hence, in the domain of manual dynamic analysis evasion, we convergeour focus on anti-debugging tactics.

Simply, anti-debugging is the application of one or more techniques, to fendoff, impede or evade the process of manual dynamic analysis (debugging) orreverse-engineering. It is noteworthy to mention that anti-debugging techniques,similar to obfuscation, are legitimate practices conducted by developers to pro-tect their software. This implies that anti-debugging has a long history which isfollowed by a wide and diverse set of techniques. In this section, we will presentour survey on the most cited manual dynamic analysis evasion (anti-debugging)tactics and corresponding techniques [11, 20, 21, 22, 23, 24, 25, 19, 26, 27, 28]that are more relevant to the context of malware. In addition, for each tech-nique, we employ 4 criteria to better yield an overview of relative weight andefficacy. We summarize our anti-debugging study in table 1. Three criteria forour comparison and our touchstone for evaluating them are as follows:

• Complexity: The difficulty of incorporating and implementing the tech-nique within malware code. We associate low complexity if the techniqueinvolves simple API calls for detection of debuggers’ presence, medium tothose that require several calls to inquire information from the system aswell and the need to deduce from the returned information the probabilityof debuggers presence, and high to those that are challenging to implementand require more than 30 lines of assembly code.

• Resistance: Resistance pertains to the difficulty level of counteractingthe evasion technique. If it would be as simple as altering some systeminformation (e.g. randomizing registry key or a bit in PEB) we considerit low; if defeating the anti-debugging technique requires user-level hookand dll injection we assign medium resistance; if kernel-level manipula-

6

Page 7: Malware Dynamic Analysis Evasion Techniques: A SurveyMalware analysis is the way to achieve this understanding [3]. Initially, with the help of disassemblers, decompilers etc. analysts

tions e.g. drivers is needed we set the resistance level as high; and ifthe countermeasure requires operations below OS (virtualization, emula-tion, etc.) we consider it very-high. Finally, we have N/A, associated totechniques for which there exist no countermeasures yet.

• Pervasiveness: Due to the extreme diversity of malware sample datasetit is hard to establish a ground truth for the pervasiveness of each tactic.However, we strive to provide a fair view of this metric based on otherworks [21, 29] in addition to our own observations and experience in thefield.

Additionally, we allot a column to textbfCountermeasure under Which we brieflynote how the anti-debugging technique could be circumvented.

Before scrutinizing the anti-debugging techniques, we will have a brief in-troduction on debuggers, their goals, types, and techniques. Building upon thisunderstanding, we can better understand and elaborate anti-debugging tacticsand what makes them feasible.

3.1 A Briefing on Debuggers

As Sikorski states, “A debugger is a piece of software or hardware used to testor examine the execution of another program [19]”. Among the core function-ality of debuggers [30], there are several features that are critical to malwareanalysis such as stepping through the code one instruction at a time, pausingor halting it on desired points, examining the variables, etc. To provide eachof the mentioned functionality, debuggers rely on different tactics and each tac-tic is often aided with specific hardware or software provisions that inevitablyresult in subtle changes on the system. For instance, to provide the pausingcapability, one of debuggers’ tactics is to set breakpoints. Using breakpoints isfurther assisted with either special hardware [31] (e.g. DR Registers of CPU andspecific API to access/alter them), or software (e.g. specific opcodes, etc.) [32]mechanisms. Single stepping, as another instance, is made possible by trigger-ing exceptions in the code which is aided by a specific flag (trap flag). One waya malware can discover the presence of the debugger is through the very sameaiding mechanisms or results of corresponding changes on the system which wewill elaborate more as we proceed.

Based on the needed functionality, debuggers are implemented following dif-ferent approaches [33], including user-mode debuggers e.g. OllyICE, OllyDbg,kernel debuggers e.g. WinDbg, KD, and simulator-based debuggers e.g. Ether[34], BOCHS [35]. Each of the designs, yield different levels of transparency.Kernel-level debuggers are more transparent than User-level debugger and pro-vide more detailed information as they operate in ring 0 (same level of privilegeas the OS). Simulator-based debuggers have an even higher level of privilegethan kernel debuggers since the OS in this setting is running atop the simulated(virtualized/emulated) hardware [34, 35] and consequently are more transpar-ent to malware. In the next section, we proceed to manual dynamic analysisevasion, or more specifically, anti-debugging tactics.

7

Page 8: Malware Dynamic Analysis Evasion Techniques: A SurveyMalware analysis is the way to achieve this understanding [3]. Initially, with the help of disassemblers, decompilers etc. analysts

3.2 Proposed Anti-Debugging Classification

We propose three major categories, as malware’s initial anti-debugging strate-gies: direct detection, deductive detection, and debugger evasion. As statedearlier, we elaborate on each category down to the tactic level along with acouple of representative techniques for each tactic. Finally, we summarize theresults of our scrutiny in table 1.

3.2.1 Direct Detection

We call the tactics of this category as “direct detection” in that, the malware,simply through direct observation of debugger’s byproducts, and artifacts. canspot its presence. One of the malware’s major leverages against debuggers stemsfrom the fact that debuggers were originally devised to debug legitimate software[20]. Thus, initially, there has been no stealthy countermeasure provisioned bythem. Moreover, when we want to enable debugging capability, we have toinstrument the system with necessary tools which obviously results in a widespectrum of traces in different levels of the system [23, 29]. Examining thesystem for such traces that are inherent to working principles of debuggers, isone major strategy that malware utilizes to detect the presence of a debugger.In this section, we will elaborate on these system changes and how malwaremight try to disclose them. This category of tactics are often easy to employand also easy to defeat. Moving from user-mode debuggers to simulation-basedones, this category of evasion pales in efficacy.

3.2.1.1 Reading PEB Process Environment Block (PEB) is a data struc-ture that exists per process in the system and contains data about that process[36]. Different sections of PEB contain information that can be probed by amalware to detect whether a debugger exists. The most obvious one is a fieldinside PEB named BeingDebugged which can be read directly or as Microsoftrecommends— and malware like Kronos [37] or Satan RaaS [38] implement— through the specific APIs that read this field, i.e. IsDebuggerPresent(),CheckRemoteDebuggerPresent(). Implementation of this technique is of triv-ial complexity which can be countered through alteration of BeingDebuggedbit [39] or API hook [22]. Other techniques based upon PEB involve utiliza-tion of NtGlobalFLags and ProcessHeap which are slightly more complex [25].Collectively, anti-debugging tactics relying on PEB, constitute the majority ofanti-debugging techniques observed in malware [21].

3.2.1.2 Search for Breakpoints To halt the execution, debuggers set break-points. This can be accomplished through hardware or software techniques. Inhardware breakpoints, the breakpoint address, for instance, can be saved inCPU DR registers or. In software breakpoints, the debugger would write thespecial opcode 0xCC (INT 3 instruction) into the process which is specificallydesignated for setting breakpoints. Consequently, the malware, if spots signs

8

Page 9: Malware Dynamic Analysis Evasion Techniques: A SurveyMalware analysis is the way to achieve this understanding [3]. Initially, with the help of disassemblers, decompilers etc. analysts

of these breakpoints, presumes the presence of a debugger. This can be ac-complished through a self-scan or integrity check, looking for 0xCC, or usingGetThreadContext to check CPU register [25]. The latter technique has beenemployed by malware such as CIH [40] or MyDoom.

This tactic is the second most observed anti-debugging technique in mal-ware’s arsenal [21] and is simple to implement (less than 10 lines of assemblycode often suffices). Countering this category of tactics, however, is not trivial.In the case of software breakpoints, for instance, the debugger has to keep andfeed a copy of the original byte that was replaced by 0xCC opcode [39].

3.2.1.3 System Artifacts From installation to configuration and execu-tion, debuggers leave traces behind in different levels of the OS, e.g. in the filesystem, registry, process name, etc. Hence, a malware can simply look for thesetraces. FindWindow(), FindProcess() are a couple of APIs that shcndhss [41]exploited to detect debuggers. The malware, for instance can give the name ofdebuggers as the parameter to FindWindow() to verify if its process exists onthe system or not [26, 42]. Most often, simple anti-debugging techniques aretrivially defeated. The countermeasure to this category of tactic is randomizingthe names, or altering the results of the aforementioned query through simpleAPI hooks. Even though attributed to one of the anti-debugging techniques inliterature, we have rarely observed it in the wild.

3.2.1.4 Parent Check Ordinarily, applications are executed either throughdouble clicking of an icon, or execution from command line, the parent processID of which is retrievable accordingly. It would be a pronounced sign of de-bugger if the examined parent process name belongs to a debugger or is notequivalent to process name of explorer.exe [25]. One straight forward techniqueis using CreateToolhelp32Snapshot() and checking if the parent process namematches the name of a known debugger [22]. A randomization of debuggers’process name suffices to defeat this technique. Another more complex way isto check the parent process ID against that of explorer.exe. A malware suchas [41] utilizes of the following functions: GetCurrentProcessId(), CreateTool-help32Snapshot(), Process32First() Process32Next() [21]. If the parent processID does not match with that of the explorer.exe, it might be a sign of debuggerspresence. Precise and effective employment of this technique faces some chal-lenges. If there are more than one process for explorer.exe, then, there wouldbe more than one PID for it. This would complicate the process by sparkingfalse positives in that the parent PID might match to one explorer.exe PID andnot the other. Countering this tactic would be skipping the relevant APIs [29].Our observations demonstrates few utilization of this tactic [21].

3.2.1.5 Mining NtQuerySystemInformation The ntdll NtQuerySystem-Information() is a function that accepts a parameter which is the class of infor-mation to query [25]. Most of these classes are not documented. There are manyways malware might pursue to leverage this function with the goal of spotting

9

Page 10: Malware Dynamic Analysis Evasion Techniques: A SurveyMalware analysis is the way to achieve this understanding [3]. Initially, with the help of disassemblers, decompilers etc. analysts

debugger’s signs. Debugger is easily exposed, for instance, if the malware passesthe SystemKernelDebuggerInformation() (0x23) class as the parameter to thisfunction, the returned values are two flags; one of them is KdDebuggerNotPre-sent(), if the value equals zero, it attests debuggers presence. Employment ofthis tactic is not simple (more than 40 lines of assembly code [25]), and nor iscircumventing it. The reason is that when this function is invoked, the returnedvalues are coming from the kernel. Defeating anti-debugging techniques follow-ing this tactic requires patching the kernel. vti-rescan [43], Wdf01000.sys [44],and Inkasso trojaner [45] are some instances that leverage this tactic.

As stated earlier, deployment of direct detection tactics is relatively straight-forward and trivial which in turn are often just as trivial to defeat. more subtleway of detecting and evading debuggers is through deductive detection which isthe subject of the next section

3.2.2 Deductive Detection

Tactics under this category fulfill the goal of inferring debuggers presence, ratherthan directly observing it. Tactics of this category calculate and assess theprobability of debugger’s presence. These inferences mostly rely on exploitingthe logic of the system (e.g. SEH Exception handling [46]). More specifically,as a way of illustration, the way Windows handles exceptions can be abused bymalware to illicit debugger presence). Malware may employ different ingenioustactics to this end which we explore in the following.

3.2.2.1 Traps Not to be mistaken with the trap flags, we define this cate-gory of tactics as “traps”. Following this tactic, the malware provisions codesthat when traversed or stepped through by debugger, production of specificinformation or lack thereof, would help the malware deduce the presence of adebugger. Many techniques fit this category and we elaborate a couple of themhere and hint at the rest in table 1.

One technique by which malware beguile debuggers to disclose cues of itspresence is using specific instructions and exploiting the logic of how these in-structions are handled. The handling is performed through Structured Excep-tion Handling SEH (You can refer to[46] for more information about SEH ). Forinstance, Max++ malware [47] embeds “int 2dh” instruction within its code.According to SEH, when this instruction is executed, in normal situation i.e.absence of debugger, an exception is raised and malware can handle it via atry-catch structure. However, if a debugger is attached, this exception will betransferred to the debugger rather than the malware; the absence of expectedexception is the logic that the malware entertains to deduce the presence ofa debugger. Malware may employ other techniques to lay their traps such asembedding specific instruction prefixes [26], or other instructions such as 41h[25]. These techniques are of low complexity and can be implemented with lessthan 20 lines of code (in assembly). One way of countering these traps requiresdebuggers to skip these instructions. According to our survey, utilizing traps isa fairly common approach [21].

10

Page 11: Malware Dynamic Analysis Evasion Techniques: A SurveyMalware analysis is the way to achieve this understanding [3]. Initially, with the help of disassemblers, decompilers etc. analysts

3.2.2.2 Timing-Based Detection Timing-based detection are among themost efficacious tactics of inferring debugger’s presence. Adroit employment ofthis tactic reliably exposes the presence of a debugger and circumventing themis an arduous task.

The logic behind this tactic follows malware authors’ presumption that aparticular function or instruction set, require merely a minuscule amount oftime. Thus, if a predefined threshold is surpassed, malware would infer thepresence of a debugger. Timing-based detection can be carried out either locallywith the aid of local APIs(GetTickCount(), QueryPerformanceCounter(), etc.[48]) or CPU rdtsc (read time stamp counter) or can be performed by inquiringan external resource through the network [49] to conduct the timing. Localtiming is simple to employ and difficult to circumvent. Countering timing-baseddetection conducted with the aid of external resource (using NTP or tunneledNTP), however, is still an open problem [28]. W32/HIV [50], W32/MyDoom[51], W32/Ratos [52] are infamous malware that are known to have exploitedthe timing discrepancies.

3.2.3 Debugger Escaping

Unlike previous categories the goal of which, were detecting or inferring de-bugger’s presence, the goal of this category is assuring that the execution ofmalware wholly or partially takes place. Malware adopt catching approaches tofulfill the goal of this strategy. We will have a survey on tactics of this categoryin the following.

3.2.3.1 Control Flow Manipulation Through this tactic, malware ex-ploit the implicit flow control mechanism conducted by Windows OS. To im-plement these techniques, malware authors often rely on callbacks, enumerationfunctions, thread local storage (TLS ), etc. [25, 29]. There are several notewor-thy techniques that fulfill the goals of “debugger Escaping” and each deservesa brief introduction.

• Thread-hiding :A simple and effective technique is thread-hiding whichif used, prevents debugging events from reaching debugger. Microsofthas provisioned special API [53, 54]. This technique uses NtSetInfor-mationThread() function to set the field HideThreadFromDebugger() ofETHREAD kernel structure [27]. This is a powerful technique and simpleto implement and can be countered by hooking the involving functions.LockScreen [54] is an instance known to have utilized this technique.

• Suspending Threads: A more aggressive way malware might step into isstriving to halt the process of the debugger to continue its own executionwith little trouble. This technique can be effective against only user-mode debuggers and can be carried out by leveraging SuspendThread() orNtSuspendThread() from ntdll [21]. Suspending threads is one of the anti-debugging techniques that Kronos banking malware used in its arsenal[37].

11

Page 12: Malware Dynamic Analysis Evasion Techniques: A SurveyMalware analysis is the way to achieve this understanding [3]. Initially, with the help of disassemblers, decompilers etc. analysts

• Multi-threading : Another technique to bypass debuggers and continuethe execution is multi-threading. One way to implement it through Cre-ateThread() API. Malware that is packed, often spawns a separate threadwithin their process to perform the decryption routines [27]. However,there are instances where malware executes a part of its malicious codethrough a different thread outside the debugger. McRat [55] and Ver-texnet [56] have incorporated such technique. Countering this techniqueis tricky. One way is to set breakpoints at every entry point [57, 58].

• Self-debugging : Self-debugging is an interesting technique which preventsthe debugger from successfully attaching to the malware [59]. By default,each process can be attached to merely one debugger. Malware exploitsthis by running a copy of itself and attaches to it as a debugger. Hencepreventing another debugger to own it. There are several ways to imple-ment this tactic, for instance by leveraging DbgUiDebugActiveProcess() orNtDebugActiveProcess().

Collectively, debugger escaping techniques are not much common among thesamples we have observed.

3.2.3.2 Lockout evasion In Lockout tactic, malware accomplishes the goalof continuing its execution by impeding with the working of the debugger. Mal-ware achieve this through several techniques. One is to opt for BlockInput()function as in the case of Satan RaaS [38], through which malware preventsmouse and keyboard inputs until its conditions are satisfied. Other techniquesinvolve exploiting a feature in Windows NT-based platforms that allow for theexistence of multiple desktops. Malware, such as LockScreen, [54] with the helpof CreateDesktop() followed by SwitchDesktop() can select a different activedesktop and continue its working unbeknownst to the debugger [58].

3.2.3.3 Debugger Specific Debugger specific evasion exploit vulnerabili-ties that are exclusive to a specific debugger. These vulnerabilities are difficultto discover, but simple to put into action. A famous instance pertains to Olly-DBG [27]. Regular versions of this debugger have a format string bug which canbe exploited to cause it to crash by passing an improper parameter to OutPut-DebugString() function. Another pervasive-at-the-time technique was relatedto SoftICE debugger which was susceptible to multiple DoS attacks due to twovulnerable function [58]. Malware like [60] exploited these vulnerabilities wouldcause the ”bluescreen of death. SoftICE is no longer supported and the dllfile that caused the vulnerability in OllyDBG is now fixed. But the idea stillremains, if a vulnerability within a specific debugger is discovered, exploiting itwould be a potent anti-debugging technique. Table 1 summarizes the results ofour study.

3.2.3.4 Fileless malware Fileless malware, non-malware and occasionallycalled Advanced Volatile Attack (AVT) attacks, are the latest trend in the

12

Page 13: Malware Dynamic Analysis Evasion Techniques: A SurveyMalware analysis is the way to achieve this understanding [3]. Initially, with the help of disassemblers, decompilers etc. analysts

evolution of malware. [61]. In contrast to all prior existence of malware, filelessmalware requires no file to operate and they purely reside in memory and takeadvantage of existing system tools e.g. powershell [62].

The purpose of such attacks is to make the forensics much harder. To analyzea malware is to analyze its executable; and in fileless malware, there is noexecutable to begin with. In some cases such as SamSam [63] the only way tojust retrieve a sample for analysis would be to catch the attack taking place live.These attacks inherently are not easy to conduct, but, with the help of exploit-kits are more readily available. A 2018 report by McAfee shows a 432% increaseof fileless malware in 2017 [64] and projected to constitute 35% of attacks in2018 [65].

With the aid of debuggers, the analyst can overcome many hurdles and lim-itations of static analysis in the manual dynamic analysis. However, new trendsand real world scenarios in which the vendors face thousands of new malwaresamples daily demands a more agile approach which is beyond the capabilitiesof manual dynamic analysis. In the next section, we discuss the emergence ofautomated dynamic analysis approach and Sandboxes as a response to thesechallenges and elaborate malware’s tactics to thwart them. Table 1 summarizesour survey of manual dynamic evasion techniques.

3.3 A Discussion

In table 1 we summarize our survey on malware manual dynamic analysis eva-sion. In this table, we compare the techniques based on three criteria i.e. com-plexity of implementation, resistance against manual dynamic analysis, andpervasiveness. In addition, in the example column we provide malware samplesthat incorporate the corresponding techniques.

Manual dynamic analysis evasion, or anti-debugging is as old as the existenceof software. What we have observed in the last decade, attest that incorporationof anti-debugging is prevalent and has been steadily increasing. Authors in [66]demonstrate that on average, more than 70 of malware samples utilize anti-debugging techniques. The majority of these techniques are the ones we havecovered in this section. In addition, we have noticed that besides the verypervasive techniques such as IsDebuggerPresent, malware are also employingmore timing-based techniques.

Another emerging trend in malware industry, is fileless malware. Such mal-ware as in the case of Rozena [67] leverages exploits to execute malicious com-mands right from the memory. Given the difficulties of acquiring samples inpost-infection phase and the fact that they reside merely in memory, perhapswe can conclude that fileless or AVT attack is the most effective manual dynamicanalysis evasion tactic.

13

Page 14: Malware Dynamic Analysis Evasion Techniques: A SurveyMalware analysis is the way to achieve this understanding [3]. Initially, with the help of disassemblers, decompilers etc. analysts

Table 1: Classification and comparison of malware anti-debugging techniques

Criteria

Complexity Resistance Countermeasure

Tactic Pervasiveness

Malware

Sample Cat.

Tactic Technique

Dir

ect

Det

ecti

on

Reading

PEB

IsDebuggerPresent()

CheckRemoteDebuggerPresent() Low Low

Set the Beingdebugged flag to

zero

Very

high [35, 36] ProcessHeap() Medium Low

Set heap_groawable glag for

flags field and forceflags to 0

NtGlobalFlags() Low Medium Attach debugger after process

creation,

Detecting

Breakpoints

Self-scan to spot INT 3 instruction

Self-integrity-check Low Medium

Set breakpoint in the first byte of

thread

High

[38]

Read DR Registers

(GetThreadContext() etc.) Low Medium

Reset

the context_debug_registers flag

in the contextflags before/after

Original ntgetcontextthread

function call

[22, 38]

System

Artifacts

FindWindow(),

FindProcess(),

FindFirstFile()

Low Low Randomizing variables Low [39]

Mining

NTQuery

Object

ProcessDebugObjectHandle()

ProcessDebugFlags()

ProcessBasicInformation()

Medium High Modify process states after

calling/skipping these API Medium

[41, 42,

43]

Parent Check

GetCurrentProcessId() +

CreateToolhelp32Snapshot()+

(Process32First())+Process32Next()

Medium Medium API hook Low [39]

Ded

uct

ive

Det

ecti

on

Traps

Instruction Prefix (Rep) High Medium Set breakpoint on exception

handler,

Allow single-step/breakpoint

exceptions to be automatically

passed to the exception

handler

High [45] Interrupt 3, 0x2D Low High

Interrupt 0x41 Low High

Timing-

Based

Detection

Local Resource: RDTSC

timeGetTime(), GetTickCount(),

QueryPerformanceCounter

GetLocalTime()

GetSystemTime()

Low High

Kernel patch to prevent access to

rdtsc outside privilege mode,

Maintain high-fidelity time

source,

Skip time-checking APIs

Medium [48, 49,

50]

Query external time source (e.g. NTP) Medium N/A None, open problem

Deb

ugger

Esc

ap

ing Control Flow

Manipulation

Self

Debugging

DebugActiveProcess()

DbgUiDebugActiveProcess()

NtDebugActiveProcess()

Medium Low Set debug port to 0

Low

[52]

Suspend

Thread

SuspendThread()

NtSuspendThread() Low Low N/A [35]

Thread

Hiding

NtSetInformationThread()

ZwSetInformationThread() Low Low Skip the APIs [52]

Multi-

threading CreateThread() Medium Low Set breakpoint at every entry [53, 54]

Lockout

Evasion

BlockInput(),

SwitchDesktop() Low Low Skip APIs Low [33, 47]

Debugger

Specific

OllyDBG: InputDebugString() Low High Patch entry of

kernel32!outputdebugstring() Low

[58]

SoftICE Interrupt 1 Low High Set breakpoint inside

kernel32!createfilefilew() Medium

Fileless

(AVT)

Web-based exploits

System-level exploits High Very High N/A Low [61]

14

Page 15: Malware Dynamic Analysis Evasion Techniques: A SurveyMalware analysis is the way to achieve this understanding [3]. Initially, with the help of disassemblers, decompilers etc. analysts

4 Automated Dynamic Analysis Evasion

Although effective, the manual dynamic analysis suffers a critical limitation,that is, time. A 2018 statistics provided by McAfee reports on receiving morethan 600K new samples each day [68]. Analyzing this massive number of mal-ware samples calls for a far more agile approach. This demand led to a newparadigm of analysis which we referred to as automated dynamic analysis. Sand-box, is the representative technology for this paradigm. In this section, we willhave a brief introduction to sandboxes and further propose a classification andcomparison of malware evasion tactics.

4.1 An overview of malware sandboxes

The concept behind a malware automated dynamic analysis system is to capturethe suspicious program in a controlled and contained testing environment calledsandbox, where its behavior in runtime can be closely studied and analyzed.Initially, sandboxes were employed as a part of the manual malware analysis.But today, they are playing their roles as the core of automated detection process[18]. Sandboxes are built in different ways. To better grasp the evasion tactics,and depict how they stand against different sandbox technologies, first, we musthave a sense of how they are made.

4.1.1 Virtualization-based sandboxes

A virtual machine (VM) according to Goldberg [69], is “an efficient, isolatedduplicate of the real machine.” The hypervisor or virtual machine manager(VMM ) is in charge of managing and mediating programs’ access requests tothe underlying hardware. In other words, every virtual machine atop the VMM,in order to access the hardware, must first pass through the hypervisor. Thereare a couple of ways to implement sandboxes based on virtualization. Oneway is to weave the analysis tools directly into the hypervisor as in the caseof ether [34]. The other approach would be to embed the analysis tools (e.g.installing hooks) within the virtual machine that runs the malware sample.Instances of this design are: Norman sandbox [70], CWsandbox [71]. Both ofthe methods inherently leak subtle cues which a malware could pick on to detectthe presence of a sandbox. In the latter case, for instance, the VMM has toprovide the required information to the analysis VM which means whenevera sensitive system call is being made by the malware, the VMM has to passthe control to the analysis tools inside the VM. Challenges of performing theseprocedures without leakage are profound which we will elaborate accordingly.

4.1.2 Emulation-based sandboxes

An emulator is a software that simulates a functionality or a piece of hardware[72]. An emulation-based sandbox can be achieved through different designs.

15

Page 16: Malware Dynamic Analysis Evasion Techniques: A SurveyMalware analysis is the way to achieve this understanding [3]. Initially, with the help of disassemblers, decompilers etc. analysts

One would be to simulate the necessary OS functions and APIs. Another ap-proach is the simulation of CPU and memory and is the case for many anti-virusproducts [72]. Simulation of I/O in addition to memory and CPU is what inliterature is referred to as the full system simulation. The eminent featuresof emulation-based sandboxes are the great flexibility and detailed visibility ofmalware inner workings (introspection) they offer. Especially with the full sys-tem emulation, the behavior of the program under inspection (PUI) could bestudied with minute details.

4.1.3 Bare-metal sandboxes

Recent evolved and perplexing evasion tactics, employed by sophisticated mal-ware demands a new paradigm of analysis. The emerging idea is to executethe malware in several different analysis environments simultaneously with theassumption that any deviation in behavior is a potential indication of maliciousintents [73]. The feasibility of this idea requires a reference system in whichthe malware is analyzed without utilization of any detectable component andthe ideal choice would be a bare-metal environment equal to a real productionsystem in terms of transparency. There have been several products in this veine.g. Barebox, bare cloud etc. [73, 74, 75]. Along with the merits that eachdesign offers, subtle flaws or specific working principles that malware exploit toforge their evasion tactic.

4.2 Proposed Classification of Automated Dynamic Anal-ysis (sandbox) Evasion tactics

If the malware achieves one specific goal, it can triumphantly evade the sandbox.This goal is to behave nicely or refrain from executing its malicious payload solong as it resides within the sandbox. This strategy capitalizes on two facts.The first is that due to a massive number of malware samples and limitationof resources, sandboxes allot a specific limited time to the analysis of a sample.The second stems from an inherent limitation of dynamic analysis. In dynamicanalysis since the “runtime behavior” and “execution” is being inspected, onlythe execution path is visible to the inspector (sandbox). Thus, if a malwareportrays no malevolent behavior while under examination, the sandbox flags itas benign.

We propose to classify automated dynamic analysis evasion tactics under twocategories i.e. Detection-Dependent evasion and Detection-Independent evasion.We will elaborate on these tactics along with several techniques under each tac-tic. In addition, we briefly hint at the way sandboxes try to defeat these tactics.To provide a more coherent overview of these evasion techniques, we employthree criteria as follows which would serve as the basis for our comparison:

• Complexity: The difficulty of implementing an evasion tactic. Ourtouchstone for evaluating complexity are lines of code (LOC ), and more

16

Page 17: Malware Dynamic Analysis Evasion Techniques: A SurveyMalware analysis is the way to achieve this understanding [3]. Initially, with the help of disassemblers, decompilers etc. analysts

importantly the challenges which differ per tactic. We will discuss thesechallenges in the elaboration on the tactics

• Pervasiveness: This criterion captures the relative prevalence of a par-ticular tactic. Based on our observations or security reports [68, 76], andsecurity reports, we try to provide a relative prevalence for each tactic.

• Efficacy-Level: Each tactic have an efficacy level. This demonstratesagainst which type of sandbox that particular tactic is effective.

4.2.1 Detection-Dependent Evasion

4.2.1.1 Fingerprinting Fingerprinting is a tactic pursued by malware todetect the presence of sandboxes by looking for environmental artifacts or signsthat could reveal the indications of a virtual/emulated machine. These signscan rangefrom device drivers, overt files on disk and registry keys to discrep-ancies emulated/virtualized processors. Indications of VM or an emulation arescattered in different levels [77, 78, 79, 80]. It is noteworthy to mention thatinitially, many sandboxes such as Norman [70] were developed upon VMs. Thus,in literature, you may still observe the terms sandbox and VMs being used in-terchangeably to imply a contained analysis environment. The very same fact isalso the reason for the advent of techniques referred to as anti-VM, suggestingthat detection of a virtual machine would potentially mean an analysis envi-ronment. Different studies have been conducted to uncover the levels at whichsandboxes leave their marks [23, 81]. These levels are:

• Hardware: Devices and drivers are overt artifacts that malware mightlook for to identify its environment. In the case of devices, VMs often em-ulate devices that can be readily detected as in the case of Reptile malware[82]. This ranges from obvious footprints such as the VMWare Ethernetdevice with its identifiable manufacturer prefix, to more subtle marks.Moreover, specific drivers are employed by VMs to interact properly withthe host OS. These drivers are other indications of analysis environmentfor malware. For instance in the path: C:\Windows\System32\Drivers

exist such signs that could expose VMWare, VirtualBox etc. (e.g. Vm-mouse.sys, vm3dgl.dll, VMToolsHook.dll etc.) [83].

• Execution Environment: A malware inside sandbox experiences sub-tle differences in the environment within which they are executed. Kernelspace memory values, for instance, are different between a sandbox and na-tive system that can be detected by malware as in the cases of Agobot andStorm Trojans [84, 85]. Artifacts of this level manifest themselves eitherin memory or execution. As in the case of memory artifacts, for instance,to allow inspection and control between host and guest OS, VMWare cre-ates a channel between them (“ComCHannel”). Virtual PC hooks workin the same way [86].

17

Page 18: Malware Dynamic Analysis Evasion Techniques: A SurveyMalware analysis is the way to achieve this understanding [3]. Initially, with the help of disassemblers, decompilers etc. analysts

• Application: When an analysis application is used in an environment,its presence is usually disclosed due to the artifacts of installation andexecution which can be picked up by inquisitive malware such as Rbot [87]or Phatbot [88]. Even if not executed, evidence of the analysis tools mightbe residing on the disc, registry keys etc. which could be readily foundby malware especially if they contain well-known file name or locationse.g. SYSTEM\CurrentControlSet\Control\VirtualDeviceDrivers. Ina similar instance, if the names are not altered or the corresponding pro-cesses concealed, they can be enumerated by malware with little trouble.For instance, VMtools.exe, Vmwareuser.exe or vboxservice.exe if queriedby malware, are vivid indicators of a virtual machine and analysis envi-ronment.

• Behavior: Perhaps, the most troublesome of all, for anti-malware vendorsto conceal, are the leakages caused by imperfect virtualization/emulation,or characteristics that are innate to such environments. Of particular in-terest are discrepancies of behavior between an emulated CPU and a phys-ical one [77]. Performance of an application running under emulation is in-ferior to a real system. This performance penalty stems from translationsor interceptions that has to be carried out in an emulation/virtualization.Such discrepancies can be disclosed through a diverse set of timing at-tacks [89, 49, 90]. Computing absolute performance for fingerprinting isan arduous task due to the diversity of hardware configuration.

An alternative for malware is to calculate the relative performance [77].Pursuing this method, malware compares performance ratio of two ormore operations on the same system. If the measurement varies signifi-cantly among production and emulation systems, there’s a high chance ofsandbox presence. Another interesting way of exploiting the limitationsof emulation is observing and comparing the effects of caching on emu-lated and real environments. In this technique, a function is executed anumber of times. As expected, the first run must to be the slowest. Thesame test is performed again, this time, in absence of caching. Timinganalysis depicts the effectiveness of the employed caching. Simulation ofprocessor cache is a complex task and emulators may not support it, theresult of which is exposure of emulation in the aforementioned test [77].Another noteworthy set of techniques are the red pill tests [91]. An in-evitable behavioral artifact sandboxes share, are the imperfect simulationof CPU and residing instruction bugs. If a malware specifically finds suchbugs and if during the execution, it notices a mishandled instruction itwill suspect the presence of the sandbox.

• Network In addition to the previous levels that were suggested by Chenet al. [23], malware can also probe the network in pursuit of sandbox’smarks. These marks are manifested in many forms such as known fixedIP addresses, [92], limitations pertaining to the sandboxes that prevent oremulate the internet access [93, 94] or extremely fast internet connection

18

Page 19: Malware Dynamic Analysis Evasion Techniques: A SurveyMalware analysis is the way to achieve this understanding [3]. Initially, with the help of disassemblers, decompilers etc. analysts

[95]. One technique for instance, proposed in [92] is detecting sandboxesbased their known IP addresses. which is acquired in an earlier attackthrough a decoy malware.

Fingerprinting tactic was the initial endeavor of malware authors to detect andevade sandboxes and as we observed the techniques have evolved significantly. Incountering fingerprinting, most solutions are reactive, namely, the fingerprintingtechnique must first be disclosed, then the corresponding counter evasion willbe provisioned. Collectively, fingerprinting tactic is still the dominant approachto evade sandboxes. [76].

4.2.1.2 Reverse Turing Test The second tactic that aims at detection,is checking for human interaction with the system. This tactic capitalizes onthe fact that sandboxes are automated machines with no human or operatordirectly interacting with them. Thus, if a malware does not observe any humaninteraction, it presumes to be in a sandbox. Such tactic is referred to as ReverseTuring Test since a machine is trying to distinguish between human or AI. Thistactic can be carried out through various techniques [80, 96, 97, 95, 98]. Forinstance, the UpClicker [98] or a more advanced one, BaneChant [99] await themouse left-click to detect human interaction [100]. In a large portion of reverseTuring test techniques, malware looks for last user’s inputs. To do so, malwareoften leverages a combination of GetTickCount() and GetLastInputInfo() func-tions to compute the idle time of the user. To test whether it’s running on a realsystem, the malware waits indefinitely for any form of user input. On a real sys-tem eventually, a key would be pressed or mouse would be moved by the user.If that occurs for a specific number of times, malware executes its maliciouspayload. To counter this tactic of evasion, simulating human behavior mightseem intuitive but it might be counterproductive. One reason is that digitally-generated human behavior can also be detected [101]. The second reason is thatlimitation of designing such reversal Turing test seems to be merely a functionof imagination. To demonstrate our point, consider another technique in whichthe malware waits for the user to scroll to the second page of a Rich Text For-mat (RTF) before it executes the malicious payload. Or In another approach,using Windows function GetCursorPos(), which holds the position of system’scursor, the malware checks the cursor movement speed between instructions; ifit exceeds a specific threshold, it would imply that the movement is too fastto be human-generated and malware ceases to operate [100]; or another morerecent technique which relies on seeking wear and tear signs of a production sys-tem [102]. The seemingly endless possibilities for designing reversal Turing testsmakes it a puzzling challenge for sandboxes to counter. This tactic is becomingmore prevalent, but still not as pervasive as fingerprinting [76].

4.2.1.3 Targeted The third tactic of the detection-dependent category istargeted detection. This tactic is slightly different from the previous ones inthat instead of striving for detecting or evading a sandbox directly, the mal-ware fingerprints the environment to verify if the host is precisely the intended

19

Page 20: Malware Dynamic Analysis Evasion Techniques: A SurveyMalware analysis is the way to achieve this understanding [3]. Initially, with the help of disassemblers, decompilers etc. analysts

(targeted) machine. In other words, malware looks for its target, not sandbox.This tactic can be employed following different routes:

• Environmentally-targeted: Stuxnet is known to be the first Cyberweapon that incorporated targeting tactic as a portion of its evasion tactics[97]. Stuxnet explicitly looked for the presence of a specific industrialcontrol system and would remain dormant otherwise. Depending on theinfection approach, APT attacks follow different routes.

• Individually Targeted: In the case of Stuxnet, the strategy was to keepprobing victims (a wormy behavior) until the target was reached. Otherclasses of APT include the attacks such as darkhotel [103], in which theinfection is conducted through spear phishing (i.e. directly aimed at thetarget).In other words, the attackers make sure that their malicious codeis directly delivered to their target.

• Environment-dependent Encryption: Such targeted malware, havean encrypted payload the decryption of which, is subjected to a key thatis derived from its victim’s environment. The key might be a hardwareserial number, specific environmental settings, etc. You can refer to [104]for a thorough discussion of the topic.

4.2.2 Detection-Independent Evasion

The major difference of this category of tactics is that they do not rely ondetecting the target environment, and their evasion tactic is independent oftarget system which relieves them from having to employ sophisticated detectiontechniques. Consequently, efforts directed at achieving more transparency hasno effects on these tactics. In the following we elaborate on the tactics of thiscategory and several techniques to deploy them.

4.2.2.1 Stalling This tactic of analysis evasion capitalizes on the fact thatsandboxes allot a limited amount of time to the analysis of each sample. Amalware has to simply postpone its malicious activity to the post-analysis stage.To this end, malware authors have come up with the idea of stalling [16] whichcan be achieved through a diverse set of techniques that range from a simplecall to sleep() function to more sophisticated ones. Here we examine some ofthe known major stalling techniques.

• Simple Sleep: Sleeping is the simplest form of stalling and just as sim-ple to defeat. The idea was to remain inactive for n minutes in order forthe sandbox inspection to timeout before observing any malicious activ-ity. After being released to the network, the malware would execute themalicious payload. The infamous DUQU [105] exhibits such technique asone of its prerequisites for ignition. It requires that the system remainidle for at least 10 minutes [5]. Another example would be the Kheliosbotnet [106]. A new variant of Khelios sample found in 2013 (Called

20

Page 21: Malware Dynamic Analysis Evasion Techniques: A SurveyMalware analysis is the way to achieve this understanding [3]. Initially, with the help of disassemblers, decompilers etc. analysts

Nap) calls the SleepEx() API with a timeout of 10 minutes. This delayin execution outruns the sandbox analysis timeout which is followed byachieving the harmless flag. To counter such techniques, sandboxes cameup with the simple idea of accelerating the time (called sleep patching).Although seemingly logical, sleep patching has unpredicted effects. Aninteresting side effect of sleep patching was observed in specific malwaresamples where the acceleration actually lead to inactivity of malware in-stances that wait for human interaction within a predefined period of time[101]. Despite its side effects, sleep patching turned out to be effective insome cases and malware authors came up with more advanced techniquesas a response.

• Advanced Sleep: New malware instances such as Pafish [107] were foundto opt for more advanced sleeping tricks. They detect sleep-patching usingthe rdtsc instruction in combination with Sleep() to check the accelerationof execution.

• Code stalling: While ”sleeps”, delay the execution, in code stalling themalware, opts for executing irrelevant and time-consuming benign instruc-tion to avoid raising any suspicions from the sandbox [101]. Rombertik[108] is a spyware aimed at stealing confidential data. To confuse sand-boxes, it writes approximately 960 million bytes of random data to memory[109]. The hurdles this technique impose on sandboxes are two-fold. Thefirst one is the inability of the sandbox to suspect stalling as the sampleis running actively. The second one, is that this excessive writing wouldoverwhelm the tracking tools [108]. In another striking code stalling tech-nique, the malware encrypts the payload using a weak encryption key andbrute-forces it during the execution [73].

4.2.2.2 Trigger-based The second tactic that does not rely on detectionis a trigger-base tactic or more traditionally logic bombs. As we have alreadynoted, the basis of evading sandboxes is to simply refrain from exhibiting the ma-licious behavior so long as they are in the sandbox. Another tactic for remainingdormant would be to wait for a trigger. There are many environmental vari-ables that can serve as malware triggers ranging from system date to a speciallycrafted network instruction. For instance, MyDoom [51] is triggered on specificdates and performs DDoS attacks, or some key-loggers only log keystrokes forparticular websites; and finally, DDoS zombies which are only activated whengiven the proper command [110]. In the literature, this behavior is referred toas trigger-based behavior [111]. In the following there are a number of triggersembedded within malware as a protection against sandboxes.

• Keystroke-based: The malware gets triggered if it notices a specifickeyword, for instance, the name of an app or the title of a window,[112].What occurs when the trigger happens, depends on the purpose and con-text. For example, the malware might initiate logging keystrokes.

21

Page 22: Malware Dynamic Analysis Evasion Techniques: A SurveyMalware analysis is the way to achieve this understanding [3]. Initially, with the help of disassemblers, decompilers etc. analysts

• System time: In this case, the system date or time would serve as thetrigger [112, 113, 114]

• Network Inputs: A portion of malware are triggered when they receivecertain inputs from the network as in the case of Tribal flood network [21].

• Covert trigger-based: Previous techniques often presuppose lack ofcode inspection to remain undetected (as it is often the case for compiledmalware). However, there have been advances regarding automatic detec-tion of such program routes e.g. State-of-the-art covert trigger-based tech-niques are being devised as a response to automated approaches that aimat detecting such triggers instruction. These techniques utilize instruction-level stenography to hide the malicious code from the disassemblers. Inaddition, they implement trigger-based bugs to provision stealthy controltransfer which makes it difficult for dynamic analysis to discover propertriggers [97] return values from system calls are other instances of malwaretriggers.

Trigger-based tactic initially was not utilized to evade sandboxes and arestill relatively seen in the wild. Finding these triggers is often pursued throughpath exploration approaches e.g. symbolic execution with the goal of findingand traversing all the conditional branches in an automated manner. Theseapproaches require significant levels of resources and are still below a fair levelof efficiency.

4.2.2.3 Fileless Malware In 3.2.3.4 we discussed the fileless malware. Inaddition to the rigorous resistance against manual analysis, fileless malware isprofoundly adept at evading security mechanisms. A major difference of thistactic is the most often the malware is not subjected to the analysis environmentin the first place. This is an inherent outcome of this tactic. The techniquesthat fileless malware utilizes are similar to drive-by attacks [115]. Generally,fileless malware exploits a vulnerability of target system (OS, Browser, Browserplugins, etc.) and injects its malicious code directly into memory. The newtrend of fileless malware uses windows PowerShell to carryout its task. Asmentioned earlier, this attack is on the rise, and defending against it is of greatcomplexity.

4.3 Discussion

In table 2 we summarize our survey on malware automated dynamic analysisevasion. In this table, we compare the techniques based on four criteria i.e.complexity of implementation, pervasiveness, efficacy level and detection com-plexity. In addition, in the example column we provide malware samples thatincorporate the corresponding techniques. Moreover, under Sandbox counter-measure tactics, we hint on how the defensive side strives to counter the evasiontactics and how complex/effective these countermeasures are.

22

Page 23: Malware Dynamic Analysis Evasion Techniques: A SurveyMalware analysis is the way to achieve this understanding [3]. Initially, with the help of disassemblers, decompilers etc. analysts

Table 2: Classification and comparison of malware sandbox evasion techniques

Criteria Complexity Pervasiveness Efficacy Level

Sandbox

Countermeasure Tactics

Detection

Complexity Example

Complexity Effectiveness

Cat. Tactic

Det

ecti

on

-

Ind

epen

den

t Stalling Low-

Medium Medium All Architecture

Sleep Patching Very High

[104,

105, 106,

107] Low Low

Trigger-Based Low Medium Emulation-Based, Bare-

metal

Path Exploration Moderate

[49, 111,

112, 113,

18,] High Moderate

Fileless (AVT) High Low All Architectures N/A Very High [61]

Det

ecti

on

-Dep

end

ent

Fingerprinting High High VM-Based, Hypervisor-

based, Emulation-Based

Using heterogeneous

analysis, Artifact

Randomization Moderate [83, 84,

87]

Moderate Moderate

Reverse

Turing Test Medium Medium

VM-Based, Hypervisor-

based, Bare-metal,

Digital Simulation, path

exploration Moderate [97, 98]

Low Low

Targeted Very High Low

VM-Based,

Hypervisor-

based,

Emulation-

based

Path exploration Very High

[96, 102,

104] High Low

In this section we provided our survey and classification on malware auto-mated dynamic analysis evasion. Our observations, in line with studies such as[76, 66, 17] notes several trends.

Fingerprinting by far, is the most pervasive tactic and has proven to be aneffective technique if executed with precision. Aside from other researches andour observations, another proof regarding the dominance of fingerprinting tacticis the trend of defensive research in the last decade and how they are evolving[116, 117, 111, 34, 118, 75, 119, 120, 121, 73, 122, 123, 94, 124]. Examining theseresearches, we notice that the great majority of them are pursuing more trans-parent system the reason of which is to be more resilient against fingerprintingand more broadly, detection-dependent tactics.

We see two reasons behind the pervasiveness of fingerprinting tactic. Thefirst reason is the immensity of possibilities for fingerprinting scenarios. In eachlevel of the system (application, network, behavior, etc.) there are always newhints of identity that a malware can look for.

The second reason, is the countermeasure strategies against fingerprintingtactic. There are two major strategies in this regard. The first one, is the re-active approach. Namely, for the sandbox to neutralize malware attempts forfingerprinting, it has to know what constitutes fingerprinting in the first place.The second strategy is to aim for more transparent systems either following theapproach of single-stand analysis systems e.g. [34] or heterogeneous analysisi.e. bare-metal analysis [75, 73]. In retrospect to the cases we cited in this sec-tion, we know that both strategies are still vulnerable to zero-day fingerprintingtechniques.

Although attempts for achieving more transparency has raised the bar forfingerprinting, new reversal Turing test tactic employed by malware virtuallyfoils most of the efforts. Reverse Turing test tactics again, pushes the defenders

23

Page 24: Malware Dynamic Analysis Evasion Techniques: A SurveyMalware analysis is the way to achieve this understanding [3]. Initially, with the help of disassemblers, decompilers etc. analysts

to defend with the reactive approach.On the other hand we are noticing new trends of malware attack employing

detection-independent tactics. Most notably stalling [17] and fileless tactics [64].The majority of the efforts that has been put into developing more transparentsystems, has raised the bar for detection-dependent tactics. That is one rea-son that has motivated malware authors to adopt more detection-independenttactics.

Unbound fingerprinting possibilities, reactive approaches, vulnerability oftransparent systems to zero-day detection-dependent tactics (fingerprinting, tar-geted, reverse Turing), vulnerability of transparency-seeking strategies to detection-independent tactics, all seem to call for more generic and effective defensivestrategies.

A promising approach that can potentially counter most of the evasion tac-tics are path exploration techniques. Every malware will expose its maliciouspayload if its specific conditions are satisfied. Path exploration techniques po-tentially can trigger those conditions and expose the malicious behavior.

5 Conclusion and Future Directions

In this paper, we conducted a surveyed on the subject of malware analysisevasion techniques, and proposed classifications for both modes of manual andautomated analysis.

For the automated dynamic analysis, we defined two major categories of eva-sion. Detection-dependent and detection-independent. On the defensive side,defenders are pursuing 4 major strategies. Reactive approaches, more transpar-ent analysis systems, bare-metal analysis, and several endeavors towards moregeneric approaches, namely, path exploration. The first three defensive strate-gies can hope for being effective merely against detection-dependent evasiontactics and loose their effectiveness against detection-independent tactics. Asfor the detection-independent tactic, we need more generic approaches such asthe path exploration methods.

Parallel to endeavors towards path exploration methods, we advocate auto-mated fingerprinting generations such as MORPHEUS [125], and Red Pills [91].These solutions would not be a generic response, but they would significantlyraise the bar for malware pursuing fingerprinting tactic.

Another line of inquiry that we suggest is analyzing the effectiveness ofusing malware evasion tactics against itself; for the case of detection-dependanttactics, a malware strives relentlessly to detect a Sandbox and refrain fromexecution. What would be the result of a program, installed on a productionsystem that would impersonate a Sandbox. How efficacious it would be indeterring malware and if executed adroitly, how significantly such approachwould raise the bar for devising future evasion attempts.

24

Page 25: Malware Dynamic Analysis Evasion Techniques: A SurveyMalware analysis is the way to achieve this understanding [3]. Initially, with the help of disassemblers, decompilers etc. analysts

6 Acknowledgments

This work is supported by APA research center (http://apa.aut.ac.ir) at Amirk-abir University of Technology, Tehran, Iran. In addition, would like to expandour gratitude to Prof. Eric Filiol of ESIEA (C + V)O lab for his support andinsights on this paper.

References

[1] Deborah Russell and GT Gangemi. Computer security basics. ” O’ReillyMedia, Inc.”, 1991.

[2] Ulrich Bayer, Andreas Moser, Christopher Kruegel, and Engin Kirda. Dy-namic analysis of malicious code. Journal in Computer Virology, 2(1):67–77, 2006.

[3] Dennis Distler and Charles Hornat. Malware analysis: An introduction.SANS Institute InfoSec Reading Room, pages 18–19, 2007.

[4] Babak Bashari Rad, Maslin Masrom, and Suhaimi Ibrahim. Camouflagein malware: from encryption to metamorphism. International Journal ofComputer Science and Network Security, 12(8):74–83, 2012.

[5] Mike Schiffman. A brief history of malware obfuscation. Available on:http://blogs. cisco. com/security/a brief history of malware obfuscationpart 1 of 2, 2010.

[6] Mike Schiffman. A brief history of malware obfuscation: Part 2 of 2. CiscoBlog, 2010.

[7] Ilsun You and Kangbin Yim. Malware obfuscation techniques: A briefsurvey. In Broadband, Wireless Computing, Communication and Applica-tions (BWCCA), 2010 International Conference on, pages 297–300. IEEE,2010.

[8] Jean-Marie Borello and Ludovic Me. Code obfuscation techniques formetamorphic viruses. Journal in Computer Virology, 4(3):211–220, 2008.

[9] Andreas Moser, Christopher Kruegel, and Engin Kirda. Limits of staticanalysis for malware detection. In Computer security applications con-ference, 2007. ACSAC 2007. Twenty-third annual, pages 421–430. IEEE,2007.

[10] Fanglu Guo, Peter Ferrie, and Tzi-Cker Chiueh. A study of the packerproblem and its solutions. In International Workshop on Recent Advancesin Intrusion Detection, pages 98–115. Springer, 2008.

[11] H Mourad. Sleeping your way out of the sandbox. SANS Security Report,2015.

25

Page 26: Malware Dynamic Analysis Evasion Techniques: A SurveyMalware analysis is the way to achieve this understanding [3]. Initially, with the help of disassemblers, decompilers etc. analysts

[12] Alexei Bulazel and Bulent Yener. A survey on automated dynamic mal-ware analysis evasion and counter-evasion: Pc, mobile, and web. In Pro-ceedings of the 1st Reversing and Offensive-oriented Trends Symposium,page 2. ACM, 2017.

[13] Yuxin Gao, Zexin Lu, and Yuqing Luo. Survey on malware anti-analysis.In Intelligent Control and Information Processing (ICICIP), 2014 FifthInternational Conference on, pages 270–275. IEEE, 2014.

[14] Jonathan AP Marpaung, Mangal Sain, and Hoon-Jae Lee. Survey onmalware evasion techniques: State of the art and challenges. In AdvancedCommunication Technology (ICACT), 2012 14th International Confer-ence on, pages 744–749. IEEE, 2012.

[15] av test. The av-test security report 2016/2017, 2017.

[16] Christopher Kruegel. Evasive malware exposed and deconstructed. InRSA Conference, pages 12–20, 2015.

[17] Yoshihiro Oyama. Trends of anti-analysis operations of malwares observedin api call logs. Journal of Computer Virology and Hacking Techniques,14(1):69–85, 2018.

[18] Christopher Kruegel. How to build an effective malware analysis sandbox,2014.

[19] Michael Sikorski and Andrew Honig. Practical malware analysis: thehands-on guide to dissecting malicious software. no starch press, 2012.

[20] Nguyen Anh Quynh and Kuniyasu Suzaki. Virt-ice: Next-generation de-bugger for malware analysis. Black Hat USA, 2010.

[21] Rodrigo Rubira Branco, Gabriel Negreira Barbosa, and Pedro DrimelNeto. Scientific but not academical overview of malware anti-debugging,anti-disassembly and anti-vm technologies. Black Hat, 2012.

[22] apriorit. Anti debugging protection techniques, 2016.

[23] Xu Chen, Jon Andersen, Z Morley Mao, Michael Bailey, and Jose Nazario.Towards an understanding of anti-virtualization and anti-debugging be-havior in modern malware. In Dependable Systems and Networks WithFTCS and DCC, 2008. DSN 2008. IEEE International Conference on,pages 177–186. IEEE, 2008.

[24] Nicolas Falliere. Windows anti-debug reference. http://www. security-focus. com/infocus/1893, 2007.

[25] P. Ferrie. The ultimate anti-debugging reference, 2011.

[26] Joshua Tully. An anti-reverse engineering guide, 9 Nov 2008.

26

Page 27: Malware Dynamic Analysis Evasion Techniques: A SurveyMalware analysis is the way to achieve this understanding [3]. Initially, with the help of disassemblers, decompilers etc. analysts

[27] Mark Vincent Yason. The art of unpacking. Retrieved Feb, 12:2008, 2007.

[28] Fengwei Zhang, Kevin Leach, Angelos Stavrou, Haining Wang, and KunSun. Using hardware features for increased debugging transparency. InSecurity and Privacy (SP), 2015 IEEE Symposium on, pages 55–69. IEEE,2015.

[29] Hao Shi and Jelena Mirkovic. Hiding debuggers from malware with apate.In Proceedings of the Symposium on Applied Computing, pages 1703–1710.ACM, 2017.

[30] Sanjeev Kumar Aggarwal and M Sarath Kumar. Debuggers for program-ming languages, 2002.

[31] Michael Chourdakis. Toggle hardware data/read/execute breakpoints pro-grammatically, 2008.

[32] Microsoft msdn. Debugging functions.

[33] Shang Gao and Qian Lin. Debugging classification and anti-debuggingstrategies. In Fourth International Conference on Machine Vision (ICMV2011): Computer Vision and Image Analysis; Pattern Recognition andBasic Technologies, volume 8350, page 83503C. International Society forOptics and Photonics, 2012.

[34] Artem Dinaburg, Paul Royal, Monirul Sharif, and Wenke Lee. Ether:malware analysis via hardware virtualization extensions. In Proceedingsof the 15th ACM conference on Computer and communications security,pages 51–62. ACM, 2008.

[35] Kevin Lawton. Bochs: The open source ia-32 emulation project, 2003.

[36] Microsoft. Peb structure.

[37] Lexi Security Hub. Overview of the kronos banking malware rootkit, 2014.

[38] Cylance Threat Guidance Team. threat-spotlight-satan-raas, 2017.

[39] Kulchytskyi Oleg. Anti-debug protection techniques: Implementation andneutralization, 2016.

[40] McAfee. The w9x.cih virus, 2000.

[41] JOESandbox. shcndhss.exe, 2018.

[42] Tyler Shields. Anti-debugging–a developers view. Veracode Inc., USA,2010.

[43] Virustotal. vti-rescan, 2015.

[44] JOESandbox. Automated malware analysis report for wdf01000.sys, 2010.

27

Page 28: Malware Dynamic Analysis Evasion Techniques: A SurveyMalware analysis is the way to achieve this understanding [3]. Initially, with the help of disassemblers, decompilers etc. analysts

[45] Curesec Security Research. Inkasso trojaner – part 3, 2013.

[46] Microsoft. Structured exception handling, 2018.

[47] Infosec Institute. Zeroaccess malware - part 1, 2015.

[48] 2018.

[49] Gabor Pek, Boldizsar Bencsath, and Levente Buttyan. nether: In-guestdetection of out-of-the-guest malware analyzers. In Proceedings of theFourth European Workshop on System Security, page 3. ACM, 2011.

[50] Kaspersky. Virus.win32.hiv, 2000.

[51] McAfee. W32.mydoom.m@mm, 2007.

[52] Gary McGraw and Greg Morrisett. Attacking malicious code: A reportto the infosec research council. IEEE software, 17(5):33–41, 2000.

[53] Microsoft msdn. Zwsetinformationthread function, 2018.

[54] Kyle Yang Walter (Tiezhu) Kong. Unlocking lockscreen, 2013.

[55] UIC. Mcrat malware analysis – part1, 2013.

[56] CTurt. Reverse engineering vertexnet malware.

[57] Carbon Monoxide. Scyllahide, 2016.

[58] Peter Ferrie. Anti-unpacker tricks–part one. Virus Bulletin, 4, 2008.

[59] XPN. Windows anti-debug techniques - openprocess filtering, 2017.

[60] Nicolas Brulez. Scan of the month 33: Anti reverse engineering uncovered.

[61] David Patten. The evolution to fileless malware. Retrieved from, 2017.

[62] Steve Mansfield-Devine. Fileless attacks: compromising targets withoutmalware. Network Security, 2017(4):7–11, 2017.

[63] Malwarebytes. Samsam ransomware: controlled distribution for an elusivemalware. Technical report, Malwarebytes Labs, 2018.

[64] Niamh Minihane Eric Peterson Raj Samani Craig Schmugar ReseAnneSims Dan Sommer Bing Sun Alex Bassett, Christiaan Beek. Macafee labsthreat report march 2018. Technical report, McAfee Lbas, 2018.

[65] Jack Danahy Larry Ponemon. The 2017 state of endpoint security riskreport. Technical report, Ponemon Institute, 2018.

28

Page 29: Malware Dynamic Analysis Evasion Techniques: A SurveyMalware analysis is the way to achieve this understanding [3]. Initially, with the help of disassemblers, decompilers etc. analysts

[66] Ping Chen, Christophe Huygens, Lieven Desmet, and Wouter Joosen. Ad-vanced or not? a comparative study of the use of anti-debugging and anti-vm techniques in generic and targeted malware. In IFIP InternationalInformation Security and Privacy Conference, pages 323–336. Springer,2016.

[67] Lovely Bruiz Xavier Capilitan Andrew Go, Christopher del Fierro. Wherewe go, we don’t need files: Analysis of fileless malware ”rozena”. Technicalreport, G Data, 2018.

[68] MacAfee Labs. Threats report, 2018.

[69] Robert P Goldberg. Survey of virtual machine research. Computer,7(6):34–45, 1974.

[70] Norman sandbox.

[71] Carsten Willems, Thorsten Holz, and Felix Freiling. Toward automateddynamic malware analysis using cwsandbox. IEEE Security & Privacy,5(2), 2007.

[72] Manuel Egele, Theodoor Scholte, Engin Kirda, and Christopher Kruegel.A survey on automated dynamic malware-analysis techniques and tools.ACM computing surveys (CSUR), 44(2):6, 2012.

[73] Dhilung Kirat, Giovanni Vigna, and Christopher Kruegel. Barecloud:Bare-metal analysis-based evasive malware detection. In USENIX SecuritySymposium, pages 287–301, 2014.

[74] Carsten Willems, Ralf Hund, Andreas Fobian, Dennis Felsch, ThorstenHolz, and Amit Vasudevan. Down to the bare metal: Using processorfeatures for binary analysis. In Proceedings of the 28th Annual ComputerSecurity Applications Conference, pages 189–198. ACM, 2012.

[75] Dhilung Kirat, Giovanni Vigna, and Christopher Kruegel. Barebox: effi-cient malware analysis on bare-metal. In Proceedings of the 27th AnnualComputer Security Applications Conference, pages 403–412. ACM, 2011.

[76] McAfee. Mcafee labs threats report, 2017.

[77] Thomas Raffetseder, Christopher Kruegel, and Engin Kirda. Detectingsystem emulators. In International Conference on Information Security,pages 1–18. Springer, 2007.

[78] Boris Lau and Vanja Svajcer. Measuring virtual machine detection inmalware using dsd tracer. Journal in Computer Virology, 6(3):181–195,2010.

[79] Thorsten Holz and Frederic Raynal. Detecting honeypots and other suspi-cious environments. In Information Assurance Workshop, 2005. IAW’05.Proceedings from the Sixth Annual IEEE SMC, pages 29–36. IEEE, 2005.

29

Page 30: Malware Dynamic Analysis Evasion Techniques: A SurveyMalware analysis is the way to achieve this understanding [3]. Initially, with the help of disassemblers, decompilers etc. analysts

[80] Alexandros Kapravelos, Marco Cova, Christopher Kruegel, and GiovanniVigna. Escape from monkey island: Evading high-interaction honey-clients. In International Conference on Detection of Intrusions and Mal-ware, and Vulnerability Assessment, pages 124–143. Springer, 2011.

[81] Akira Yokoyama, Kou Ishii, Rui Tanabe, Yinmin Papa, Katsunari Yosh-ioka, Tsutomu Matsumoto, Takahiro Kasama, Daisuke Inoue, MichaelBrengel, Michael Backes, et al. Sandprint: fingerprinting malware sand-boxes to provide intelligence for sandbox evasion. In International Sym-posium on Research in Attacks, Intrusions, and Defenses, pages 165–187.Springer, 2016.

[82] Reptile malware - behavioral analysis, 2012.

[83] Yaniv Assor. Anti-vm and anti-sandbox explained, 2016.

[84] Sophos. W32/agobot-ot, 2015.

[85] Symantec. Trojan.peacomm.c, 2007.

[86] Christopher Kruegel. Evasive malware exposed and deconstructed. InRSA Conference, pages 12–20, 2015.

[87] Microsoft. Worm:win32/rbot.st, 2017.

[88] Microsoft. Win32/phatbot.a, 2006.

[89] Jason Franklin, Mark Luk, Jonathan M McCune, Arvind Seshadri, AdrianPerrig, and Leendert Van Doorn. Remote detection of virtual machinemonitors with fuzzy benchmarking. ACM SIGOPS Operating SystemsReview, 42(3):83–92, 2008.

[90] Tal Garfinkel, Keith Adams, Andrew Warfield, and Jason Franklin. Com-patibility is not transparency: Vmm detection myths and realities. InHotOS, 2007.

[91] Roberto Paleari, Lorenzo Martignoni, Giampaolo Fresi Roglia, and DaniloBruschi. A fistful of red-pills: How to automatically generate proceduresto detect cpu emulators. In Proceedings of the USENIX Workshop onOffensive Technologies (WOOT), volume 41, page 86, 2009.

[92] Katsunari Yoshioka, Yoshihiko Hosobuchi, Tatsunori Orii, and TsutomuMatsumoto. Your sandbox is blinded: Impact of decoy injection to publicmalware analysis systems. Journal of Information Processing, 19:153–168,2011.

[93] Jeremy Blackthorne, Alexei Bulazel, Andrew Fasano, Patrick Biernat, andBulent Yener. Avleak: Fingerprinting antivirus emulators through black-box testing. In Proceedings of the 10th USENIX Conference on OffensiveTechnologies, pages 91–105. USENIX Association.

30

Page 31: Malware Dynamic Analysis Evasion Techniques: A SurveyMalware analysis is the way to achieve this understanding [3]. Initially, with the help of disassemblers, decompilers etc. analysts

[94] Chad Spensky, Hongyi Hu, and Kevin Leach. Lo-phi: Low-observablephysical host instrumentation for malware analysis. In NDSS, 2016.

[95] Brendan Dolan-Gavitt and Yacin Nadji. See no evil: Evasions in honey-monkey systems, 2010.

[96] Arunpreet Singh. Malware evasion techniques: Same wolf – different cloth-ing, 2017.

[97] Nicolas Falliere, Liam O Murchu, and Eric Chien. W32. stuxnet dossier.White paper, Symantec Corp., Security Response, 5(6):29, 2011.

[98] Yasir Khalid Abhishek Singh. Don’t click the left mouse button: Intro-ducing trojan upclicker, 2012.

[99] Chong Rong Hwa. Trojan.apt.banechant: In-memory trojan that observesfor multiple mouse clicks, 2013.

[100] Abhishek Singh Sai Omkar Vashisht. Turing test in reverse: New sandbox-evasion techniques seek human interaction, 2014.

[101] Clemens Kolbitsch Arunpreet Singh. Not so fast my friend – using invertedtiming attacks to bypass dynamic analysis, 2014.

[102] Najmeh Miramirkhani, Mahathi Priya Appini, Nick Nikiforakis, andMichalis Polychronakis. Spotless sandboxes: Evading malware analysissystems using wear-and-tear artifacts. In Security and Privacy (SP), 2017IEEE Symposium on, pages 1009–1024. IEEE, 2017.

[103] GReAT. The darkhotel apt, 2014.

[104] Travis Morrow and Josh Pitts. Genetic malware: Designing payloads forspecific targets.(2016). Talk at Infiltrate, 2016.

[105] B Bencsath, G Pek, L Buttyan, and M Felegyhazi. The cousins of stuxnet:Duqu, flame, and gauss. future internet, 4 (4), 971-1003, 2012.

[106] MalwareTech. Kelihos analysis – part 1, 2015.

[107] Pafish (paranoid fish), 2014.

[108] Alex Chiu Ben Baker. Threat spotlight: Rombertik – gazing past thesmoke, mirrors, and trapdoors, 2015.

[109] Martina Lindorfer, Clemens Kolbitsch, and Paolo Milani Comparetti. De-tecting environment-sensitive malware. In International Workshop on Re-cent Advances in Intrusion Detection, pages 338–357. Springer, 2011.

[110] Jason Barlow. Tribe flood network 2000 (tfn2k), 2000.

31

Page 32: Malware Dynamic Analysis Evasion Techniques: A SurveyMalware analysis is the way to achieve this understanding [3]. Initially, with the help of disassemblers, decompilers etc. analysts

[111] David Brumley, Cody Hartwig, Zhenkai Liang, James Newsome, DawnSong, and Heng Yin. Automatically identifying trigger-based behavior inmalware, pages 65–88. Springer, 2008.

[112] Paul Roberts. Mydoom sets speed records, 2004.

[113] Symantec. Xeram.1664, 2000.

[114] McAfee. W97m/opey.bg, 2003.

[115] Van Lam Le, Ian Welch, Xiaoying Gao, and Peter Komisarczuk. Anatomyof drive-by download attack. In Proceedings of the Eleventh AustralasianInformation Security Conference-Volume 138, pages 49–58. AustralianComputer Society, Inc., 2013.

[116] Amit Vasudevan and Ramesh Yerraballi. Cobra: Fine-grained malwareanalysis using stealth localized-executions. In Security and Privacy, 2006IEEE Symposium on, pages 15–pp. IEEE, 2006.

[117] Andreas Moser, Christopher Kruegel, and Engin Kirda. Exploring multi-ple execution paths for malware analysis. In Security and Privacy, 2007.SP’07. IEEE Symposium on, pages 231–245. IEEE, 2007.

[118] Anh M Nguyen, Nabil Schear, HeeDong Jung, Apeksha Godiyal, Samuel TKing, and Hai D Nguyen. Mavmm: Lightweight and purpose built vmmfor malware analysis. In Computer Security Applications Conference,2009. ACSAC’09. Annual, pages 441–450. IEEE, 2009.

[119] Lok-Kwong Yan, Manjukumar Jayachandra, Mu Zhang, and Heng Yin.V2e: combining hardware virtualization and softwareemulation for trans-parent and extensible malware analysis. ACM Sigplan Notices, 47(7):227–238, 2012.

[120] Paul Royal. Entrapment: Tricking malware with transparent, scalablemalware analysis. Talk at Black Hat, 2012.

[121] Fengwei Zhang, Kevin Leach, Kun Sun, and Angelos Stavrou. Spectre:A dependable introspection framework via system management mode. InDependable Systems and Networks (DSN), 2013 43rd Annual IEEE/IFIPInternational Conference on, pages 1–12. IEEE, 2013.

[122] Fengwei Zhang, Kevin Leach, Angelos Stavrou, Haining Wang, and KunSun. Using hardware features for increased debugging transparency. In2015 IEEE Symposium on Security and Privacy (SP), pages 55–69. IEEE,2015.

[123] Kevin Leach, Chad Spensky, Westley Weimer, and Fengwei Zhang. To-wards transparent introspection. In Software Analysis, Evolution, andReengineering (SANER), 2016 IEEE 23rd International Conference on,volume 1, pages 248–259. IEEE, 2016.

32

Page 33: Malware Dynamic Analysis Evasion Techniques: A SurveyMalware analysis is the way to achieve this understanding [3]. Initially, with the help of disassemblers, decompilers etc. analysts

[124] Fengwei Zhang, Kevin Leach, Angelos Stavrou, and Haining Wang. To-wards transparent debugging. IEEE Transactions on Dependable and Se-cure Computing, 15(2):321–335, 2018.

[125] Yiming Jing, Ziming Zhao, Gail-Joon Ahn, and Hongxin Hu. Morpheus:automatically generating heuristics to detect android emulators. In Pro-ceedings of the 30th Annual Computer Security Applications Conference,pages 216–225. ACM, 2014.

33


Recommended