Chapter 4 Malware
Chapter 4 Malware
Insider Attacks
An insider attack is a security breach caused or facilitated by a trusted
member of an organization, such as a programmer.
Such attacks are particularly dangerous due to the betrayal of trust involved.
Backdoors
A backdoor, also known as a trapdoor, is a hidden feature or command in a
program.
The program functions normally under regular use but performs unexpected
actions if the backdoor is activated.
Chapter 4: Malware 1
Characteristics:
Backdoors are used to perform actions that violate security policies, such
as privilege escalation.
Nature of Backdoors:
Key Takeaway:
Easter Eggs
Characteristics:
Examples:
Windows XP's Solitaire game had a cheat allowing a win by pressing Shift
+ Alt + 2.
Chapter 4: Malware 2
DVDs often include hidden content, such as deleted scenes or outtakes,
unlocked through specific keystrokes on menu screens.
Key Takeaway:
While Easter eggs are meant to entertain, they share a similarity with
backdoors in their hidden nature but differ significantly as they are non-
malicious and not intended to breach security.
Logic Bombs
A logic bomb is a program that executes a malicious action when a specific
logic condition is met.
Characteristics:
Logic bombs are often hidden within legitimate software, making them
difficult to detect until triggered.
Examples:
Key Takeaway:
Logic bombs are a serious insider threat, as they are usually embedded
by individuals with trusted access, making them both malicious and
covert.
Chapter 4: Malware 3
Incident Details:
The company’s backup tapes were discovered at Tim Lloyd’s house, but
they had been erased.
Consequences:
The attack caused severe financial losses and forced the company to lay
off many employees.
Tim Lloyd was convicted for deploying the logic bomb, highlighting the
potential devastation of insider threats.
Key Takeaway:
Trigger Mechanism:
7/30/96: The bomb was set to execute only if the date was later than July
30, 1996.
Target Specification:
F:: Focused all commands on volume F, which stored the server’s critical
files.
Malicious Commands:
Chapter 4: Malware 4
CD \PUBLIC: Changed the current directory to the PUBLIC folder, which
stored common programs and public files.
FIX.EXE /Y F:\.:
This attack was both a time bomb (executing based on a set date) and a
logic bomb (dependent on a series of logical conditions).
Outcome:
The case highlighted the severe risk of insider threats and the
devastating impact of a well-planned logic bomb.
Chapter 4: Malware 5
Use Archiving and Reporting Tools:
Follow the least privilege principle, granting only the minimum access
rights necessary for users or programs to perform their tasks.
Computer Viruses
Definition:
Distinguishing Properties:
Chapter 4: Malware 6
Malicious Actions: Often deletes files or steals sensitive information.
3. Replication and Assembly: The virus uses the cell's processes to create
more virus copies.
Chapter 4: Malware 7
4. Release: Newly formed viruses are released to infect other cells.
Virus Classification
Phases of Virus Execution:
1. Dormant Phase:
2. Propagation Phase:
3. Triggering Phase:
4. Action Phase:
The virus executes its malicious payload, which can vary from
harmless activities (e.g., displaying images) to destructive ones (e.g.,
deleting essential files).
Classification Criteria:
Types of Viruses
The infection includes both original program code and the virus code, as
shown in Figure 4(a) for simple injection and Figure 4(b) for complex
Chapter 4: Malware 8
injections using jump instructions.
Spread by:
Difficult to remove because the boot sector loads before any antivirus
software.
Overwriting
Pre-pending
Infection of libraries
Image Description:
Chapter 4: Malware 9
Figure 4(a): Demonstrates a virus injected at the beginning of a program.
Figure 4(b): Illustrates a more advanced method where the virus code is
split into parts and spread across the program, with jump instructions
controlling execution flow.
Concealment Viruses
Encrypted Viruses:
Purpose of Encryption:
Replication code.
Chapter 4: Malware 10
Payload (e.g., deleting files).
Comprises:
Encrypted virus code: Hides the main functionality (See Figure 5).
Techniques:
Antivirus Defense:
While the virus body is hidden, the decryption code structure reveals
potential virus presence.
Image Description:
Chapter 4: Malware 11
Decryption code and key decrypt the encrypted virus code before it
executes.
Definition:
Instruction reordering.
Key Differences:
Chapter 4: Malware 12
Sequence Signature: Identifies strings in a specific sequence.
Malware Attacks
Computer Worms
Definition:
Key Characteristics:
Deleting files.
Common Misconception:
Worms are often confused with viruses because both involve self-
replication, but worms operate without infecting other programs.
Designing a Worm
Development Process:
Chapter 4: Malware 13
Commonly exploited vulnerabilities include buffer overflow
vulnerabilities.
Key Components:
Exploitation Code:
Infection Detection:
Persistence Mechanism:
Code for embedding the worm into the operating system to survive
reboots, e.g.:
The worm is installed and launched on an initial set of victims, from which
it propagates.
Worm Propagation
Propagation Process:
Chapter 4: Malware 14
Infected computers try to infect other machines by connecting to them
over the Internet.
Vulnerable target machines are infected and continue spreading the worm.
Persistence:
Parameters:
Equations:
Chapter 4: Malware 15
Fast Spread: Rapid increase in infections.
Image Descriptions:
Figure 8: A graph showing the worm propagation curve, with phases labeled
as slow start, fast spread, and slow finish for a population of 10,000 hosts.
Trojan Horses
A Trojan horse in computer security refers to malware that appears to
perform useful tasks but secretly carries out malicious actions, such as
launching a keylogger.
Chapter 4: Malware 16
Rootkits
Definition: Rootkits are stealthy malware that alter system utilities or the
operating system to avoid detection. For example:
They can modify Windows Process Monitor to hide their presence in the
process list.
They may also infect utilities like Windows Explorer to hide files on the
disk.
Purpose: Rootkits are often used to conceal actions of other malware, such
as Trojan horses or viruses.
Detecting Rootkits:
User-Mode Rootkits:
Kernel-Mode Rootkits:
Challenges in Detection:
Kernel rootkits may detect and disable antirootkit software due to their
high-level privileges.
Best Practices:
Chapter 4: Malware 17
If rootkit infection is suspected, users are often advised to reformat their
hard drive to eliminate the malware completely.
Figure 9 Description:
Botnets
Definition: Botnets are networks of compromised computers controlled by a
central operator, known as a bot herder.
Purpose:
Scale:
Evolution of Malware:
Information theft.
Spam campaigns.
Impact of Botnets:
Chapter 4: Malware 18
Definition: Botnets rely on a centralized mechanism to control infected
machines, referred to as zombies.
Process:
Early Botnets:
Evolved Botnets:
Dynamic Control:
Unconventional Channels:
Financial Impacts
Malware often affects a large user population.
Examples:
Chapter 4: Malware 19
LoveBug (2000) caused $8.75B in damages and shut down the British
parliament.
In February 2006, the Russian Stock Exchange was taken down by a virus.
Economics of Malware
New malware threats have grown from 20K to 1.7M in the period 2002–2008.
Professional Malware
Growth in professional cybercrime and online fraud has led to demand for
professionally developed malware.
Like every product, professional malware is subject to the laws of supply and
demand.
Recent studies put the price of a software keystroke logger at $23 and
botnet use at $225.
Chapter 4: Malware 20
Privacy-Invasive Software
Adware
Adware Definition:
Adware Installation:
Image Description:
Chapter 4: Malware 21
The diagram illustrates the adware process:
Spyware
Spyware Definition:
Spyware Infection:
Chapter 4: Malware 22
Periodically, these programs contact a data collection agent to upload the
gathered data. (See Figure 11.)
Signs of Spyware:
Spyware Actions:
Chapter 4: Malware 23
Countermeasures
Signatures as a Countermeasure:
Malware detection systems use scanning methods to compare objects
against a database of signatures.
What is a Signature?:
Chapter 4: Malware 24
Signatures differ from digital signatures, which verify authenticity.
Detection Process:
Malware Database:
Examples:
White/Black Listing
A countermeasure involving a database of cryptographic hashes to identify
trusted or malicious files.
Database Content:
Process:
Chapter 4: Malware 25
A match with a known malicious hash identifies the file as infected
(blacklisting).
Database Integrity:
Heuristic Analysis
A detection method effective for identifying new and zero-day malware that
lacks known signatures.
Code Analysis:
Execution Emulation:
Challenges:
Shield vs On-Demand
Shield:
On-demand:
Chapter 4: Malware 26
Focuses on specific suspicious files, directories, or drives.
Comparative:
Measures the number of known viruses detected and the time taken
for the scan.
Retrospective:
Shielding No Yes
Internet
Required Not required
Connection
Quarantine
Suspicious files can be isolated in a special folder called quarantine.
Example: When the heuristic analysis flags a file as suspicious, and you
are awaiting a database signature update.
Chapter 4: Malware 27
Users can choose to delete or restore the file in case of a false positive.
Static Analysis:
Examines code without executing it.
Key processes:
Weeding: Identifies and removes junk parts of files to better pinpoint the
virus.
Dynamic Analysis:
Observes the behavior of code during execution in a virtual sandbox.
Monitors:
File changes.
Registry modifications.
Chapter 4: Malware 28
Virus Detection is Undecidable
Theoretical Basis:
Modeling a Virus:
Proof by Contradiction:
Definition of Program Q :
if (not isVirus(Q))
infect
stop
Chapter 4: Malware 29