CH 14
CH 14
CH 14
Malware beacon
URIs
Example Malware
Uses InternetOpen and HTTPOpenRequest
URI is generated from calls to
GetTickCount, Random, gethostbyname
Sources of Network Content
Random data
Data from networking libraries
Such as the GET created from a call to
HTTPSendRequest
Hard-coded data
Data about the host and its configuration
Hostname, current time, CPU speed
Data received from other sources
Remote server, file system, keystrokes
Hard-Coded vs. Ephemeral Data
Malware using lower-level networking
APIs such as Winsock
Requires more manually-generated content
to mimic common traffic
More hard-coded data
Likely the author makes a mistake that
leaves a signature in the network traffic
May misspell a word like Mozilla
How URI is Generated
Identifying and Leveraging the
Encoding Steps
Creating a Signature
Avoid excessive complexity
Slows down the IDS
Include enough detail to eliminate false
positives
Analyzing the Parsing Routines
Malware strings and the Web page
comments both include the string adsrv?
Parser looks
for 3
elements
<!—
text
-->
Possible Signatures
The five possible commands
These will work, but any change in the
malware will evade them
Targeting Multiple Elements
These are more general
The first one accepts any Base64 in a
comment with the adsrv prefix
Making General Signatures