SlideShare a Scribd company logo
Malware Analysis
Network Security
1AAST COMP ENG Dr Ashraf Tammam
Supervised by
Dr . Ashraf Tammam
Presented by:
• Ahmed Abd Elhafeez
• Ahmed Elbohy
• Moataz Ahmed
5/7/2014
Agenda
2AAST COMP ENG Dr Ashraf Tammam
• Introduction to Malware
• What is a Malware ?
• Types of Malware
• How do they infect hosts?
• How to detect them?
• Malware Analysis
• Goals of Malware Analysis
• Types of Malware Analysis
• Tools for Malware Analysis
• Malware Analysis Simulation Steps
• Conclusion
• Refrences
5/7/2014
• Introduction to malware
• What is a malware ?
• Types of malware
• How do they infect hosts?
• How to detect them
• Malware Analysis
• Goals of Malware Analysis
• Types of Malware Analysis
• Tools for Malware Analysis
• Malware Analysis Simulation Steps
• Conclusion
• References
AAST COMP ENG Dr Ashraf Tammam 35/7/2014
Introduction
AAST COMP ENG Dr Ashraf Tammam 4
Mission Statement
The purpose of this presentation
is to give someone new to
reverse engineering malware
(REM) a place to start.
At the end you should be familiar
with the basic hardware, tools
and Concepts needed to learn
how begin to do REM.
5/7/2014
“But What Might Go Wrong If we Were To
Begin To Try to Analyze Malware?”
• You might get attacked by unhappy malware authors/users
• Your system could get infected, and that might result in:
-- Your system being used to spam people
-- Your personally identifiable information getting stolen
-- Your system getting used to distribute malware;
pirated software, movies, music; child pornography; etc.
-- Your system getting used as a stepping stone from
which to attack government systems or critical
infrastructure.
• You might even end up being arrested.
55/7/2014 AAST COMP ENG Dr Ashraf Tammam
• Introduction to Malware
• What is a Malware?
• Types of malware
• How do they infect hosts?
• How to detect them
• Malware Analysis
• Goals of Malware Analysis
• Types of Malware Analysis
• Tools for Malware Analysis
• Malware Analysis Simulation Steps
• Conclusion
• References
AAST COMP ENG Dr Ashraf Tammam 65/7/2014
What is a Malware ?
• Malware is a set of instructions that run on
your computer and make your system do
something that an attacker wants it to do.
• Programming code that is capable of causing
harm to availability , integrity of code or data,
or confidentiality in a computing system
encompasses Trojan horses, viruses, worms,
and trapdoors.
7AAST COMP ENG Dr Ashraf Tammam5/7/2014
What Exactly is “Malware”?
One possible definition:
Malware is a software you don’t want.
8
• Steal personal information
• Delete files
• Steal software serial numbers
• Use your computer as relay
5/7/2014 AAST COMP ENG Dr Ashraf Tammam
Distribution of malware
5/7/2014 AAST COMP ENG Dr Ashraf Tammam 9
• Introduction to Malware
• What is a Malware?
• Types of malware
• How do they infect hosts?
• How to detect them
• Malware Analysis
• Goals of Malware Analysis
• Types of Malware Analysis
• Tools for Malware Analysis
• Malware Analysis Simulation Steps
• Conclusion
• References
AAST COMP ENG Dr Ashraf Tammam 105/7/2014
Threat types
AAST COMP ENG Dr Ashraf Tammam 115/7/2014
Types of Malware
AAST COMP ENG Dr Ashraf Tammam 125/7/2014
Types of Malware
• viruses :a computer program that is usually
hidden within another seemingly innocuous
program and that produces copies of itself
and inserts them into other programs and
usually performs a malicious action
– Polymorphic : uses a polymorphic engine to
mutate while keeping the original algorithm
intact (packer)
– Methamorphic : Change after each infection
13AAST COMP ENG Dr Ashraf Tammam5/7/2014
Types of Malware
• Backdoor : Bypasses normal security controls
to give an attacker unauthorized access.
• Botnet : All infected computers receive
instructions from the same Command-and-
Control (C&C) server
• Downloader :Malicious code that exists only
to download other malicious code
– Used when attacker first gains access
14AAST COMP ENG Dr Ashraf Tammam5/7/2014
Types of Malware
• Scareware
– Frightens user into buying something
15AAST COMP ENG Dr Ashraf Tammam5/7/2014
Types of Malware
• Spam-sending malware
– Attacker rents machine to spammers
• Worms :a usually small self-contained and self-
replicating computer program that invades
computers on a network and usually performs a
destructive action
16AAST COMP ENG Dr Ashraf Tammam5/7/2014
Types of Malware
• Trojans Horse :a seemingly useful computer
program that contains concealed instructions
which when activated perform an illicit or
malicious action
17AAST COMP ENG Dr Ashraf Tammam5/7/2014
Types of Malware
• Sniffers : an application used to monitor and analyze
network traffic.
• Spyware :software that is installed on a computer
without the user's knowledge and transmits
information about the user's computer activities over
the Internet
18AAST COMP ENG Dr Ashraf Tammam5/7/2014
Types of Malware
19AAST COMP ENG Dr Ashraf Tammam
Adware : software installed that provides advertisers
with information about the users browsing habits, thus
allowing the advertiser to provide targeted ads
5/7/2014
Types of Malware
• from pandalab blog
20AAST COMP ENG Dr Ashraf Tammam
• E-Mail Generators. An e-mail generating program can be
used to create and send large quantities of e-mail, such
as malware, spyware, and spam, to other systems
without the user’s permission or knowledge
5/7/2014
Types of Malware
Ransomware
To unlock you need to send an SMS with the text4121800286to the
number3649Enter the resulting code:Any attempt to reinstall the
system may lead to loss of important information and computer
damage
from pandalab blog
21AAST COMP ENG Dr Ashraf Tammam5/7/2014
Types of Malware
• Keystroke Loggers. A keystroke logger monitors and
records keyboard use
– Some require the attacker to retrieve the data
from the system
– Actively transfer the data to another system
through e-mail, file transfer, or other means
AAST COMP ENG Dr Ashraf Tammam 225/7/2014
Types of Malware
• Web Browser Plug-Ins A Web browser plug-in
provides a way for certain types of content to be
displayed or executed through a Web browser
– E.g., Malicious Web browser plug-ins that act as
spyware and monitor use of the browser
AAST COMP ENG Dr Ashraf Tammam 235/7/2014
• Mass malware
– Intended to infect as many machines as possible
– Most common type
• Targeted malware
– Tailored to a specific target
– Very difficult to detect, prevent, and remove
– Requires advanced analysis
– Ex: Stuxnet
24AAST COMP ENG Dr Ashraf Tammam
Types of Malware
5/7/2014
• Introduction to malware
• What is a malware?
• Types of malware
• How do they infect hosts?
• How to detect them
• Malware Analysis
• Goals OF Malware Analysis
• Types OF Malware Analysis
• Tools For Malware Analysis
• Malware Analysis Simulation Steps
• Conclusion
• References
AAST COMP ENG Dr Ashraf Tammam 255/7/2014
What to Infect
• Executable
• Interpreted file
• Kernel
• Service
• MBR (Master Boot Record)
26AAST COMP ENG Dr Ashraf Tammam5/7/2014
Overwriting malware
Targeted
Executable
MalwareMalware
27AAST COMP ENG Dr Ashraf Tammam5/7/2014
prepending malware
Targeted
Executable
Malware
Infected host
Executable
Malware
28AAST COMP ENG Dr Ashraf Tammam5/7/2014
appending malware
Targeted
Executable
Malware
Infected
host
Executable
Malware
29AAST COMP ENG Dr Ashraf Tammam5/7/2014
Cavity malware
Targeted
Executable
Infected host
Executable
Malware
Malware
30AAST COMP ENG Dr Ashraf Tammam5/7/2014
Multi-Cavity malware
Targeted
Executable
Malware
Malware
Malware
Malware
31AAST COMP ENG Dr Ashraf Tammam5/7/2014
Packers
Malware
Infected host
Executable
Packer
Payload
32AAST COMP ENG Dr Ashraf Tammam
Packers are software programs that compress and encrypt other
executable files in a disk and restore the original executable images when
the packed files are loaded into memories.
5/7/2014
Packer functionalities
• Compress
• Encrypt
• Randomize (polymorphism)
• Anti-debug technique (int / fake jmp)
• Add-junk
• Anti-VM (virtual machine)
33AAST COMP ENG Dr Ashraf Tammam5/7/2014
• Introduction to malware
• What is a malware?
• Types of malware
• How do they infect hosts?
• How to detect them?
• Malware Analysis
• Goals OF Malware Analysis
• Types OF Malware Analysis
• Tools FOR Malware Analysis
• Malware Analysis Simulation Steps
• Conclusion
• REFRENCES
AAST COMP ENG Dr Ashraf Tammam 345/7/2014
It is not possible to build a perfect
virus/malware detector (Cohen)
35AAST COMP ENG Dr Ashraf Tammam5/7/2014
Anti-virus
• Analyze system behavior
• Analyze binary to decide if it a virus
• Type :
– Scanner
– Real time monitor
36AAST COMP ENG Dr Ashraf Tammam5/7/2014
Anti-virus -Virus signature
• Find a string that can identify the virus
• Fingerprint like
37AAST COMP ENG Dr Ashraf Tammam5/7/2014
Anti-virus-Heuristics
• Analyze program behavior
Network access
File open
Attempt to delete file
Attempt to modify the boot sector
38AAST COMP ENG Dr Ashraf Tammam5/7/2014
Anti-virus -Checksum
• A checksum is a value used to verify the
integrity of a file or a data transfer. In other
words, it is a sum that checks the validity of
data. Checksums are typically used to compare
two sets of data to make sure they are the
same.
• Compute a checksum for
– Good binary
– Configuration file
• Detect change by comparing checksum
39AAST COMP ENG Dr Ashraf Tammam5/7/2014
Anti-virus -Dealing with Packer
• Launch the exe
• Wait until it is unpack
• Dump the memory
40AAST COMP ENG Dr Ashraf Tammam5/7/2014
Sandbox analysis
• Provides file system, registry keys, and network
traffic monitoring in controlled environment and
produces a well formed report
• Using a sandbox is more efficient and sometimes
more effective
• Running the executable in a VM
• Observe it
– File activity
– Network
– Memory
41AAST COMP ENG Dr Ashraf Tammam5/7/2014
• Introduction to malware
• What is a malware?
• Types of malware
• How do they infect hosts?
• How to detect them?
• Malware Analysis
• Goals of Malware Analysis
• Types of Malware Analysis
• Tools for Malware Analysis
• Malware Analysis Simulation Steps
• Conclusion
• REFRENCES
AAST COMP ENG Dr Ashraf Tammam 425/7/2014
Challenges in Malware analysis
• Zero day attack prevention
• Data analytic methods work like a black box
• Abstraction of Infection and Propagation
models
• Computational Cost
• Generic Disinfection
AAST COMP ENG Dr Ashraf Tammam 435/7/2014
Malware Analysis
• Dissecting malware to understand
– How it works
– How to identify it
– How to defeat or eliminate it
• A critical part of incident response
44AAST COMP ENG Dr Ashraf Tammam5/7/2014
Incident Response
• After malware is found, you need to know
– Did an attacker implant a rootkit or trojan on your
systems?
– Is the attacker really gone?
– What did the attacker steal or add?
– How did the attack get in
• Root-cause analysis
45AAST COMP ENG Dr Ashraf Tammam5/7/2014
Three Areas
1- Visual Analysis: What you can deduce just by looking at the
file, its strings , size, where it came from etc.
2- Behavioral Analysis : How the malware behaves when
executed , who it talks to, what gets installed, how it runs, etc.
3-Code Analysis: The actual viewing of the code and walking
through it to get a better understanding of the malware and
what it's doing.
AAST COMP ENG Dr Ashraf Tammam 465/7/2014
Analyzing the Threat
• Capture Malware from attackers
– Determine how they are getting in.
– Who are they targeting
• Run Malware in an isolated environment
– What does the malware do?
• Analyze the binary itself
– Some malware can detect isolated environments
or has hidden code.
5/7/2014 AAST COMP ENG Dr Ashraf Tammam 47
• Introduction to malware
• What is a malware?
• Types of malware
• How do they infect hosts?
• How to detect them?
• malware Analysis
• Goals of malware Analysis
• Types of Malware Analysis
• Tools for Malware Analysis
• Malware Analysis Simulation Steps
• Conclusion
• References
AAST COMP ENG Dr Ashraf Tammam 485/7/2014
Goals of Malware Analysis
• The goal of malware analysis is to gain an understanding
of how a specific piece of malware functions
• so that defenses can be built to protect an organization’s
network.
• There are two key questions that must be answered.
– The first: how did this machine become infected with this
piece of malware?
– The second: what exactly does this malware do?
• After determining the specific type of malware, you will
have to determine which question is more critical to
your situation.
AAST COMP ENG Dr Ashraf Tammam 495/7/2014
• Introduction to malware
• What is a malware?
• Types of malware
• How do they infect hosts?
• How to detect them?
• malware Analysis
• Goals of malware Analysis
• Types of Malware Analysis
• Tools for Malware Analysis
• Malware Analysis Simulation Steps
• Conclusion
• REFRENCES
AAST COMP ENG Dr Ashraf Tammam 505/7/2014
TYPES OF Malware Analysis
• Code(static) Analysis :the actual viewing of
code and walking through it to get a better
understanding of the malware and what it is
doing
AAST COMP ENG Dr Ashraf Tammam 515/7/2014
Static Analysis techniques
• Scanning with anti-virus software
• File Signatures
• Hashes
• Performing A file’s strings, functions, and
headers search
• Portable Executable (PE) Headers + Resources
• Unpacking the malware
• Disassembling the malware like IDA Pro.
AAST COMP ENG Dr Ashraf Tammam 525/7/2014
Signatures
• Host-based signatures
– Identify files or registry keys on a victim computer
that indicate an infection
– Focus on what the malware did to the system
• Network signatures
– Detect malware by analyzing network traffic
– More effective when made using malware analysis
53AAST COMP ENG Dr Ashraf Tammam5/7/2014
• FILE SIGNATURE
– Leveraging on the analysis of others
– Anti-Viruses have their own analysis of Malware,
based on
• Signature
• Heuristics
AAST COMP ENG Dr Ashraf Tammam 545/7/2014
Signatures
Hashes
• A fingerprint for malware
• MD5 or SHA-1
• Condenses a file of any size down to a fixed-
length fingerprint
55AAST COMP ENG Dr Ashraf Tammam5/7/2014
Hash Calc
56AAST COMP ENG Dr Ashraf Tammam5/7/2014
Hash Uses
• Label a malware file
• Share the hash with other analysts to identify
malware
• Search the hash online to see if someone else
has already identified the file
57AAST COMP ENG Dr Ashraf Tammam5/7/2014
Strings
• Any sequence of printable characters is a
string
• Strings are terminated by a null (0x00)
• ASCII characters are 8 bits long
– Now called ANSI
• Unicode characters are 16 bits long
– Microsoft calls them "wide characters"
58AAST COMP ENG Dr Ashraf Tammam5/7/2014
STRINGS
• Strings are identified by a NULL terminating
• Character
AAST COMP ENG Dr Ashraf Tammam 595/7/2014
60AAST COMP ENG Dr Ashraf Tammam5/7/2014
TYPES OF Malware Analysis
• Behavioral (Dynamic) Analysis :is how the
malware behaves when executed, who it talks
to, what gets installed, and how it runs
AAST COMP ENG Dr Ashraf Tammam 615/7/2014
Dynamic Analysis techniques
AAST COMP ENG Dr Ashraf Tammam 625/7/2014
Dynamic Analysis
• Sometimes malware is sophisticated enough
to detect that it is sandboxed or running in a
limited environment
• The good news: We have the machine code.
• The bad news: All we have is the machine
code.
• We can then reverse engineer….
5/7/2014 AAST COMP ENG Dr Ashraf Tammam 63
Reverse Engineering
• Reverse engineering is always possible since
the machine code is present in the malware
sample.
• This requires expert knowledge in assembly.
• Only worthwhile if you are looking for odd
behavior as it is slow and tedious work.
5/7/2014 AAST COMP ENG Dr Ashraf Tammam 64
Reversing malware
• Set up a Virtual Environment.
• Get the necessary tools ready.
• Snapshot is your best friend.
AAST COMP ENG Dr Ashraf Tammam 655/7/2014
Simple Reverse Engineering Tools in Linux
• Objdump is a free open source linux
disassembler.
– Outputs assembly code
– Useful to find strings in the binary
• GDB the standard debugger for linux can
debug without source file information.
• Strace intercepts all system calls and
notifications and prints them out for a running
process.
5/7/2014 AAST COMP ENG Dr Ashraf Tammam 66
Reverse Engineering on Windows
• Ida Pro is an interactive debugger which
allows code to be disassembled and run at the
same time
– Breaks down the code into machine instructions
– Interactively reverse engineers to C code
– Allows interactive renaming of functions and
variables as their function is discovered
– Extremely useful 
5/7/2014 AAST COMP ENG Dr Ashraf Tammam 67
Dynamic Analysis techniques
• Network traffic analysis
• File system, and other Windows
features(services, processes, etc.)..
AAST COMP ENG Dr Ashraf Tammam 685/7/2014
Dynamic Analysis techniques
• Carefully let malware run on a (nearly) fully
functional system.
• Virtual machines are often useful
– Take a clean snapshot
– Run the malware
– Observe results
– Restore the clean snapshot
5/7/2014 AAST COMP ENG Dr Ashraf Tammam 69
Dynamic Analysis techniques
• SysInternals Process Monitor allows complete
monitoring of API calls.
– Also has a special boot monitor to track all
changes upon a reboot
• Regshot takes a before and after snapshot of
the registry to find changes.
5/7/2014 AAST COMP ENG Dr Ashraf Tammam 70
• Introduction to malware
• What is a malware?
• Types of malware
• How do they infect hosts?
• How to detect them?
• malware Analysis
• Goals OF malware Analysis
• Types OF malware Analysis
• Tools For malware Analysis
• Malware Analysis Simulation Steps
• Conclusion
• References
AAST COMP ENG Dr Ashraf Tammam 715/7/2014
Tools For malware analysis
• It is critical to identify various tools that can
be used to perform malware analysis.
• This is not a comprehensive list of tools that
one must use
• We will mention some critical tools not all of
them.
AAST COMP ENG Dr Ashraf Tammam 725/7/2014
List of tools
• Strings
• PEView
• Dependency Walker
• Resource Hacker
• Procmon
• Procexp
• Regshot
• Capture
• Wire shark
• Netcat/Fakenet
• FakeDNS/ApateDNS
• PEID
• UPX
AAST COMP ENG Dr Ashraf Tammam 735/7/2014
Needed terminology
• Reverse Code Engineering: the process of
disassembling software to reveal how the
software functions.
• Disassemblers: programs that take a programs
executable binary as input and generate
textual files that contain the assembly
language code for the entire program or parts
of it.
AAST COMP ENG Dr Ashraf Tammam 745/7/2014
Needed terminology
• Debuggers :programs that allows software
developers to observer their program while
running it.
• Decompiler :a program that take an
executable binary file and attempts to
produce readable high-level language code
from it.
AAST COMP ENG Dr Ashraf Tammam 755/7/2014
Tools For malware analysis
• Using physical hardware or virtual machines
(VM).
AAST COMP ENG Dr Ashraf Tammam 765/7/2014
Setting up test environment
• Computer Requirements:
• At least 1GB of memory
• A large hard drive: Allows you to keep images
on the hard drive
• Good Processor – Faster is better
• NIC card
• CDROM/DVD burner
• Any Operating System
AAST COMP ENG Dr Ashraf Tammam 775/7/2014
Setting up test environment
• VMware workstation: Run and network multiple
OSes on one platform
• Storage media: For transferring malware and
storing unused OS images
AAST COMP ENG Dr Ashraf Tammam 785/7/2014
Setting up test environment
• Internet Connectivity: Optional, but occasionally
you might need it.
• Collection of OSes:
• You will need different operating systems for your
testing
• Base Image with no Patches
• Base Image fully Patched
• Configure as host-only or a network
• Store on hard drive and/or burn to CD
AAST COMP ENG Dr Ashraf Tammam 795/7/2014
Tools For malware analysis
• Process Explorer : small application that find
out what files, registry keys and other objects
have open, which DLL’s they have loaded
• Process Monitor : small application used to
monitor file system, registry , process, thread
and DLL activity in real-time.
• PSfile : application that shows a list of files on
a system that are opened remotely.
AAST COMP ENG Dr Ashraf Tammam 805/7/2014
Tools For malware analysis
• Rootkit Revealer :application that scans
system for known rootkit-based malware.
• Strings : application that searches for ANSI
and UNICODE strings in binary images.
• TCPView : application providing information
about TCP and UDP connections , including
the local and remote address and TCP
connection state.
AAST COMP ENG Dr Ashraf Tammam 815/7/2014
Tools For malware analysis
• Windump :Windows version of the powerful
and flexible tcpdump sniffer.
• Fport :Identifies unknown ports and their
associate applications.
• Hfind (Part of the Forensic Toolkit) :application
that will scan for the disk for hidden files.
• BgInfo : small application providing import
system information such as hostname, IP
address, OS version, etc.
AAST COMP ENG Dr Ashraf Tammam 825/7/2014
Tools For malware analysis
• Vision : reports all open TCP and UDP ports and maps
them to the owning process or application.
• Filewatch :a file change monitor.
• Attacker :a TCP/UDP port listener.
• MD5sums : Generates signature or hashes for file
integrity verification.
– Before you launch the malware to have a baseline for
comparison against other files the malware may create
• Winalysis : monitors for changes to files, the registry,
users, groups, security policies, services, shares,
scheduled jobs, the system environment and more.
AAST COMP ENG Dr Ashraf Tammam 835/7/2014
Tools For malware analysis
• WinHex : Hex editor, you may choose any hex
editor that you like.
• IDA Pro : popular interactive, programmable,
extendible, multi-processor debugger and
disassembler.
• Reverse Engineering Compiler : popular
decompiler.
• ProcDump 32 :unpacker application.
AAST COMP ENG Dr Ashraf Tammam 845/7/2014
Tools For malware analysis
• PE Explorer : provides tools for disassembly
and inspection of unknown binaries.
• Windbg : windows debugging applications.
• Livekd : application that allows Windbg
debugger to run locally on a live system.
• Debugview : an application that monitors
debug output on your local or a remote
system.
AAST COMP ENG Dr Ashraf Tammam 855/7/2014
Tools For malware analysis
• OllyDbg: 32-bit assembler level analysis
debugger for Microsoft Windows to work with
the malware for tasks such as viewing the
code and stepping through it.
• RegShot: Tool that tells you what has changed
on your system Before and after you launch
your malware
• Netcat: “Swiss army knife” for networks.
When you need something to connect to
or attempt a connection from
AAST COMP ENG Dr Ashraf Tammam 865/7/2014
Tools For malware analysis
• upx: Packer used a lot of compress and
obfuscate code to uncompressed the code
before analysis
• WinRAR: Tool to compress large file(s) into
one smaller file for safely transfer malware or
information collect to keep things organized.
Industry standard password is ‘infected’
• Ethereal: A protocol analyzer (aka: sniffer)
– When launching the malware and while doing
analysis.
AAST COMP ENG Dr Ashraf Tammam 875/7/2014
• Introduction to malware
• What is a malware?
• Types of malware
• How do they infect hosts?
• How to detect them?
• malware Analysis
• Goals of malware Analysis
• Types Of malware Analysis
• Tools For malware Analysis
• Malware Analysis Simulation Steps
• Conclusion
• References
AAST COMP ENG Dr Ashraf Tammam 885/7/2014
Malware analysis main steps
• Step1: Allocate physical or virtual systems for
the analysis lab
• Step 2: Isolate laboratory systems from the
production environment
• Step 3: Install behavioral analysis tools
• Step 4: Install code-analysis tools
• Step 5: Utilize online analysis tools
• Next Steps
89
Moataz Ahmed Mahmoud , Ahmed
Abdelhafez , Ahmed El bohy
Step 1: Allocate physical or virtual
systems for the analysis lab
• A common approach to examining malicious software involves
infecting a system with the malware specimen and then using the
appropriate monitoring tools to observe how it behaves. This
requires a laboratory system you can infect without affecting your
production environment.
• The most popular and flexible way to set up such a lab system
involves virtualization software, which allows you to use a single
physical computer for hosting multiple virtual systems, each
running a potentially different operating system. Free virtualization
software options include:
• VMware Server
• Windows Virtual PC
• Microsoft Virtual Server
• Virtual Box
Moataz Ahmed Mahmoud , Ahmed
Abdelhafez , Ahmed El bohy
90
Step 2: Isolate laboratory systems
from the production environment
• You must take precautions to isolate the
malware-analysis lab from the production
network, to mitigate the risk that a malicious
program will escape. You can separate the
laboratory network from production using a
firewall. Better yet, don't connect laboratory
and production networks at all, to avoid
firewall configuration issues that might allow
malware to bypass filtering restrictions.
Moataz Ahmed Mahmoud , Ahmed
Abdelhafez , Ahmed El bohy
91
Step 3: Install behavioral analysis
tools
• Before you're ready to infect your laboratory system with the malware specimen,
you need to install and activate the appropriate monitoring tools. Free utilities that
will let you observe how Windows malware interacts with its environment include:
• File system and registry monitoring: Process Monitor and Capture BAT offer a
powerful way to observe in real time how local processes read, write, or delete
registry entries and files. These tools can help you understand how malware
attempts to embed into the system upon infection.
• Process monitoring: Process Explorer and Process Hacker replace the built-in
Windows Task Manager, helping you observe malicious processes, including local
network ports they may attempt to open.
• Network monitoring: Wireshark and SmartSniff are network sniffers, which can
observe laboratory network traffic for malicious communication attempts, such as
DNS resolution requests, bot traffic, or downloads.
• Change detection: Regshot is a lightweight tool for comparing the system's state
before and after the infection, to highlight the key changes malware made to the
file system and the registry.
Moataz Ahmed Mahmoud , Ahmed
Abdelhafez , Ahmed El bohy
92
Step 4: Install code-analysis tools
• Examining the code that comprises the specimen helps uncover
characteristics that may be difficult to obtain through behavioral analysis.
In the case of a malicious executable, you rarely will have the luxury of
access to the source code from which it was created. Fortunately, the
following free tools can help you reverse compiled Windows executables:
• Disassembler and debugger: OllyDbg and IDA Pro Freeware can parse
compiled Windows executables and, acting as disassemblers, display their
code as Intel x86 assembly instructions. These tools also have debugging
capabilities, which allow you to execute the most interesting parts of the
malicious program slowly and under highly controlled conditions, so you
can better understand the purpose of the code.
• Memory dumper: LordPE and OllyDump help obtain protected code
located in the lab system's memory and dump it to a file. This technique is
particularly useful when analyzing packed executables, which are difficult
to disassemble because they encode or encrypt their instructions,
extracting them into RAM only during run-time.
Moataz Ahmed Mahmoud , Ahmed
Abdelhafez , Ahmed El bohy
93
Step 5: Utilize online analysis tools
• To round off your malware-analysis toolkit, add to it some freely
available online tools that may assist with the reverse engineering
process. One category of such tools performs automated behavioral
analysis of the executables you supply. These applications look
similar at first glance, but use different technologies on the back
end. Consider submitting your malware specimen to several of
these sites; depending on the specimen, some sites will be more
effective than others. Such tools include:
• Anubis
• CWSandbox
• Joebox
• Norman SandBox
• ThreatExpert
Moataz Ahmed Mahmoud , Ahmed
Abdelhafez , Ahmed El bohy
94
Next Steps
• With your initial toolkit assembled, start
experimenting in the lab with malware you
come across on the web, in your e-mail box,
on your systems, and so on.
Moataz Ahmed Mahmoud , Ahmed
Abdelhafez , Ahmed El bohy
95
• Introduction to malware
• What is a malware?
• Types of malware
• How do they infect hosts?
• How to detect them?
• Malware Analysis
• Goals OF malware Analysis
• Types Of malware Analysis
• Tools For malware Analysis
• Malware Analysis Simulation Steps
• Conclusion
• References
AAST COMP ENG Dr Ashraf Tammam 965/7/2014
Conclusion
• As you have seen there are various ways
for an attacker to get malicious code to
execute on remote computers
• We have only scratched on the surface,
there are much more to learn and discover
5/7/2014 AAST COMP ENG Dr Ashraf Tammam 97
• Introduction to malware
• What is a malware?
• Types of malware
• How do they infect hosts?
• How to detect them?
• malware Analysis
• Goals OF malware Analysis
• Types Of malware Analysis
• Tools For malware Analysis
• Malware Analysis Simulation Steps
• malware Defense
• Conclusion
• References
AAST COMP ENG Dr Ashraf Tammam 985/7/2014
Refrences
• [1] Ed Skoudis and Lenny Zeltser. Malware: Fighting Malicious Code. Prentice Hall, 2003.
• [2] McGraw-Hill and Sybil P. Parker. McGraw-Hill Dictionary of Scientific and Technical Terms.
McGraw-Hill Companies, Inc., 2003.
• [3]Computer Economics, 2007 Malware Report: The Economic Impact of Viruses, Spyware,Adware,
Botnets and Other Malicious Code, Retrieved 2007, November 23
– fromhttp://www.computereconomics.com/article.cfm?id=1225
• [4]Eldad Eilam, (2005). Reversing: Secrets of Reverse Engineering. Indianapolis, IN: Wiley Publishing.
• [5]eWeek, Metasploit Creator Releases Malware Search Engine, retrieved 2007, November 24
– from http://www.eweek.com/article2/0,1759,1990158,00.asp
• [6]GIAC, Analysis of the Incident Handling Six Step Process, Retrieved 2007, November 24
– from http://www2.giac.org/resources/whitepaper/network/17.php?id=17&cat=network
• [7]Honeynet, Know Your Enemy: Malicious Web Servers, Retrieved 2007, November 24 from
– http://www.honeynet.org/papers/mws/KYE-Malicious_Web_Servers.htm
• [8]Lorna Hutcheson (2006), Malware Analysis The Basics, Retrieved 2007, November 24 from
– http://isc.sans.org/presentations/cookie.pdf
• [9]Merriam-Webster Online. Retrieved 2007, July 23rd, from www.m-w.com
• [10]SANS, Retrieved 2007, November 24, from
– https://www2.sans.org/training/description.php?cid=799
AAST COMP ENG Dr Ashraf Tammam 995/7/2014
Questions ?
5/7/2014 AAST COMP ENG Dr Ashraf Tammam 100
5/7/2014 AAST COMP ENG Dr Ashraf Tammam 101

More Related Content

What's hot

Malicious Software and Virus
Malicious Software and Virus Malicious Software and Virus
Malicious Software and Virus
Tasif Tanzim
 
RIoT (Raiding Internet of Things) by Jacob Holcomb
RIoT  (Raiding Internet of Things)  by Jacob HolcombRIoT  (Raiding Internet of Things)  by Jacob Holcomb
RIoT (Raiding Internet of Things) by Jacob Holcomb
Priyanka Aash
 
Intruders
IntrudersIntruders
Intruderstechn
 
Information Security (Malicious Software)
Information Security (Malicious Software)Information Security (Malicious Software)
Information Security (Malicious Software)
Zara Nawaz
 
Intrusion Detection System using AI and Machine Learning Algorithm
Intrusion Detection System using AI and Machine Learning AlgorithmIntrusion Detection System using AI and Machine Learning Algorithm
Intrusion Detection System using AI and Machine Learning Algorithm
IRJET Journal
 
Malicious Client Detection using Machine learning
Malicious Client Detection using Machine learningMalicious Client Detection using Machine learning
Malicious Client Detection using Machine learning
Cysinfo Cyber Security Community
 
Program security
Program securityProgram security
Program security
G Prachi
 
Virus and malware presentation
Virus and malware presentationVirus and malware presentation
Virus and malware presentation
Amjad Bhutto
 
DC612 Day - Hands on Penetration Testing 101
DC612 Day - Hands on Penetration Testing 101DC612 Day - Hands on Penetration Testing 101
DC612 Day - Hands on Penetration Testing 101
dc612
 
Seminar Report | Network Intrusion Detection using Supervised Machine Learnin...
Seminar Report | Network Intrusion Detection using Supervised Machine Learnin...Seminar Report | Network Intrusion Detection using Supervised Machine Learnin...
Seminar Report | Network Intrusion Detection using Supervised Machine Learnin...
Jowin John Chemban
 
Network defenses
Network defensesNetwork defenses
Network defenses
G Prachi
 
5 howtomitigate
5 howtomitigate5 howtomitigate
5 howtomitigatericharddxd
 
Worst-Case Scenario: Being Detected without Knowing You are Detected
Worst-Case Scenario: Being Detected without Knowing You are DetectedWorst-Case Scenario: Being Detected without Knowing You are Detected
Worst-Case Scenario: Being Detected without Knowing You are Detected
Ashwini Almad
 
Chapter 1 malware analysis primer
Chapter 1 malware analysis primerChapter 1 malware analysis primer
Chapter 1 malware analysis primer
ManjuA8
 
Penetration testing overview
Penetration testing overviewPenetration testing overview
Penetration testing overview
Supriya G
 
Malicious Software Identification
Malicious Software IdentificationMalicious Software Identification
Malicious Software Identification
sandeep shergill
 
Analysis Of Adverarial Code - The Role of Malware Kits
Analysis Of Adverarial Code - The Role of Malware KitsAnalysis Of Adverarial Code - The Role of Malware Kits
Analysis Of Adverarial Code - The Role of Malware Kits
Rahul Mohandas
 

What's hot (19)

Malicious Software and Virus
Malicious Software and Virus Malicious Software and Virus
Malicious Software and Virus
 
RIoT (Raiding Internet of Things) by Jacob Holcomb
RIoT  (Raiding Internet of Things)  by Jacob HolcombRIoT  (Raiding Internet of Things)  by Jacob Holcomb
RIoT (Raiding Internet of Things) by Jacob Holcomb
 
Intruders
IntrudersIntruders
Intruders
 
Information Security (Malicious Software)
Information Security (Malicious Software)Information Security (Malicious Software)
Information Security (Malicious Software)
 
Intrusion Detection
Intrusion DetectionIntrusion Detection
Intrusion Detection
 
Intrusion Detection System using AI and Machine Learning Algorithm
Intrusion Detection System using AI and Machine Learning AlgorithmIntrusion Detection System using AI and Machine Learning Algorithm
Intrusion Detection System using AI and Machine Learning Algorithm
 
Malicious Client Detection using Machine learning
Malicious Client Detection using Machine learningMalicious Client Detection using Machine learning
Malicious Client Detection using Machine learning
 
Program security
Program securityProgram security
Program security
 
Virus and malware presentation
Virus and malware presentationVirus and malware presentation
Virus and malware presentation
 
DC612 Day - Hands on Penetration Testing 101
DC612 Day - Hands on Penetration Testing 101DC612 Day - Hands on Penetration Testing 101
DC612 Day - Hands on Penetration Testing 101
 
Seminar Report | Network Intrusion Detection using Supervised Machine Learnin...
Seminar Report | Network Intrusion Detection using Supervised Machine Learnin...Seminar Report | Network Intrusion Detection using Supervised Machine Learnin...
Seminar Report | Network Intrusion Detection using Supervised Machine Learnin...
 
Network defenses
Network defensesNetwork defenses
Network defenses
 
5 howtomitigate
5 howtomitigate5 howtomitigate
5 howtomitigate
 
Worst-Case Scenario: Being Detected without Knowing You are Detected
Worst-Case Scenario: Being Detected without Knowing You are DetectedWorst-Case Scenario: Being Detected without Knowing You are Detected
Worst-Case Scenario: Being Detected without Knowing You are Detected
 
Spo2 t19 spo2-t19
Spo2 t19 spo2-t19Spo2 t19 spo2-t19
Spo2 t19 spo2-t19
 
Chapter 1 malware analysis primer
Chapter 1 malware analysis primerChapter 1 malware analysis primer
Chapter 1 malware analysis primer
 
Penetration testing overview
Penetration testing overviewPenetration testing overview
Penetration testing overview
 
Malicious Software Identification
Malicious Software IdentificationMalicious Software Identification
Malicious Software Identification
 
Analysis Of Adverarial Code - The Role of Malware Kits
Analysis Of Adverarial Code - The Role of Malware KitsAnalysis Of Adverarial Code - The Role of Malware Kits
Analysis Of Adverarial Code - The Role of Malware Kits
 

Similar to Malewareanalysis

Malewareanalysis presentation
Malewareanalysis presentationMalewareanalysis presentation
Malewareanalysis presentation
ahmad abdelhafeez
 
Malware Detection By Machine Learning Presentation.pptx
Malware Detection By Machine Learning  Presentation.pptxMalware Detection By Machine Learning  Presentation.pptx
Malware Detection By Machine Learning Presentation.pptx
alishapatidar2021
 
Complete notes security
Complete notes securityComplete notes security
Complete notes securityKitkat Emoo
 
ANTIVIRUS AND VIRUS Powerpoint presentation
ANTIVIRUS AND VIRUS Powerpoint presentationANTIVIRUS AND VIRUS Powerpoint presentation
ANTIVIRUS AND VIRUS Powerpoint presentation
abhijit chintamani
 
Preventive measures. Blog. pptx
Preventive measures. Blog. pptxPreventive measures. Blog. pptx
Preventive measures. Blog. pptx
ReshmaBV2
 
CH1- Introduction to malware analysis-v2.pdf
CH1- Introduction to malware analysis-v2.pdfCH1- Introduction to malware analysis-v2.pdf
CH1- Introduction to malware analysis-v2.pdf
WajdiElhamzi3
 
Computer Virus
Computer VirusComputer Virus
Computer Virus
diarfirstdiarfirst
 
Ethical Hacking n VAPT presentation by Suvrat jain
Ethical Hacking n VAPT presentation by Suvrat jainEthical Hacking n VAPT presentation by Suvrat jain
Ethical Hacking n VAPT presentation by Suvrat jain
Suvrat Jain
 
Viruses (Lecture) IT Slides # 3
Viruses (Lecture) IT Slides # 3Viruses (Lecture) IT Slides # 3
Viruses (Lecture) IT Slides # 3
Muhammad Talha Zaroon
 
Virus And Antivirus short presentation.pptx
Virus And Antivirus short presentation.pptxVirus And Antivirus short presentation.pptx
Virus And Antivirus short presentation.pptx
sachingwalani24
 
Cs8792 cns - unit v
Cs8792   cns - unit vCs8792   cns - unit v
Cs8792 cns - unit v
ArthyR3
 
Pentesting Tools to Find Bugs Before Hackers | CyberPro Magazine
Pentesting Tools to Find Bugs Before Hackers | CyberPro MagazinePentesting Tools to Find Bugs Before Hackers | CyberPro Magazine
Pentesting Tools to Find Bugs Before Hackers | CyberPro Magazine
cyberprosocial
 
Virus and its CounterMeasures -- Pruthvi Monarch
Virus and its CounterMeasures                         -- Pruthvi Monarch Virus and its CounterMeasures                         -- Pruthvi Monarch
Virus and its CounterMeasures -- Pruthvi Monarch
Pruthvi Monarch
 
CHAPTER 1 MALWARE ANALYSIS PRIMER.pdf
CHAPTER 1 MALWARE ANALYSIS PRIMER.pdfCHAPTER 1 MALWARE ANALYSIS PRIMER.pdf
CHAPTER 1 MALWARE ANALYSIS PRIMER.pdf
ManjuAppukuttan2
 
How Malware Works
How Malware WorksHow Malware Works
How Malware Works
AlienVault
 
Is av dead or just missing in action - avar2016
Is av dead or just missing in action - avar2016Is av dead or just missing in action - avar2016
Is av dead or just missing in action - avar2016
rajeshnikam
 
11 Computer Privacy
11 Computer Privacy11 Computer Privacy
11 Computer Privacy
Saqib Raza
 
Computer and internet security
Computer and internet securityComputer and internet security
Computer and internet security
hoshmand kareem
 
Cyber-Security-Unit-4.pptx
Cyber-Security-Unit-4.pptxCyber-Security-Unit-4.pptx
Cyber-Security-Unit-4.pptx
TikdiPatel
 
VAPT_FINAL SLIDES.pptx
VAPT_FINAL SLIDES.pptxVAPT_FINAL SLIDES.pptx
VAPT_FINAL SLIDES.pptx
karthikvcyber
 

Similar to Malewareanalysis (20)

Malewareanalysis presentation
Malewareanalysis presentationMalewareanalysis presentation
Malewareanalysis presentation
 
Malware Detection By Machine Learning Presentation.pptx
Malware Detection By Machine Learning  Presentation.pptxMalware Detection By Machine Learning  Presentation.pptx
Malware Detection By Machine Learning Presentation.pptx
 
Complete notes security
Complete notes securityComplete notes security
Complete notes security
 
ANTIVIRUS AND VIRUS Powerpoint presentation
ANTIVIRUS AND VIRUS Powerpoint presentationANTIVIRUS AND VIRUS Powerpoint presentation
ANTIVIRUS AND VIRUS Powerpoint presentation
 
Preventive measures. Blog. pptx
Preventive measures. Blog. pptxPreventive measures. Blog. pptx
Preventive measures. Blog. pptx
 
CH1- Introduction to malware analysis-v2.pdf
CH1- Introduction to malware analysis-v2.pdfCH1- Introduction to malware analysis-v2.pdf
CH1- Introduction to malware analysis-v2.pdf
 
Computer Virus
Computer VirusComputer Virus
Computer Virus
 
Ethical Hacking n VAPT presentation by Suvrat jain
Ethical Hacking n VAPT presentation by Suvrat jainEthical Hacking n VAPT presentation by Suvrat jain
Ethical Hacking n VAPT presentation by Suvrat jain
 
Viruses (Lecture) IT Slides # 3
Viruses (Lecture) IT Slides # 3Viruses (Lecture) IT Slides # 3
Viruses (Lecture) IT Slides # 3
 
Virus And Antivirus short presentation.pptx
Virus And Antivirus short presentation.pptxVirus And Antivirus short presentation.pptx
Virus And Antivirus short presentation.pptx
 
Cs8792 cns - unit v
Cs8792   cns - unit vCs8792   cns - unit v
Cs8792 cns - unit v
 
Pentesting Tools to Find Bugs Before Hackers | CyberPro Magazine
Pentesting Tools to Find Bugs Before Hackers | CyberPro MagazinePentesting Tools to Find Bugs Before Hackers | CyberPro Magazine
Pentesting Tools to Find Bugs Before Hackers | CyberPro Magazine
 
Virus and its CounterMeasures -- Pruthvi Monarch
Virus and its CounterMeasures                         -- Pruthvi Monarch Virus and its CounterMeasures                         -- Pruthvi Monarch
Virus and its CounterMeasures -- Pruthvi Monarch
 
CHAPTER 1 MALWARE ANALYSIS PRIMER.pdf
CHAPTER 1 MALWARE ANALYSIS PRIMER.pdfCHAPTER 1 MALWARE ANALYSIS PRIMER.pdf
CHAPTER 1 MALWARE ANALYSIS PRIMER.pdf
 
How Malware Works
How Malware WorksHow Malware Works
How Malware Works
 
Is av dead or just missing in action - avar2016
Is av dead or just missing in action - avar2016Is av dead or just missing in action - avar2016
Is av dead or just missing in action - avar2016
 
11 Computer Privacy
11 Computer Privacy11 Computer Privacy
11 Computer Privacy
 
Computer and internet security
Computer and internet securityComputer and internet security
Computer and internet security
 
Cyber-Security-Unit-4.pptx
Cyber-Security-Unit-4.pptxCyber-Security-Unit-4.pptx
Cyber-Security-Unit-4.pptx
 
VAPT_FINAL SLIDES.pptx
VAPT_FINAL SLIDES.pptxVAPT_FINAL SLIDES.pptx
VAPT_FINAL SLIDES.pptx
 

More from ahmad abdelhafeez

Surveying cross layer protocols in ws ns
Surveying cross layer protocols in ws nsSurveying cross layer protocols in ws ns
Surveying cross layer protocols in ws ns
ahmad abdelhafeez
 
Service level management
Service level managementService level management
Service level management
ahmad abdelhafeez
 
Energy harvesting sensor nodes
Energy harvesting sensor nodes   Energy harvesting sensor nodes
Energy harvesting sensor nodes
ahmad abdelhafeez
 
Robust Breast Cancer Diagnosis on Four Different Datasets Using Multi-Classif...
Robust Breast Cancer Diagnosis on Four Different Datasets Using Multi-Classif...Robust Breast Cancer Diagnosis on Four Different Datasets Using Multi-Classif...
Robust Breast Cancer Diagnosis on Four Different Datasets Using Multi-Classif...
ahmad abdelhafeez
 
Robust Breast Cancer Diagnosis on Four Different Datasets Using Multi-Classif...
Robust Breast Cancer Diagnosis on Four Different Datasets Using Multi-Classif...Robust Breast Cancer Diagnosis on Four Different Datasets Using Multi-Classif...
Robust Breast Cancer Diagnosis on Four Different Datasets Using Multi-Classif...
ahmad abdelhafeez
 
Energy conservation in wireless sensor networks
Energy conservation in wireless sensor networksEnergy conservation in wireless sensor networks
Energy conservation in wireless sensor networks
ahmad abdelhafeez
 
Localization in wsn
Localization in wsnLocalization in wsn
Localization in wsn
ahmad abdelhafeez
 
Routing
RoutingRouting
Wsn security issues
Wsn security issuesWsn security issues
Wsn security issues
ahmad abdelhafeez
 
Trusted systems
Trusted systemsTrusted systems
Trusted systems
ahmad abdelhafeez
 
opnet
opnetopnet
Wsn security issues
Wsn security issuesWsn security issues
Wsn security issues
ahmad abdelhafeez
 
Sdn pres v2-Software-defined networks
Sdn pres v2-Software-defined networksSdn pres v2-Software-defined networks
Sdn pres v2-Software-defined networks
ahmad abdelhafeez
 
Intrusion prevension
Intrusion prevensionIntrusion prevension
Intrusion prevension
ahmad abdelhafeez
 
Digital forensics ahmed emam
Digital forensics   ahmed emamDigital forensics   ahmed emam
Digital forensics ahmed emam
ahmad abdelhafeez
 
Digital forensics.abdallah
Digital forensics.abdallahDigital forensics.abdallah
Digital forensics.abdallah
ahmad abdelhafeez
 
Cloud computing final show
Cloud computing final   showCloud computing final   show
Cloud computing final show
ahmad abdelhafeez
 
Incident handling.final
Incident handling.finalIncident handling.final
Incident handling.final
ahmad abdelhafeez
 
pentration testing
pentration testingpentration testing
pentration testing
ahmad abdelhafeez
 

More from ahmad abdelhafeez (20)

Surveying cross layer protocols in ws ns
Surveying cross layer protocols in ws nsSurveying cross layer protocols in ws ns
Surveying cross layer protocols in ws ns
 
Service level management
Service level managementService level management
Service level management
 
Energy harvesting sensor nodes
Energy harvesting sensor nodes   Energy harvesting sensor nodes
Energy harvesting sensor nodes
 
V5I3_IJERTV5IS031157
V5I3_IJERTV5IS031157V5I3_IJERTV5IS031157
V5I3_IJERTV5IS031157
 
Robust Breast Cancer Diagnosis on Four Different Datasets Using Multi-Classif...
Robust Breast Cancer Diagnosis on Four Different Datasets Using Multi-Classif...Robust Breast Cancer Diagnosis on Four Different Datasets Using Multi-Classif...
Robust Breast Cancer Diagnosis on Four Different Datasets Using Multi-Classif...
 
Robust Breast Cancer Diagnosis on Four Different Datasets Using Multi-Classif...
Robust Breast Cancer Diagnosis on Four Different Datasets Using Multi-Classif...Robust Breast Cancer Diagnosis on Four Different Datasets Using Multi-Classif...
Robust Breast Cancer Diagnosis on Four Different Datasets Using Multi-Classif...
 
Energy conservation in wireless sensor networks
Energy conservation in wireless sensor networksEnergy conservation in wireless sensor networks
Energy conservation in wireless sensor networks
 
Localization in wsn
Localization in wsnLocalization in wsn
Localization in wsn
 
Routing
RoutingRouting
Routing
 
Wsn security issues
Wsn security issuesWsn security issues
Wsn security issues
 
Trusted systems
Trusted systemsTrusted systems
Trusted systems
 
opnet
opnetopnet
opnet
 
Wsn security issues
Wsn security issuesWsn security issues
Wsn security issues
 
Sdn pres v2-Software-defined networks
Sdn pres v2-Software-defined networksSdn pres v2-Software-defined networks
Sdn pres v2-Software-defined networks
 
Intrusion prevension
Intrusion prevensionIntrusion prevension
Intrusion prevension
 
Digital forensics ahmed emam
Digital forensics   ahmed emamDigital forensics   ahmed emam
Digital forensics ahmed emam
 
Digital forensics.abdallah
Digital forensics.abdallahDigital forensics.abdallah
Digital forensics.abdallah
 
Cloud computing final show
Cloud computing final   showCloud computing final   show
Cloud computing final show
 
Incident handling.final
Incident handling.finalIncident handling.final
Incident handling.final
 
pentration testing
pentration testingpentration testing
pentration testing
 

Recently uploaded

Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
Kerry Sado
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation & Control
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 
Online aptitude test management system project report.pdf
Online aptitude test management system project report.pdfOnline aptitude test management system project report.pdf
Online aptitude test management system project report.pdf
Kamal Acharya
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
AJAYKUMARPUND1
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
JoytuBarua2
 
DESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABS
DESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABSDESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABS
DESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABS
itech2017
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
Aditya Rajan Patra
 
digital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdfdigital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdf
drwaing
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
obonagu
 
Technical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prismsTechnical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prisms
heavyhaig
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
ydteq
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Dr.Costas Sachpazis
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
MdTanvirMahtab2
 
Fundamentals of Induction Motor Drives.pptx
Fundamentals of Induction Motor Drives.pptxFundamentals of Induction Motor Drives.pptx
Fundamentals of Induction Motor Drives.pptx
manasideore6
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
SamSarthak3
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
thanhdowork
 
Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
Dr Ramhari Poudyal
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
Osamah Alsalih
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
fxintegritypublishin
 

Recently uploaded (20)

Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 
Online aptitude test management system project report.pdf
Online aptitude test management system project report.pdfOnline aptitude test management system project report.pdf
Online aptitude test management system project report.pdf
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
 
DESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABS
DESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABSDESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABS
DESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABS
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
 
digital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdfdigital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdf
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
 
Technical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prismsTechnical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prisms
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
 
Fundamentals of Induction Motor Drives.pptx
Fundamentals of Induction Motor Drives.pptxFundamentals of Induction Motor Drives.pptx
Fundamentals of Induction Motor Drives.pptx
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
 
Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
 

Malewareanalysis

  • 1. Malware Analysis Network Security 1AAST COMP ENG Dr Ashraf Tammam Supervised by Dr . Ashraf Tammam Presented by: • Ahmed Abd Elhafeez • Ahmed Elbohy • Moataz Ahmed 5/7/2014
  • 2. Agenda 2AAST COMP ENG Dr Ashraf Tammam • Introduction to Malware • What is a Malware ? • Types of Malware • How do they infect hosts? • How to detect them? • Malware Analysis • Goals of Malware Analysis • Types of Malware Analysis • Tools for Malware Analysis • Malware Analysis Simulation Steps • Conclusion • Refrences 5/7/2014
  • 3. • Introduction to malware • What is a malware ? • Types of malware • How do they infect hosts? • How to detect them • Malware Analysis • Goals of Malware Analysis • Types of Malware Analysis • Tools for Malware Analysis • Malware Analysis Simulation Steps • Conclusion • References AAST COMP ENG Dr Ashraf Tammam 35/7/2014
  • 4. Introduction AAST COMP ENG Dr Ashraf Tammam 4 Mission Statement The purpose of this presentation is to give someone new to reverse engineering malware (REM) a place to start. At the end you should be familiar with the basic hardware, tools and Concepts needed to learn how begin to do REM. 5/7/2014
  • 5. “But What Might Go Wrong If we Were To Begin To Try to Analyze Malware?” • You might get attacked by unhappy malware authors/users • Your system could get infected, and that might result in: -- Your system being used to spam people -- Your personally identifiable information getting stolen -- Your system getting used to distribute malware; pirated software, movies, music; child pornography; etc. -- Your system getting used as a stepping stone from which to attack government systems or critical infrastructure. • You might even end up being arrested. 55/7/2014 AAST COMP ENG Dr Ashraf Tammam
  • 6. • Introduction to Malware • What is a Malware? • Types of malware • How do they infect hosts? • How to detect them • Malware Analysis • Goals of Malware Analysis • Types of Malware Analysis • Tools for Malware Analysis • Malware Analysis Simulation Steps • Conclusion • References AAST COMP ENG Dr Ashraf Tammam 65/7/2014
  • 7. What is a Malware ? • Malware is a set of instructions that run on your computer and make your system do something that an attacker wants it to do. • Programming code that is capable of causing harm to availability , integrity of code or data, or confidentiality in a computing system encompasses Trojan horses, viruses, worms, and trapdoors. 7AAST COMP ENG Dr Ashraf Tammam5/7/2014
  • 8. What Exactly is “Malware”? One possible definition: Malware is a software you don’t want. 8 • Steal personal information • Delete files • Steal software serial numbers • Use your computer as relay 5/7/2014 AAST COMP ENG Dr Ashraf Tammam
  • 9. Distribution of malware 5/7/2014 AAST COMP ENG Dr Ashraf Tammam 9
  • 10. • Introduction to Malware • What is a Malware? • Types of malware • How do they infect hosts? • How to detect them • Malware Analysis • Goals of Malware Analysis • Types of Malware Analysis • Tools for Malware Analysis • Malware Analysis Simulation Steps • Conclusion • References AAST COMP ENG Dr Ashraf Tammam 105/7/2014
  • 11. Threat types AAST COMP ENG Dr Ashraf Tammam 115/7/2014
  • 12. Types of Malware AAST COMP ENG Dr Ashraf Tammam 125/7/2014
  • 13. Types of Malware • viruses :a computer program that is usually hidden within another seemingly innocuous program and that produces copies of itself and inserts them into other programs and usually performs a malicious action – Polymorphic : uses a polymorphic engine to mutate while keeping the original algorithm intact (packer) – Methamorphic : Change after each infection 13AAST COMP ENG Dr Ashraf Tammam5/7/2014
  • 14. Types of Malware • Backdoor : Bypasses normal security controls to give an attacker unauthorized access. • Botnet : All infected computers receive instructions from the same Command-and- Control (C&C) server • Downloader :Malicious code that exists only to download other malicious code – Used when attacker first gains access 14AAST COMP ENG Dr Ashraf Tammam5/7/2014
  • 15. Types of Malware • Scareware – Frightens user into buying something 15AAST COMP ENG Dr Ashraf Tammam5/7/2014
  • 16. Types of Malware • Spam-sending malware – Attacker rents machine to spammers • Worms :a usually small self-contained and self- replicating computer program that invades computers on a network and usually performs a destructive action 16AAST COMP ENG Dr Ashraf Tammam5/7/2014
  • 17. Types of Malware • Trojans Horse :a seemingly useful computer program that contains concealed instructions which when activated perform an illicit or malicious action 17AAST COMP ENG Dr Ashraf Tammam5/7/2014
  • 18. Types of Malware • Sniffers : an application used to monitor and analyze network traffic. • Spyware :software that is installed on a computer without the user's knowledge and transmits information about the user's computer activities over the Internet 18AAST COMP ENG Dr Ashraf Tammam5/7/2014
  • 19. Types of Malware 19AAST COMP ENG Dr Ashraf Tammam Adware : software installed that provides advertisers with information about the users browsing habits, thus allowing the advertiser to provide targeted ads 5/7/2014
  • 20. Types of Malware • from pandalab blog 20AAST COMP ENG Dr Ashraf Tammam • E-Mail Generators. An e-mail generating program can be used to create and send large quantities of e-mail, such as malware, spyware, and spam, to other systems without the user’s permission or knowledge 5/7/2014
  • 21. Types of Malware Ransomware To unlock you need to send an SMS with the text4121800286to the number3649Enter the resulting code:Any attempt to reinstall the system may lead to loss of important information and computer damage from pandalab blog 21AAST COMP ENG Dr Ashraf Tammam5/7/2014
  • 22. Types of Malware • Keystroke Loggers. A keystroke logger monitors and records keyboard use – Some require the attacker to retrieve the data from the system – Actively transfer the data to another system through e-mail, file transfer, or other means AAST COMP ENG Dr Ashraf Tammam 225/7/2014
  • 23. Types of Malware • Web Browser Plug-Ins A Web browser plug-in provides a way for certain types of content to be displayed or executed through a Web browser – E.g., Malicious Web browser plug-ins that act as spyware and monitor use of the browser AAST COMP ENG Dr Ashraf Tammam 235/7/2014
  • 24. • Mass malware – Intended to infect as many machines as possible – Most common type • Targeted malware – Tailored to a specific target – Very difficult to detect, prevent, and remove – Requires advanced analysis – Ex: Stuxnet 24AAST COMP ENG Dr Ashraf Tammam Types of Malware 5/7/2014
  • 25. • Introduction to malware • What is a malware? • Types of malware • How do they infect hosts? • How to detect them • Malware Analysis • Goals OF Malware Analysis • Types OF Malware Analysis • Tools For Malware Analysis • Malware Analysis Simulation Steps • Conclusion • References AAST COMP ENG Dr Ashraf Tammam 255/7/2014
  • 26. What to Infect • Executable • Interpreted file • Kernel • Service • MBR (Master Boot Record) 26AAST COMP ENG Dr Ashraf Tammam5/7/2014
  • 32. Packers Malware Infected host Executable Packer Payload 32AAST COMP ENG Dr Ashraf Tammam Packers are software programs that compress and encrypt other executable files in a disk and restore the original executable images when the packed files are loaded into memories. 5/7/2014
  • 33. Packer functionalities • Compress • Encrypt • Randomize (polymorphism) • Anti-debug technique (int / fake jmp) • Add-junk • Anti-VM (virtual machine) 33AAST COMP ENG Dr Ashraf Tammam5/7/2014
  • 34. • Introduction to malware • What is a malware? • Types of malware • How do they infect hosts? • How to detect them? • Malware Analysis • Goals OF Malware Analysis • Types OF Malware Analysis • Tools FOR Malware Analysis • Malware Analysis Simulation Steps • Conclusion • REFRENCES AAST COMP ENG Dr Ashraf Tammam 345/7/2014
  • 35. It is not possible to build a perfect virus/malware detector (Cohen) 35AAST COMP ENG Dr Ashraf Tammam5/7/2014
  • 36. Anti-virus • Analyze system behavior • Analyze binary to decide if it a virus • Type : – Scanner – Real time monitor 36AAST COMP ENG Dr Ashraf Tammam5/7/2014
  • 37. Anti-virus -Virus signature • Find a string that can identify the virus • Fingerprint like 37AAST COMP ENG Dr Ashraf Tammam5/7/2014
  • 38. Anti-virus-Heuristics • Analyze program behavior Network access File open Attempt to delete file Attempt to modify the boot sector 38AAST COMP ENG Dr Ashraf Tammam5/7/2014
  • 39. Anti-virus -Checksum • A checksum is a value used to verify the integrity of a file or a data transfer. In other words, it is a sum that checks the validity of data. Checksums are typically used to compare two sets of data to make sure they are the same. • Compute a checksum for – Good binary – Configuration file • Detect change by comparing checksum 39AAST COMP ENG Dr Ashraf Tammam5/7/2014
  • 40. Anti-virus -Dealing with Packer • Launch the exe • Wait until it is unpack • Dump the memory 40AAST COMP ENG Dr Ashraf Tammam5/7/2014
  • 41. Sandbox analysis • Provides file system, registry keys, and network traffic monitoring in controlled environment and produces a well formed report • Using a sandbox is more efficient and sometimes more effective • Running the executable in a VM • Observe it – File activity – Network – Memory 41AAST COMP ENG Dr Ashraf Tammam5/7/2014
  • 42. • Introduction to malware • What is a malware? • Types of malware • How do they infect hosts? • How to detect them? • Malware Analysis • Goals of Malware Analysis • Types of Malware Analysis • Tools for Malware Analysis • Malware Analysis Simulation Steps • Conclusion • REFRENCES AAST COMP ENG Dr Ashraf Tammam 425/7/2014
  • 43. Challenges in Malware analysis • Zero day attack prevention • Data analytic methods work like a black box • Abstraction of Infection and Propagation models • Computational Cost • Generic Disinfection AAST COMP ENG Dr Ashraf Tammam 435/7/2014
  • 44. Malware Analysis • Dissecting malware to understand – How it works – How to identify it – How to defeat or eliminate it • A critical part of incident response 44AAST COMP ENG Dr Ashraf Tammam5/7/2014
  • 45. Incident Response • After malware is found, you need to know – Did an attacker implant a rootkit or trojan on your systems? – Is the attacker really gone? – What did the attacker steal or add? – How did the attack get in • Root-cause analysis 45AAST COMP ENG Dr Ashraf Tammam5/7/2014
  • 46. Three Areas 1- Visual Analysis: What you can deduce just by looking at the file, its strings , size, where it came from etc. 2- Behavioral Analysis : How the malware behaves when executed , who it talks to, what gets installed, how it runs, etc. 3-Code Analysis: The actual viewing of the code and walking through it to get a better understanding of the malware and what it's doing. AAST COMP ENG Dr Ashraf Tammam 465/7/2014
  • 47. Analyzing the Threat • Capture Malware from attackers – Determine how they are getting in. – Who are they targeting • Run Malware in an isolated environment – What does the malware do? • Analyze the binary itself – Some malware can detect isolated environments or has hidden code. 5/7/2014 AAST COMP ENG Dr Ashraf Tammam 47
  • 48. • Introduction to malware • What is a malware? • Types of malware • How do they infect hosts? • How to detect them? • malware Analysis • Goals of malware Analysis • Types of Malware Analysis • Tools for Malware Analysis • Malware Analysis Simulation Steps • Conclusion • References AAST COMP ENG Dr Ashraf Tammam 485/7/2014
  • 49. Goals of Malware Analysis • The goal of malware analysis is to gain an understanding of how a specific piece of malware functions • so that defenses can be built to protect an organization’s network. • There are two key questions that must be answered. – The first: how did this machine become infected with this piece of malware? – The second: what exactly does this malware do? • After determining the specific type of malware, you will have to determine which question is more critical to your situation. AAST COMP ENG Dr Ashraf Tammam 495/7/2014
  • 50. • Introduction to malware • What is a malware? • Types of malware • How do they infect hosts? • How to detect them? • malware Analysis • Goals of malware Analysis • Types of Malware Analysis • Tools for Malware Analysis • Malware Analysis Simulation Steps • Conclusion • REFRENCES AAST COMP ENG Dr Ashraf Tammam 505/7/2014
  • 51. TYPES OF Malware Analysis • Code(static) Analysis :the actual viewing of code and walking through it to get a better understanding of the malware and what it is doing AAST COMP ENG Dr Ashraf Tammam 515/7/2014
  • 52. Static Analysis techniques • Scanning with anti-virus software • File Signatures • Hashes • Performing A file’s strings, functions, and headers search • Portable Executable (PE) Headers + Resources • Unpacking the malware • Disassembling the malware like IDA Pro. AAST COMP ENG Dr Ashraf Tammam 525/7/2014
  • 53. Signatures • Host-based signatures – Identify files or registry keys on a victim computer that indicate an infection – Focus on what the malware did to the system • Network signatures – Detect malware by analyzing network traffic – More effective when made using malware analysis 53AAST COMP ENG Dr Ashraf Tammam5/7/2014
  • 54. • FILE SIGNATURE – Leveraging on the analysis of others – Anti-Viruses have their own analysis of Malware, based on • Signature • Heuristics AAST COMP ENG Dr Ashraf Tammam 545/7/2014 Signatures
  • 55. Hashes • A fingerprint for malware • MD5 or SHA-1 • Condenses a file of any size down to a fixed- length fingerprint 55AAST COMP ENG Dr Ashraf Tammam5/7/2014
  • 56. Hash Calc 56AAST COMP ENG Dr Ashraf Tammam5/7/2014
  • 57. Hash Uses • Label a malware file • Share the hash with other analysts to identify malware • Search the hash online to see if someone else has already identified the file 57AAST COMP ENG Dr Ashraf Tammam5/7/2014
  • 58. Strings • Any sequence of printable characters is a string • Strings are terminated by a null (0x00) • ASCII characters are 8 bits long – Now called ANSI • Unicode characters are 16 bits long – Microsoft calls them "wide characters" 58AAST COMP ENG Dr Ashraf Tammam5/7/2014
  • 59. STRINGS • Strings are identified by a NULL terminating • Character AAST COMP ENG Dr Ashraf Tammam 595/7/2014
  • 60. 60AAST COMP ENG Dr Ashraf Tammam5/7/2014
  • 61. TYPES OF Malware Analysis • Behavioral (Dynamic) Analysis :is how the malware behaves when executed, who it talks to, what gets installed, and how it runs AAST COMP ENG Dr Ashraf Tammam 615/7/2014
  • 62. Dynamic Analysis techniques AAST COMP ENG Dr Ashraf Tammam 625/7/2014
  • 63. Dynamic Analysis • Sometimes malware is sophisticated enough to detect that it is sandboxed or running in a limited environment • The good news: We have the machine code. • The bad news: All we have is the machine code. • We can then reverse engineer…. 5/7/2014 AAST COMP ENG Dr Ashraf Tammam 63
  • 64. Reverse Engineering • Reverse engineering is always possible since the machine code is present in the malware sample. • This requires expert knowledge in assembly. • Only worthwhile if you are looking for odd behavior as it is slow and tedious work. 5/7/2014 AAST COMP ENG Dr Ashraf Tammam 64
  • 65. Reversing malware • Set up a Virtual Environment. • Get the necessary tools ready. • Snapshot is your best friend. AAST COMP ENG Dr Ashraf Tammam 655/7/2014
  • 66. Simple Reverse Engineering Tools in Linux • Objdump is a free open source linux disassembler. – Outputs assembly code – Useful to find strings in the binary • GDB the standard debugger for linux can debug without source file information. • Strace intercepts all system calls and notifications and prints them out for a running process. 5/7/2014 AAST COMP ENG Dr Ashraf Tammam 66
  • 67. Reverse Engineering on Windows • Ida Pro is an interactive debugger which allows code to be disassembled and run at the same time – Breaks down the code into machine instructions – Interactively reverse engineers to C code – Allows interactive renaming of functions and variables as their function is discovered – Extremely useful  5/7/2014 AAST COMP ENG Dr Ashraf Tammam 67
  • 68. Dynamic Analysis techniques • Network traffic analysis • File system, and other Windows features(services, processes, etc.).. AAST COMP ENG Dr Ashraf Tammam 685/7/2014
  • 69. Dynamic Analysis techniques • Carefully let malware run on a (nearly) fully functional system. • Virtual machines are often useful – Take a clean snapshot – Run the malware – Observe results – Restore the clean snapshot 5/7/2014 AAST COMP ENG Dr Ashraf Tammam 69
  • 70. Dynamic Analysis techniques • SysInternals Process Monitor allows complete monitoring of API calls. – Also has a special boot monitor to track all changes upon a reboot • Regshot takes a before and after snapshot of the registry to find changes. 5/7/2014 AAST COMP ENG Dr Ashraf Tammam 70
  • 71. • Introduction to malware • What is a malware? • Types of malware • How do they infect hosts? • How to detect them? • malware Analysis • Goals OF malware Analysis • Types OF malware Analysis • Tools For malware Analysis • Malware Analysis Simulation Steps • Conclusion • References AAST COMP ENG Dr Ashraf Tammam 715/7/2014
  • 72. Tools For malware analysis • It is critical to identify various tools that can be used to perform malware analysis. • This is not a comprehensive list of tools that one must use • We will mention some critical tools not all of them. AAST COMP ENG Dr Ashraf Tammam 725/7/2014
  • 73. List of tools • Strings • PEView • Dependency Walker • Resource Hacker • Procmon • Procexp • Regshot • Capture • Wire shark • Netcat/Fakenet • FakeDNS/ApateDNS • PEID • UPX AAST COMP ENG Dr Ashraf Tammam 735/7/2014
  • 74. Needed terminology • Reverse Code Engineering: the process of disassembling software to reveal how the software functions. • Disassemblers: programs that take a programs executable binary as input and generate textual files that contain the assembly language code for the entire program or parts of it. AAST COMP ENG Dr Ashraf Tammam 745/7/2014
  • 75. Needed terminology • Debuggers :programs that allows software developers to observer their program while running it. • Decompiler :a program that take an executable binary file and attempts to produce readable high-level language code from it. AAST COMP ENG Dr Ashraf Tammam 755/7/2014
  • 76. Tools For malware analysis • Using physical hardware or virtual machines (VM). AAST COMP ENG Dr Ashraf Tammam 765/7/2014
  • 77. Setting up test environment • Computer Requirements: • At least 1GB of memory • A large hard drive: Allows you to keep images on the hard drive • Good Processor – Faster is better • NIC card • CDROM/DVD burner • Any Operating System AAST COMP ENG Dr Ashraf Tammam 775/7/2014
  • 78. Setting up test environment • VMware workstation: Run and network multiple OSes on one platform • Storage media: For transferring malware and storing unused OS images AAST COMP ENG Dr Ashraf Tammam 785/7/2014
  • 79. Setting up test environment • Internet Connectivity: Optional, but occasionally you might need it. • Collection of OSes: • You will need different operating systems for your testing • Base Image with no Patches • Base Image fully Patched • Configure as host-only or a network • Store on hard drive and/or burn to CD AAST COMP ENG Dr Ashraf Tammam 795/7/2014
  • 80. Tools For malware analysis • Process Explorer : small application that find out what files, registry keys and other objects have open, which DLL’s they have loaded • Process Monitor : small application used to monitor file system, registry , process, thread and DLL activity in real-time. • PSfile : application that shows a list of files on a system that are opened remotely. AAST COMP ENG Dr Ashraf Tammam 805/7/2014
  • 81. Tools For malware analysis • Rootkit Revealer :application that scans system for known rootkit-based malware. • Strings : application that searches for ANSI and UNICODE strings in binary images. • TCPView : application providing information about TCP and UDP connections , including the local and remote address and TCP connection state. AAST COMP ENG Dr Ashraf Tammam 815/7/2014
  • 82. Tools For malware analysis • Windump :Windows version of the powerful and flexible tcpdump sniffer. • Fport :Identifies unknown ports and their associate applications. • Hfind (Part of the Forensic Toolkit) :application that will scan for the disk for hidden files. • BgInfo : small application providing import system information such as hostname, IP address, OS version, etc. AAST COMP ENG Dr Ashraf Tammam 825/7/2014
  • 83. Tools For malware analysis • Vision : reports all open TCP and UDP ports and maps them to the owning process or application. • Filewatch :a file change monitor. • Attacker :a TCP/UDP port listener. • MD5sums : Generates signature or hashes for file integrity verification. – Before you launch the malware to have a baseline for comparison against other files the malware may create • Winalysis : monitors for changes to files, the registry, users, groups, security policies, services, shares, scheduled jobs, the system environment and more. AAST COMP ENG Dr Ashraf Tammam 835/7/2014
  • 84. Tools For malware analysis • WinHex : Hex editor, you may choose any hex editor that you like. • IDA Pro : popular interactive, programmable, extendible, multi-processor debugger and disassembler. • Reverse Engineering Compiler : popular decompiler. • ProcDump 32 :unpacker application. AAST COMP ENG Dr Ashraf Tammam 845/7/2014
  • 85. Tools For malware analysis • PE Explorer : provides tools for disassembly and inspection of unknown binaries. • Windbg : windows debugging applications. • Livekd : application that allows Windbg debugger to run locally on a live system. • Debugview : an application that monitors debug output on your local or a remote system. AAST COMP ENG Dr Ashraf Tammam 855/7/2014
  • 86. Tools For malware analysis • OllyDbg: 32-bit assembler level analysis debugger for Microsoft Windows to work with the malware for tasks such as viewing the code and stepping through it. • RegShot: Tool that tells you what has changed on your system Before and after you launch your malware • Netcat: “Swiss army knife” for networks. When you need something to connect to or attempt a connection from AAST COMP ENG Dr Ashraf Tammam 865/7/2014
  • 87. Tools For malware analysis • upx: Packer used a lot of compress and obfuscate code to uncompressed the code before analysis • WinRAR: Tool to compress large file(s) into one smaller file for safely transfer malware or information collect to keep things organized. Industry standard password is ‘infected’ • Ethereal: A protocol analyzer (aka: sniffer) – When launching the malware and while doing analysis. AAST COMP ENG Dr Ashraf Tammam 875/7/2014
  • 88. • Introduction to malware • What is a malware? • Types of malware • How do they infect hosts? • How to detect them? • malware Analysis • Goals of malware Analysis • Types Of malware Analysis • Tools For malware Analysis • Malware Analysis Simulation Steps • Conclusion • References AAST COMP ENG Dr Ashraf Tammam 885/7/2014
  • 89. Malware analysis main steps • Step1: Allocate physical or virtual systems for the analysis lab • Step 2: Isolate laboratory systems from the production environment • Step 3: Install behavioral analysis tools • Step 4: Install code-analysis tools • Step 5: Utilize online analysis tools • Next Steps 89 Moataz Ahmed Mahmoud , Ahmed Abdelhafez , Ahmed El bohy
  • 90. Step 1: Allocate physical or virtual systems for the analysis lab • A common approach to examining malicious software involves infecting a system with the malware specimen and then using the appropriate monitoring tools to observe how it behaves. This requires a laboratory system you can infect without affecting your production environment. • The most popular and flexible way to set up such a lab system involves virtualization software, which allows you to use a single physical computer for hosting multiple virtual systems, each running a potentially different operating system. Free virtualization software options include: • VMware Server • Windows Virtual PC • Microsoft Virtual Server • Virtual Box Moataz Ahmed Mahmoud , Ahmed Abdelhafez , Ahmed El bohy 90
  • 91. Step 2: Isolate laboratory systems from the production environment • You must take precautions to isolate the malware-analysis lab from the production network, to mitigate the risk that a malicious program will escape. You can separate the laboratory network from production using a firewall. Better yet, don't connect laboratory and production networks at all, to avoid firewall configuration issues that might allow malware to bypass filtering restrictions. Moataz Ahmed Mahmoud , Ahmed Abdelhafez , Ahmed El bohy 91
  • 92. Step 3: Install behavioral analysis tools • Before you're ready to infect your laboratory system with the malware specimen, you need to install and activate the appropriate monitoring tools. Free utilities that will let you observe how Windows malware interacts with its environment include: • File system and registry monitoring: Process Monitor and Capture BAT offer a powerful way to observe in real time how local processes read, write, or delete registry entries and files. These tools can help you understand how malware attempts to embed into the system upon infection. • Process monitoring: Process Explorer and Process Hacker replace the built-in Windows Task Manager, helping you observe malicious processes, including local network ports they may attempt to open. • Network monitoring: Wireshark and SmartSniff are network sniffers, which can observe laboratory network traffic for malicious communication attempts, such as DNS resolution requests, bot traffic, or downloads. • Change detection: Regshot is a lightweight tool for comparing the system's state before and after the infection, to highlight the key changes malware made to the file system and the registry. Moataz Ahmed Mahmoud , Ahmed Abdelhafez , Ahmed El bohy 92
  • 93. Step 4: Install code-analysis tools • Examining the code that comprises the specimen helps uncover characteristics that may be difficult to obtain through behavioral analysis. In the case of a malicious executable, you rarely will have the luxury of access to the source code from which it was created. Fortunately, the following free tools can help you reverse compiled Windows executables: • Disassembler and debugger: OllyDbg and IDA Pro Freeware can parse compiled Windows executables and, acting as disassemblers, display their code as Intel x86 assembly instructions. These tools also have debugging capabilities, which allow you to execute the most interesting parts of the malicious program slowly and under highly controlled conditions, so you can better understand the purpose of the code. • Memory dumper: LordPE and OllyDump help obtain protected code located in the lab system's memory and dump it to a file. This technique is particularly useful when analyzing packed executables, which are difficult to disassemble because they encode or encrypt their instructions, extracting them into RAM only during run-time. Moataz Ahmed Mahmoud , Ahmed Abdelhafez , Ahmed El bohy 93
  • 94. Step 5: Utilize online analysis tools • To round off your malware-analysis toolkit, add to it some freely available online tools that may assist with the reverse engineering process. One category of such tools performs automated behavioral analysis of the executables you supply. These applications look similar at first glance, but use different technologies on the back end. Consider submitting your malware specimen to several of these sites; depending on the specimen, some sites will be more effective than others. Such tools include: • Anubis • CWSandbox • Joebox • Norman SandBox • ThreatExpert Moataz Ahmed Mahmoud , Ahmed Abdelhafez , Ahmed El bohy 94
  • 95. Next Steps • With your initial toolkit assembled, start experimenting in the lab with malware you come across on the web, in your e-mail box, on your systems, and so on. Moataz Ahmed Mahmoud , Ahmed Abdelhafez , Ahmed El bohy 95
  • 96. • Introduction to malware • What is a malware? • Types of malware • How do they infect hosts? • How to detect them? • Malware Analysis • Goals OF malware Analysis • Types Of malware Analysis • Tools For malware Analysis • Malware Analysis Simulation Steps • Conclusion • References AAST COMP ENG Dr Ashraf Tammam 965/7/2014
  • 97. Conclusion • As you have seen there are various ways for an attacker to get malicious code to execute on remote computers • We have only scratched on the surface, there are much more to learn and discover 5/7/2014 AAST COMP ENG Dr Ashraf Tammam 97
  • 98. • Introduction to malware • What is a malware? • Types of malware • How do they infect hosts? • How to detect them? • malware Analysis • Goals OF malware Analysis • Types Of malware Analysis • Tools For malware Analysis • Malware Analysis Simulation Steps • malware Defense • Conclusion • References AAST COMP ENG Dr Ashraf Tammam 985/7/2014
  • 99. Refrences • [1] Ed Skoudis and Lenny Zeltser. Malware: Fighting Malicious Code. Prentice Hall, 2003. • [2] McGraw-Hill and Sybil P. Parker. McGraw-Hill Dictionary of Scientific and Technical Terms. McGraw-Hill Companies, Inc., 2003. • [3]Computer Economics, 2007 Malware Report: The Economic Impact of Viruses, Spyware,Adware, Botnets and Other Malicious Code, Retrieved 2007, November 23 – fromhttp://www.computereconomics.com/article.cfm?id=1225 • [4]Eldad Eilam, (2005). Reversing: Secrets of Reverse Engineering. Indianapolis, IN: Wiley Publishing. • [5]eWeek, Metasploit Creator Releases Malware Search Engine, retrieved 2007, November 24 – from http://www.eweek.com/article2/0,1759,1990158,00.asp • [6]GIAC, Analysis of the Incident Handling Six Step Process, Retrieved 2007, November 24 – from http://www2.giac.org/resources/whitepaper/network/17.php?id=17&cat=network • [7]Honeynet, Know Your Enemy: Malicious Web Servers, Retrieved 2007, November 24 from – http://www.honeynet.org/papers/mws/KYE-Malicious_Web_Servers.htm • [8]Lorna Hutcheson (2006), Malware Analysis The Basics, Retrieved 2007, November 24 from – http://isc.sans.org/presentations/cookie.pdf • [9]Merriam-Webster Online. Retrieved 2007, July 23rd, from www.m-w.com • [10]SANS, Retrieved 2007, November 24, from – https://www2.sans.org/training/description.php?cid=799 AAST COMP ENG Dr Ashraf Tammam 995/7/2014
  • 100. Questions ? 5/7/2014 AAST COMP ENG Dr Ashraf Tammam 100
  • 101. 5/7/2014 AAST COMP ENG Dr Ashraf Tammam 101