CMSC 449 - Lec2 - Basic Static Analysis
CMSC 449 - Lec2 - Basic Static Analysis
Malware Analysis
Lecture 2
Basic Static Analysis
1
Types of Malware Analysis
2
Basic Static Analysis
Examining the malware while it is “at rest”
3
Basic Dynamic Analysis
Observing the output and/or changes when the malware is run
But not interfering or interacting with the malware
Changes to filesystem
Created processes / threads
Network traffic
Changes to the registry / system configuration
5
Advanced Dynamic Analysis
Using a debugger to control any and all aspects of
the malware as it is being executed
Registers, stack, memory, and code
6
Static Dynamic
7
Objectives of Malware Analysis
8
Detection, Classification, and Attribution
Detection: Is a file benign or malicious?
9
Other Analysis Objectives
Determining what malicious behaviors it performed
10
Malware Triage
Hundreds of thousands of unique, previously unseen malicious
files created every day
11
Malware Triage
Large malware analysis shops may perform different levels of
analysis depending upon priority
12
Levels of Analysis
Analysis time by a human can also vary
Again, depends on objectives and importance of file
But may also spend days (or longer!) figuring out exactly what
a file does
13
Basic Static Analysis
14
Static Analysis
Learning properties of a file without running it
15
Strings
Sequences of printable characters in a file
16
FLOSS
Like strings but more powerful
Extracts:
ASCII strings
UTF-16 strings
Stack strings
Some encoded strings
17
Strings and FLOSS Demo
Lab01-01.exe
Lab09-02.exe
18
PE File Format
File format for Windows executables
19
The IMAGE_FILE_HEADER
Contains basic file information
NumberOfSections
TimeDateStamp
Characteristics
20
The IMAGE_OPTIONAL_HEADER
Not actually optional
21
The Section Table
Each section corresponds to a
continuous area of memory in a
process
22
IMAGE_SECTION_HEADERs
Each contains that section’s:
Name
VirtualAddress
VirtualSize
SizeOfRawData
Characteristics
23
Common PE Sections
Section name Contents
.text Executable code
.data Initialized data
.idata Import Address Table
.rsrc Resource Directory Table
.rdata Read-only initialized data
24
PE File Format Demo
(Detect it Easy and PE-Bear)
Lab03-03.exe
25
Imports
Import Address Table lists which functions a file imports from
the Windows API
Windows API functions defined in DLL files
26
Resources
Additional data/file contained within a PE file
27
Resources and Imports Demo
Lab03-03.exe
28