CH 05
CH 05
MALICIOUS SOFTWARES
Information Security
Nguyễn Đăng Quang
Fall 2021
Identify types of malicious
software
Identify viruses vs worms
Prepended/postpended/embedded
CATEGORIES
Boot sector virus: run/spread
when booted
It typically modifies some of the code and even data structures of the OS in
order to perform malicious activities.
Ex: Hide the malware file when listing directory with ls command or modify
output of ps command to hide the running of malware.
WORMS
Independent malicious program that does not require
host programs.
Use network connections to spread from one system to
the other.
A major advance malware since 1990s that develops
together with the internet.
Later evolved into botnets in around 2005.
MORRIS WORM
One of best known worms
Released by Robert Morris in 1988
Affected 6,000 computers; cost $10-$100 M
Simple
scanners
Full-
Features
AV Heuristic
Analysis software scanners
Activity
traps
MODERN MALWARE
MODERN MALWARE
Modern malware have advanced capabilities:
robust command control infrastructures,
the abilities to evade analysis and detection.
Bots/Zombies
.....
SYN Flood, . . .
Victim
AMPLIFIED DISTRIBUTED REFLECTIVE ATTACKS
Attacker
Botnet
Open
DNS request for txt records DNS
(spoof victim’s IP) server
Victim
Large DNS txt RR
1500+ bytes
BOTNET COMMAND AND CONTROL
1 2 3
Using antivirus Using hashes to Gleaning
tools to confirm identify malware. information from a
maliciousness. file’s string,
functions, and
headers.
ANTIVIRUS SCANNING
Antivirus tools rely mainly on a database of identifiable pieces of
known suspicious code (file signatures), as well as behavioral and
pattern-matching analysis (heuristics) to identify suspect files.
Rare malware often goes undetected by antivirus software because it’s
simply not in the database.
Because the various antivirus programs use different signatures and
heuristics, it’s useful to run several different antivirus programs against
the same piece of suspected malware.
VirusTotal (http://www.virustotal.com/) generates a report that
provides the total number of engines that marked the file as malicious,
the malware name, and, if available, additional information about the
malware.
HASING: A FINGERPRINT FOR
MALWARE
Hashing is a common method used to uniquely identify
malware.
The malicious software is run through a hashing program
that produces a unique hash that identifies that malware
(a sort of fingerprint).
The MD5 hash function is the one most commonly used for
malware analysis, though the Secure Hash Algorithm 1
(SHA-1) is also popular
Packing refers to the process of
compressing and encrypting part
of an executable program. ➔
that part becomes data, instead
of an instruction set.
https://bit.ly/2iFbcTH
TOOLS
PORTABLE EXECUTABLE (PE) FILE FORMAT
The PE file format is a data structure that contains the information
necessary for the Windows OS loader to manage the wrapped
executable code.
Nearly every file with executable code that is loaded by Windows is
in the PE file format.
PE files begin with a header that includes information about the code,
the type of application, required library functions, and space
requirements. The information in the PE header is of great value to the
malware analyst
DEPENDENCY
WALKER
LINKED LIBRARIES AND FUNCTIONS
Imports are functions used by one program that are actually stored in
a different program, such as library codes that contain functionality
common to many programs.
Libraries code can be connected to the main executable by static or
dynamic linking.
Knowing how the library code is linked is critical to understanding of
the malware because the information we can find in the PE file header
depends on how the library code has been linked.
Dependency walker (http://dependencywalker.com) can be used to
list dynamically linked functions in an executable
PROGRAM’S DLLS
PE FILE HEADERS AND SECTIONS
sections description
.text code section
.rdata contains the import and export information, which is the same
information available from both Dependency Walker & PEViewer