Reverse Engineering a Basic Malware Sample

- 4 mins

This was a project I worked on whilst taking a software reverse engineering class.


I. PURPOSE:

The purpose of this lab is to reverse engineer a malware and figure out its capabilities, commands, who the author is, protocol it uses. This lab will help us learn real world procedures to reverse engineering a live malware.

II. HYPOTHESIS:

The final outcome of the lab will be a malware report; a complete documentation of the malware’s capabilities,protocols, and commands used by its control center(C2).

III. MATERIALS

The following materials were used to analyze the malware.

IV. PROCEDURE

I used various approaches to reverse engineer this malware sample. I analyzed the malware statically using various tools first, and then I analyzed in dynamically.

Malware’s information derived from running strings command

The strings command returns each string of printable characters in files. Its main uses are to determine the contents of and to extract text from binary files (i.e., non-text files). In our case, I use Binary Ninja’s built in string function to extract the printable ascii. I can use strings command to extrapolate and guess the potential functionality of the malware.


Capture.JPG

pngcreate.JPG

The above images show the malware might have screenshot functionality


getLogin


c2server.jpg

The number “27960” appears to be a port number. This port is used by Activision’s Enemy Territory and id Software’s Quake III ARena, Quake III and Quake Live and some ioquake3 derived games. Malware is possibly using this specific port to be masked as a video game’s network traffic.


Information derived from analyzing with PEview

peview

It appears the malware is not packed.

header

First highlight shows the executable is 32-bit. Second highlight shows that the file was compiled on March 9, 2017. On Thursday night, at “23:41:06 UTC.” We also know from looking at the executable’s strings that the IP address and domain name points to a location in the east coast of the United States. Therefore, “23:41:06 UTC” translates to 7:41 PM Eastern Time.


Looking at the Import Table using Dependency Walker

dependencyWalker

The following DLLs were imported by the malware. This does not necessarily mean the malware uses all of the imported libraries.


Functions of interest from DLLs

funct1


funct2

funct3


funct4

rss facebook twitter github youtube mail spotify lastfm instagram linkedin google google-plus pinterest medium vimeo stackoverflow reddit quora quora