Hacking the Malware - A reverse-engineer analysis.pdf
(
382 KB
)
Pobierz
Hacking the Malware– A reverse-engineer’s analysis
“It's getting harder to trust your IM buddies: A new worm in the wild purports to
be a warning from one of your buddies about a computer virus.”
– darkreading.com
RAHUL MOHANDAS
http://rahulmohandas.blogspot.com/
This document is a compendium of my research on malicious software and
provides an insight into how the real world exploitation is done. I have also
discussed how effective are the current security products in subverting the
attacks.
Section 1: Introduction.................................................................................................................2
1.1 Overview......................................................................................................................….2
1.2 Background Information..................................................................................................2
Section 2: Methodology................................................................................................................3
2.1 Controlled Environment..................................................................................................3
2.2 Static and Dynamic Analysis.............…………................................................................3
2.3 Preparation and Verification.....................................................................................…..4
Section 3: Method of Infection…………………......................……………………..……….....7
3.1 Vulnerability Overview..........................................................................................…......7
3.2 Exploit Unleashed – ms06-014 …… …………..................................….....…..............….7
Section 4: Worm Architecture............................................................................................…...10
4.1 Worm Overview.............................................................................................…………..10
4.2 Static Analysis……….....................................................................................….....…....11
4.3 Program Code - Exposed...................................................................................…..…..13
4.4 Dynamic Analysis……………...................................................................................…..16
4.5 The Evolution.............................................................………………………………………18
Section 5: Defensive Measures............................................................................................…...20
5.1 Trojan Variants.......................................................................................………...…......20
5.2 Antivirus Signatures........................................................................................…..……..20
5.3 IPS Signatures...............................................................................................….....…....23
5.4
Infection Statistics………………………………………………………….…….…...23
Section 6: References....................................................................…………..............................25
1
Section 1: Introduction
1.1 Overview:
This paper attempts to document an approach on how the hackers make use of the
vulnerabilities to install malicious software on the vulnerable machine. A comprehensive
reverse code engineered analysis of the malicious software (Win32.Qucan.a) and the
various protection schemes against the worm by various security products are also
discussed.
I also describe an approach to setting up a flexible laboratory environment using virtual
workstation software such as VMware, and demonstrate the process of reverse
engineering a worm using a range of system monitoring tools in conjunction with a
disassembler.
I hope this document will help the Malware researchers, Intrusion Analysts and other
Security professionals to conduct a more viable and comprehensive research.
1.2 Background Information:
The so-called IM-Worm.Win32.Qucan.a. -- initially discovered by MicroWorld
Technologies and subsequently dubbed by Trend Micro as WORM_SOHANAD.A -- is
spreading in MSN Messenger, AOL Messenger and Yahoo Messenger.
The IM-Worm.Win32.Qucan.a (Kaspersky) was first reported in late September and most
of the popular antivirus scanners have signatures for this worm. A detailed analyis on the
detection capabilities of various anti-virus scanners are also described later on.
2
Section 2: Methodology
2.1 Controlled environment
To facilitate an efficient reliable research process, reverse engineers of malicious
programs should have access to controlled laboratory environment that is isolated from
the Local Area Network. In my research I was using Vmware(http://www.vmware.com)
This software suite allows users to set up multiple virtual computers and to use one or
more of these virtual machines simultaneously. Each virtual machine instance can
execute its own guest operating system, such as
Windows, Linux,
and
BSD variants.
In
simple terms, VMware Workstation allows one physical machine to run numerous
operating systems simultaneously.
When setting up our laboratory environment, I installed VMware on a AMD TURION
1600 MHZ laptop computer running Windows XP Professional. I have 4 machines on my
network, the primary Windows XP virtual machine, Windows 2000 professional, Fedora
Core 4 and a centos machine with snort installed.
I created a private network using the NAT in Vmware through which I was able to share
my internet without affecting other systems on the LAN.
2.2 Static and Dynamic Analysis
There are many ways to study a program's behavior. With static analysis, we study a
program without actually executing it. Tools of the trade are disassemblers, decompilers,
source code analyzers, and even such basic utilities as strings. Static analysis has the
advantage that it can reveal how a program would behave under unusual conditions,
because we can examine parts of a program that normally do not execute. In real life,
static analysis gives an approximate picture at best. It is impossible to fully predict the
behavior of all but the smallest programs. I will illustrate static analysis with a real life
example
lateron.
With dynamic analysis, we study a program as it executes. Here, tools of the trade are
debuggers, function call tracers, registry monitors, file system monitors, and network
sniffers. The advantage of dynamic analysis is that it can be fast and accurate. It is not
possible to predict the behavior of a non-trivial program and it is also not possible to
make a non-trivial program traverse all paths through its code.
3
2.3
Preparation and Verification
Type of
Analysis
Static
analysis—
Virus scan
Static
analysis—
Strings
research
Process
VirusTotal is a free file
analysis service that works
using several antivirus
engines.
Verify the installation of the
strings
command.
Purpose of Action
References
Verify if the worm
http://www.virus
is detected by any of
total.com/
the AV scanners
To display
contiguous sets of
ASCII characters
included in a file. I
used the free, open-
source version of
Windows
strings
Windows Strings
tool available at
www.sysinternal
s.com
Dynamic
analysis —
File
integrity
checking
Dynamic
analysis—
File
monitoring
Dynamic
analysis—
Process
monitoring
Run file integrity checker and
reconcile any changes.
Winalysis helps to make
compressed snapshot of
computer configurations.
ions.
Verify the installation of the
Filemon program
To verify that
http://www.winal
system is in a known
ysis.com
trusted state before
the malware makes
any changes.
This indicates which
www.sysinternal
processes are
s.com
opening, reading,
and writing files.
To identify the
www.sysinternal
resources used by all
s.com
running processes,
including DLLs and
registry keys.
Process Explorer
provides a wealth of
useful information
regarding how
malware is
impacting a victim
machine.
Verify the installation of the
Process Explorer program
4
Plik z chomika:
WMatrixie
Inne pliki z tego folderu:
Syngress - Sockets, Shellcode, Porting & Coding - Reverse Engineering Exploits And Tool Coding For Security Professionals.pdf
(115030 KB)
Reverse Engineering for Beginners.pdf
(7099 KB)
Cracking - The Anti.pdf
(90 KB)
Reverse Engineering of Malware on Android.pdf
(3591 KB)
Hacking the Malware - A reverse-engineer analysis.pdf
(382 KB)
Inne foldery tego chomika:
Computer Forensics 1
Computer Forensics 2
Exploration of Mobile and Embedded Systems
Incident Response
Malware
Zgłoś jeśli
naruszono regulamin