Reversing & Malware Analysis Training Part 9 - Advanced Malware Analysis

www.SecurityXploded.com
Disclaimer
The Content, Demonstration, Source Code and Programs presented here is "AS IS" without
any warranty or conditions of any kind. Also the views/ideas/knowledge expressed here are
solely of the trainer’s only and nothing to do with the company or the organization in which
the trainer is currently working.

However in no circumstances neither the trainer nor SecurityXploded is responsible for any
damage or loss caused due to use or misuse of the information presented here.




                                        www.SecurityXploded.com
Acknowledgement
 Special thanks to null & Garage4Hackers community for their extended support and
  cooperation.
 Thanks to all the trainers who have devoted their precious time and countless hours to make it
  happen.




                                         www.SecurityXploded.com
Reversing & Malware Analysis Training

This presentation is part of our Reverse Engineering & Malware Analysis Training
program. Currently it is delivered only during our local meet for FREE of cost.




For complete details of this course, visit our Security Training page.



                                        www.SecurityXploded.com
Who am I
Monnappa


    m0nna
    Member of SecurityXploded (SX)
    Info Security Investigator @ Cisco
    Reverse Engineering, Malware Analysis, Memory Forensics
    Email: monnappa22@gmail.com, twitter@monnappa22




                                www.SecurityXploded.com
Contents
   Why Malware Analysis?

   Types of Malware Analysis

   Static Analysis

   Dynamic Analysis

   Memory Analysis

   Demo




                                www.SecurityXploded.com
Why Malware Analysis?
To determine:

   the nature and purpose of the malware

   Interaction with the file system

   Interaction with the registry

   Interaction with the network

   Identifiable patterns


                                       www.SecurityXploded.com
Types of Malware Analysis?

   Static Analysis
         - Analyzing without executing the malware


   Dynamic Analysis
         - Analyzing by executing the malware



   Memory Analysis
         - Analyzing the RAM for artifacts




                                   www.SecurityXploded.com
Static Analysis
Steps:
    Determine the file type
             tools: file utility on unix and windows (need to install)

   Determine the cryptographic hash
             tools: md5sum utility on unix and windows (part of unix utils for windows)

   Strings search
              tools: strings utility on unix and windows , Bintext

   File obfuscation (packers, cryptors and binders) detection
              tools: PEiD, RDG packer detector

   Submission to online antivirus scanners (virustotal, jotti, cymru)
            tools: browser and public api of Virustotal

   Determine the Imports
            tools: PEview, Dependency Walker

    Disassembly
             tools: IDA Pro, Ollydbg
                                                      www.SecurityXploded.com
Dynamic Analysis
Involves executing the malware in a controlled environment to determine its behavior

Steps:

   Determine the File system activity
           tools: process monitor, capturebat


   Determine the Process activity
           tools: process explorer, process monitor, capturebat


   Determine the Network activity
           tools: wireshark


   Detemine the Registry activity
           tools: regmon, process monitor, capturebat




                                            www.SecurityXploded.com
Memory Analysis
Finding and extracting artifacts from computer’s RAM

      Determine the process activity

    Determine the network connections

      Determine hidden artifacts

    Detemine the Registry activity

   Tools:
            Volatility (Advanced Memory Forensic Framework)
   Advantages:


      helps in rootkit detection

      helps in unpacking

                                         www.SecurityXploded.com
http://youtu.be/592uIELKUX8
Reversing & Malware Analysis Training Part 9 -  Advanced Malware Analysis
Step 1 – Taking the cryptographic hash
The below screenshot shows the md5sum of the sample




                              www.SecurityXploded.com
Step 2 – Determine the packer
PEiD was unable determine the packer




                                   www.SecurityXploded.com
Step 3 – Determine the Imports
Dependency Walker shows the DLLs and API used by malicious executable




                                      www.SecurityXploded.com
Step 4 – VirusTotal Submission
VirusTotal results show that this sample is a zeus bot (zbot)




                                           www.SecurityXploded.com
Reversing & Malware Analysis Training Part 9 -  Advanced Malware Analysis
Step 1 – Running the monitoring tools
Before executing the malware, montioring tools are run to capture the activities of the malware




                                          www.SecurityXploded.com
Step 2 – Simulate Internet Services
Internet services are simulated to give fake response to malware and also to prevent malware from
talking out on the internet




                                         www.SecurityXploded.com
Step 3 – Executing the malware (edd94.exe)




                 www.SecurityXploded.com
Step 4 – process, registry and filesystem activity
The below results show the process, registry and fileystem activity after executing the malware (edd94.exe), also
explorer.exe performs lot of activity indicating code injection into explorer.exe




                                                 www.SecurityXploded.com
Step 5 – Malware drops a file (raruo.exe)
The below results show the malware dropping a file raruo.exe and creating a process.




                                    www.SecurityXploded.com
Step 6 – Explorer.exe setting value in registry
The below output shows explorer.exe setting a value under run registry subkey as a persistence
mechanism to survive the reboot.




                                         www.SecurityXploded.com
Step 7 – DNS query to malicious domain
Packet capture shows dns query to users9.nofeehost.com and also response shows that the “A” record
for the domain is pointed to the machine 192.168.1.2, which is simulating internet services.




                                        www.SecurityXploded.com
Step 8 – http connection to malicious domain
The below output shows zeus bot trying to download configuration file from C&C and also the fake
response given by the inetsim server.




                                         www.SecurityXploded.com
Step 9– ZeuS Tracker result
ZueS Tracker shows that the domain was a ZeuS C&C server




                                      www.SecurityXploded.com
Reversing & Malware Analysis Training Part 9 -  Advanced Malware Analysis
Step 1 – Taking the memory image
Suspending the VM creates a memory image of the infected machine, the below screenshot show the
memory image (infected.vmem) of the infected machine




                                       www.SecurityXploded.com
Step 2 – Process listing from memory image
Volatility’s pslist module shows the two process edd94.exe and raruo.exe




                                          www.SecurityXploded.com
Step 3 – Network connections from memory image
Volatility’s connscan module shows pid 1748 making http connection, this pid 1748 is associated with
explorer.exe




                                          www.SecurityXploded.com
Step 4 – Embedded exe and api hooks in explorer.exe
The below output shows the inline api hooks and embedded executable in explorer.exe, and also the
embedded executable is dumped into a directory (dump) by malfind plugin




                                          www.SecurityXploded.com
Step 5 – Virustotal submission of dumped exe
The virustotal submission confirms the dumped exe to be component of ZeuS bot




                                        www.SecurityXploded.com
Step 6 – Printing the registry key
Malware creates registry key to survive the reboot




                                                     www.SecurityXploded.com
Step 12 – Finding the malicious exe on infected machine
Finding malicious sample (raruo.exe) from infected host and virustotal submission confirms ZeuS(zbot) infection




                                                      www.SecurityXploded.com
Reversing & Malware Analysis Training Part 9 -  Advanced Malware Analysis
http://youtu.be/3bxzvrGf5w8
Disassembly Example
The below screenshot shows the disassembly of http bot, making connection to the C&C




                                                  www.SecurityXploded.com
Disassembly Example (contd)
The bot send the http request to the C&C




                                           www.SecurityXploded.com
Disassembly Example (contd)
The bot retireves data from C&C




                                           www.SecurityXploded.com
Disassembly Example (contd)
The below sceenshot shows some of the supported commands of this http bot




                                                   www.SecurityXploded.com
Disassembly Example (contd)
Bot runs the below code if the received command is “Execute”, it creates a process and sends the process id to the C&C server




                                                       www.SecurityXploded.com
Reference

   Complete Reference Guide for Reversing & Malware Analysis Training




                                     www.SecurityXploded.com
Thank You !



www.SecurityXploded.com
1 sur 44

Recommandé

Advanced Malware Analysis Training Session 7 - Malware Memory Forensics par
Advanced Malware Analysis Training Session 7  - Malware Memory ForensicsAdvanced Malware Analysis Training Session 7  - Malware Memory Forensics
Advanced Malware Analysis Training Session 7 - Malware Memory Forensicssecurityxploded
13.4K vues43 diapositives
Advanced Malware Analysis Training Session 6 - Malware Sandbox Analysis par
Advanced Malware Analysis Training Session 6  - Malware Sandbox AnalysisAdvanced Malware Analysis Training Session 6  - Malware Sandbox Analysis
Advanced Malware Analysis Training Session 6 - Malware Sandbox Analysissecurityxploded
14.7K vues27 diapositives
Advanced Malware Analysis Training Session 1 - Detection and Removal of Malwares par
Advanced Malware Analysis Training Session 1 - Detection and Removal of MalwaresAdvanced Malware Analysis Training Session 1 - Detection and Removal of Malwares
Advanced Malware Analysis Training Session 1 - Detection and Removal of Malwaressecurityxploded
20.5K vues54 diapositives
Advanced Malware Analysis Training Session 3 - Botnet Analysis Part 2 par
Advanced Malware Analysis Training Session 3 - Botnet Analysis Part 2Advanced Malware Analysis Training Session 3 - Botnet Analysis Part 2
Advanced Malware Analysis Training Session 3 - Botnet Analysis Part 2securityxploded
13.2K vues26 diapositives
Reversing & malware analysis training part 1 lab setup guide par
Reversing & malware analysis training part 1   lab setup guideReversing & malware analysis training part 1   lab setup guide
Reversing & malware analysis training part 1 lab setup guidesecurityxploded
28.5K vues17 diapositives
Advanced Malware Analysis Training Session 4 - Anti-Analysis Techniques par
Advanced Malware Analysis Training Session 4 - Anti-Analysis TechniquesAdvanced Malware Analysis Training Session 4 - Anti-Analysis Techniques
Advanced Malware Analysis Training Session 4 - Anti-Analysis Techniquessecurityxploded
16.1K vues28 diapositives

Contenu connexe

Tendances

Reversing & Malware Analysis Training Part 11 - Exploit Development [Advanced] par
Reversing & Malware Analysis Training Part 11 - Exploit Development [Advanced]Reversing & Malware Analysis Training Part 11 - Exploit Development [Advanced]
Reversing & Malware Analysis Training Part 11 - Exploit Development [Advanced]securityxploded
14.3K vues30 diapositives
Advanced Malware Analysis Training Session 5 - Reversing Automation par
Advanced Malware Analysis Training Session 5 - Reversing AutomationAdvanced Malware Analysis Training Session 5 - Reversing Automation
Advanced Malware Analysis Training Session 5 - Reversing Automationsecurityxploded
14K vues20 diapositives
Reversing & malware analysis training part 2 introduction to windows internals par
Reversing & malware analysis training part 2   introduction to windows internalsReversing & malware analysis training part 2   introduction to windows internals
Reversing & malware analysis training part 2 introduction to windows internalssecurityxploded
20.7K vues21 diapositives
Anti-Virus Evasion Techniques and Countermeasures par
Anti-Virus Evasion Techniques and CountermeasuresAnti-Virus Evasion Techniques and Countermeasures
Anti-Virus Evasion Techniques and Countermeasuresn|u - The Open Security Community
916 vues16 diapositives
Primer on password security par
Primer on password securityPrimer on password security
Primer on password securitysecurityxploded
13.4K vues42 diapositives
Application Virtualization par
Application VirtualizationApplication Virtualization
Application Virtualizationsecurityxploded
16.7K vues22 diapositives

Tendances(20)

Reversing & Malware Analysis Training Part 11 - Exploit Development [Advanced] par securityxploded
Reversing & Malware Analysis Training Part 11 - Exploit Development [Advanced]Reversing & Malware Analysis Training Part 11 - Exploit Development [Advanced]
Reversing & Malware Analysis Training Part 11 - Exploit Development [Advanced]
securityxploded14.3K vues
Advanced Malware Analysis Training Session 5 - Reversing Automation par securityxploded
Advanced Malware Analysis Training Session 5 - Reversing AutomationAdvanced Malware Analysis Training Session 5 - Reversing Automation
Advanced Malware Analysis Training Session 5 - Reversing Automation
securityxploded14K vues
Reversing & malware analysis training part 2 introduction to windows internals par securityxploded
Reversing & malware analysis training part 2   introduction to windows internalsReversing & malware analysis training part 2   introduction to windows internals
Reversing & malware analysis training part 2 introduction to windows internals
securityxploded20.7K vues
Advanced Malware Analysis Training Session 2 - Botnet Analysis Part 1 par securityxploded
Advanced Malware Analysis Training Session 2 - Botnet Analysis Part 1  Advanced Malware Analysis Training Session 2 - Botnet Analysis Part 1
Advanced Malware Analysis Training Session 2 - Botnet Analysis Part 1
securityxploded14.5K vues
Advanced Malware Analysis Training Session 11 - (Part 2) Dissecting the Heart... par securityxploded
Advanced Malware Analysis Training Session 11 - (Part 2) Dissecting the Heart...Advanced Malware Analysis Training Session 11 - (Part 2) Dissecting the Heart...
Advanced Malware Analysis Training Session 11 - (Part 2) Dissecting the Heart...
securityxploded8.8K vues
Reversing & malware analysis training part 3 windows pe file format basics par securityxploded
Reversing & malware analysis training part 3   windows pe file format basicsReversing & malware analysis training part 3   windows pe file format basics
Reversing & malware analysis training part 3 windows pe file format basics
securityxploded19.6K vues
Hunting Rootkit From the Dark Corners Of Memory par securityxploded
Hunting Rootkit From the Dark Corners Of MemoryHunting Rootkit From the Dark Corners Of Memory
Hunting Rootkit From the Dark Corners Of Memory
securityxploded2.9K vues

Similaire à Reversing & Malware Analysis Training Part 9 - Advanced Malware Analysis

Basic malware analysis par
Basic malware analysis Basic malware analysis
Basic malware analysis Cysinfo Cyber Security Community
511 vues33 diapositives
Reversing & malware analysis training part 9 advanced malware analysis par
Reversing & malware analysis training part 9   advanced malware analysisReversing & malware analysis training part 9   advanced malware analysis
Reversing & malware analysis training part 9 advanced malware analysisAbdulrahman Bassam
1K vues45 diapositives
Basic malware analysis par
Basic malware analysisBasic malware analysis
Basic malware analysissecurityxploded
3.7K vues33 diapositives
Reversing & malware analysis training part 12 rootkit analysis par
Reversing & malware analysis training part 12   rootkit analysisReversing & malware analysis training part 12   rootkit analysis
Reversing & malware analysis training part 12 rootkit analysisAbdulrahman Bassam
1.4K vues47 diapositives
Reversing & malware analysis training part 8 malware memory forensics par
Reversing & malware analysis training part 8   malware memory forensicsReversing & malware analysis training part 8   malware memory forensics
Reversing & malware analysis training part 8 malware memory forensicsAbdulrahman Bassam
1K vues27 diapositives
Advanced Malware Analysis Training - Detection and Removal of Malwares par
Advanced Malware Analysis Training - Detection and Removal of MalwaresAdvanced Malware Analysis Training - Detection and Removal of Malwares
Advanced Malware Analysis Training - Detection and Removal of Malwaresn|u - The Open Security Community
1.1K vues55 diapositives

Similaire à Reversing & Malware Analysis Training Part 9 - Advanced Malware Analysis(20)

Reversing & malware analysis training part 9 advanced malware analysis par Abdulrahman Bassam
Reversing & malware analysis training part 9   advanced malware analysisReversing & malware analysis training part 9   advanced malware analysis
Reversing & malware analysis training part 9 advanced malware analysis
Reversing & malware analysis training part 12 rootkit analysis par Abdulrahman Bassam
Reversing & malware analysis training part 12   rootkit analysisReversing & malware analysis training part 12   rootkit analysis
Reversing & malware analysis training part 12 rootkit analysis
Abdulrahman Bassam1.4K vues
Reversing & malware analysis training part 8 malware memory forensics par Abdulrahman Bassam
Reversing & malware analysis training part 8   malware memory forensicsReversing & malware analysis training part 8   malware memory forensics
Reversing & malware analysis training part 8 malware memory forensics
SE2016 Android Denis Zhuchinski "Ways of enhancing application security" par Inhacking
SE2016 Android Denis Zhuchinski "Ways of enhancing application security"SE2016 Android Denis Zhuchinski "Ways of enhancing application security"
SE2016 Android Denis Zhuchinski "Ways of enhancing application security"
Inhacking248 vues
Ilomo Clampi Botnet Aug2009 par Trend Micro
Ilomo Clampi Botnet Aug2009Ilomo Clampi Botnet Aug2009
Ilomo Clampi Botnet Aug2009
Trend Micro504 vues
Two-For-One Talk: Malware Analysis for Everyone par Paul Melson
Two-For-One Talk: Malware Analysis for EveryoneTwo-For-One Talk: Malware Analysis for Everyone
Two-For-One Talk: Malware Analysis for Everyone
Paul Melson1.9K vues
SANS Digital Forensics and Incident Response Poster 2012 par Rian Yulian
SANS Digital Forensics and Incident Response Poster 2012SANS Digital Forensics and Incident Response Poster 2012
SANS Digital Forensics and Incident Response Poster 2012
Rian Yulian3.1K vues
Malware analysis par Den Iir
Malware analysisMalware analysis
Malware analysis
Den Iir386 vues
Cyber Defense Forensic Analyst - Real World Hands-on Examples par Sandeep Kumar Seeram
Cyber Defense Forensic Analyst - Real World Hands-on ExamplesCyber Defense Forensic Analyst - Real World Hands-on Examples
Cyber Defense Forensic Analyst - Real World Hands-on Examples
Kunal - Introduction to backtrack - ClubHack2008 par ClubHack
Kunal - Introduction to backtrack - ClubHack2008Kunal - Introduction to backtrack - ClubHack2008
Kunal - Introduction to backtrack - ClubHack2008
ClubHack859 vues

Plus de securityxploded

Fingerprinting healthcare institutions par
Fingerprinting healthcare institutionsFingerprinting healthcare institutions
Fingerprinting healthcare institutionssecurityxploded
933 vues56 diapositives
Hollow Process Injection - Reversing and Investigating Malware Evasive Tactics par
Hollow Process Injection - Reversing and Investigating Malware Evasive TacticsHollow Process Injection - Reversing and Investigating Malware Evasive Tactics
Hollow Process Injection - Reversing and Investigating Malware Evasive Tacticssecurityxploded
3.7K vues30 diapositives
Buffer Overflow Attacks par
Buffer Overflow AttacksBuffer Overflow Attacks
Buffer Overflow Attackssecurityxploded
644 vues15 diapositives
Malicious Client Detection Using Machine Learning par
Malicious Client Detection Using Machine LearningMalicious Client Detection Using Machine Learning
Malicious Client Detection Using Machine Learningsecurityxploded
803 vues16 diapositives
Understanding CryptoLocker (Ransomware) with a Case Study par
Understanding CryptoLocker (Ransomware) with a Case StudyUnderstanding CryptoLocker (Ransomware) with a Case Study
Understanding CryptoLocker (Ransomware) with a Case Studysecurityxploded
2.1K vues67 diapositives
Linux Malware Analysis using Limon Sandbox par
Linux Malware Analysis using Limon SandboxLinux Malware Analysis using Limon Sandbox
Linux Malware Analysis using Limon Sandboxsecurityxploded
3.4K vues43 diapositives

Plus de securityxploded(20)

Fingerprinting healthcare institutions par securityxploded
Fingerprinting healthcare institutionsFingerprinting healthcare institutions
Fingerprinting healthcare institutions
securityxploded933 vues
Hollow Process Injection - Reversing and Investigating Malware Evasive Tactics par securityxploded
Hollow Process Injection - Reversing and Investigating Malware Evasive TacticsHollow Process Injection - Reversing and Investigating Malware Evasive Tactics
Hollow Process Injection - Reversing and Investigating Malware Evasive Tactics
securityxploded3.7K vues
Malicious Client Detection Using Machine Learning par securityxploded
Malicious Client Detection Using Machine LearningMalicious Client Detection Using Machine Learning
Malicious Client Detection Using Machine Learning
securityxploded803 vues
Understanding CryptoLocker (Ransomware) with a Case Study par securityxploded
Understanding CryptoLocker (Ransomware) with a Case StudyUnderstanding CryptoLocker (Ransomware) with a Case Study
Understanding CryptoLocker (Ransomware) with a Case Study
securityxploded2.1K vues
Linux Malware Analysis using Limon Sandbox par securityxploded
Linux Malware Analysis using Limon SandboxLinux Malware Analysis using Limon Sandbox
Linux Malware Analysis using Limon Sandbox
securityxploded3.4K vues
Defeating public exploit protections (EMET v5.2 and more) par securityxploded
Defeating public exploit protections (EMET v5.2 and more)Defeating public exploit protections (EMET v5.2 and more)
Defeating public exploit protections (EMET v5.2 and more)
securityxploded1.2K vues
Hunting Ghost RAT Using Memory Forensics par securityxploded
Hunting Ghost RAT Using Memory ForensicsHunting Ghost RAT Using Memory Forensics
Hunting Ghost RAT Using Memory Forensics
securityxploded2.5K vues
Malicious Url Detection Using Machine Learning par securityxploded
Malicious Url Detection Using Machine LearningMalicious Url Detection Using Machine Learning
Malicious Url Detection Using Machine Learning
securityxploded7.5K vues
Reversing and Decrypting the Communications of APT Malware (Etumbot) par securityxploded
Reversing and Decrypting the Communications of APT Malware (Etumbot)Reversing and Decrypting the Communications of APT Malware (Etumbot)
Reversing and Decrypting the Communications of APT Malware (Etumbot)
securityxploded2.7K vues
Watering Hole Attacks Case Study and Analysis_SecurityXploded_Meet_june14 par securityxploded
Watering Hole Attacks Case Study and Analysis_SecurityXploded_Meet_june14Watering Hole Attacks Case Study and Analysis_SecurityXploded_Meet_june14
Watering Hole Attacks Case Study and Analysis_SecurityXploded_Meet_june14
securityxploded1.8K vues

Dernier

Empathic Computing: Delivering the Potential of the Metaverse par
Empathic Computing: Delivering  the Potential of the MetaverseEmpathic Computing: Delivering  the Potential of the Metaverse
Empathic Computing: Delivering the Potential of the MetaverseMark Billinghurst
470 vues80 diapositives
Java Platform Approach 1.0 - Picnic Meetup par
Java Platform Approach 1.0 - Picnic MeetupJava Platform Approach 1.0 - Picnic Meetup
Java Platform Approach 1.0 - Picnic MeetupRick Ossendrijver
25 vues39 diapositives
Future of Learning - Yap Aye Wee.pdf par
Future of Learning - Yap Aye Wee.pdfFuture of Learning - Yap Aye Wee.pdf
Future of Learning - Yap Aye Wee.pdfNUS-ISS
41 vues11 diapositives
Business Analyst Series 2023 - Week 3 Session 5 par
Business Analyst Series 2023 -  Week 3 Session 5Business Analyst Series 2023 -  Week 3 Session 5
Business Analyst Series 2023 - Week 3 Session 5DianaGray10
209 vues20 diapositives
Perth MeetUp November 2023 par
Perth MeetUp November 2023 Perth MeetUp November 2023
Perth MeetUp November 2023 Michael Price
15 vues44 diapositives
PharoJS - Zürich Smalltalk Group Meetup November 2023 par
PharoJS - Zürich Smalltalk Group Meetup November 2023PharoJS - Zürich Smalltalk Group Meetup November 2023
PharoJS - Zürich Smalltalk Group Meetup November 2023Noury Bouraqadi
120 vues17 diapositives

Dernier(20)

Empathic Computing: Delivering the Potential of the Metaverse par Mark Billinghurst
Empathic Computing: Delivering  the Potential of the MetaverseEmpathic Computing: Delivering  the Potential of the Metaverse
Empathic Computing: Delivering the Potential of the Metaverse
Future of Learning - Yap Aye Wee.pdf par NUS-ISS
Future of Learning - Yap Aye Wee.pdfFuture of Learning - Yap Aye Wee.pdf
Future of Learning - Yap Aye Wee.pdf
NUS-ISS41 vues
Business Analyst Series 2023 - Week 3 Session 5 par DianaGray10
Business Analyst Series 2023 -  Week 3 Session 5Business Analyst Series 2023 -  Week 3 Session 5
Business Analyst Series 2023 - Week 3 Session 5
DianaGray10209 vues
PharoJS - Zürich Smalltalk Group Meetup November 2023 par Noury Bouraqadi
PharoJS - Zürich Smalltalk Group Meetup November 2023PharoJS - Zürich Smalltalk Group Meetup November 2023
PharoJS - Zürich Smalltalk Group Meetup November 2023
Noury Bouraqadi120 vues
How the World's Leading Independent Automotive Distributor is Reinventing Its... par NUS-ISS
How the World's Leading Independent Automotive Distributor is Reinventing Its...How the World's Leading Independent Automotive Distributor is Reinventing Its...
How the World's Leading Independent Automotive Distributor is Reinventing Its...
NUS-ISS15 vues
Future of Learning - Khoong Chan Meng par NUS-ISS
Future of Learning - Khoong Chan MengFuture of Learning - Khoong Chan Meng
Future of Learning - Khoong Chan Meng
NUS-ISS33 vues
STPI OctaNE CoE Brochure.pdf par madhurjyapb
STPI OctaNE CoE Brochure.pdfSTPI OctaNE CoE Brochure.pdf
STPI OctaNE CoE Brochure.pdf
madhurjyapb12 vues
.conf Go 2023 - How KPN drives Customer Satisfaction on IPTV par Splunk
.conf Go 2023 - How KPN drives Customer Satisfaction on IPTV.conf Go 2023 - How KPN drives Customer Satisfaction on IPTV
.conf Go 2023 - How KPN drives Customer Satisfaction on IPTV
Splunk88 vues
Voice Logger - Telephony Integration Solution at Aegis par Nirmal Sharma
Voice Logger - Telephony Integration Solution at AegisVoice Logger - Telephony Integration Solution at Aegis
Voice Logger - Telephony Integration Solution at Aegis
Nirmal Sharma17 vues
Understanding GenAI/LLM and What is Google Offering - Felix Goh par NUS-ISS
Understanding GenAI/LLM and What is Google Offering - Felix GohUnderstanding GenAI/LLM and What is Google Offering - Felix Goh
Understanding GenAI/LLM and What is Google Offering - Felix Goh
NUS-ISS41 vues
Digital Product-Centric Enterprise and Enterprise Architecture - Tan Eng Tsze par NUS-ISS
Digital Product-Centric Enterprise and Enterprise Architecture - Tan Eng TszeDigital Product-Centric Enterprise and Enterprise Architecture - Tan Eng Tsze
Digital Product-Centric Enterprise and Enterprise Architecture - Tan Eng Tsze
NUS-ISS19 vues
The Importance of Cybersecurity for Digital Transformation par NUS-ISS
The Importance of Cybersecurity for Digital TransformationThe Importance of Cybersecurity for Digital Transformation
The Importance of Cybersecurity for Digital Transformation
NUS-ISS27 vues
.conf Go 2023 - Data analysis as a routine par Splunk
.conf Go 2023 - Data analysis as a routine.conf Go 2023 - Data analysis as a routine
.conf Go 2023 - Data analysis as a routine
Splunk93 vues
DALI Basics Course 2023 par Ivory Egg
DALI Basics Course  2023DALI Basics Course  2023
DALI Basics Course 2023
Ivory Egg14 vues
AI: mind, matter, meaning, metaphors, being, becoming, life values par Twain Liu 刘秋艳
AI: mind, matter, meaning, metaphors, being, becoming, life valuesAI: mind, matter, meaning, metaphors, being, becoming, life values
AI: mind, matter, meaning, metaphors, being, becoming, life values
Beyond the Hype: What Generative AI Means for the Future of Work - Damien Cum... par NUS-ISS
Beyond the Hype: What Generative AI Means for the Future of Work - Damien Cum...Beyond the Hype: What Generative AI Means for the Future of Work - Damien Cum...
Beyond the Hype: What Generative AI Means for the Future of Work - Damien Cum...
NUS-ISS34 vues

Reversing & Malware Analysis Training Part 9 - Advanced Malware Analysis

  • 2. Disclaimer The Content, Demonstration, Source Code and Programs presented here is "AS IS" without any warranty or conditions of any kind. Also the views/ideas/knowledge expressed here are solely of the trainer’s only and nothing to do with the company or the organization in which the trainer is currently working. However in no circumstances neither the trainer nor SecurityXploded is responsible for any damage or loss caused due to use or misuse of the information presented here. www.SecurityXploded.com
  • 3. Acknowledgement  Special thanks to null & Garage4Hackers community for their extended support and cooperation.  Thanks to all the trainers who have devoted their precious time and countless hours to make it happen. www.SecurityXploded.com
  • 4. Reversing & Malware Analysis Training This presentation is part of our Reverse Engineering & Malware Analysis Training program. Currently it is delivered only during our local meet for FREE of cost. For complete details of this course, visit our Security Training page. www.SecurityXploded.com
  • 5. Who am I Monnappa  m0nna  Member of SecurityXploded (SX)  Info Security Investigator @ Cisco  Reverse Engineering, Malware Analysis, Memory Forensics  Email: monnappa22@gmail.com, twitter@monnappa22 www.SecurityXploded.com
  • 6. Contents  Why Malware Analysis?  Types of Malware Analysis  Static Analysis  Dynamic Analysis  Memory Analysis  Demo www.SecurityXploded.com
  • 7. Why Malware Analysis? To determine:  the nature and purpose of the malware  Interaction with the file system  Interaction with the registry  Interaction with the network  Identifiable patterns www.SecurityXploded.com
  • 8. Types of Malware Analysis?  Static Analysis - Analyzing without executing the malware  Dynamic Analysis - Analyzing by executing the malware  Memory Analysis - Analyzing the RAM for artifacts www.SecurityXploded.com
  • 9. Static Analysis Steps:  Determine the file type tools: file utility on unix and windows (need to install)  Determine the cryptographic hash tools: md5sum utility on unix and windows (part of unix utils for windows)  Strings search tools: strings utility on unix and windows , Bintext  File obfuscation (packers, cryptors and binders) detection tools: PEiD, RDG packer detector  Submission to online antivirus scanners (virustotal, jotti, cymru) tools: browser and public api of Virustotal  Determine the Imports tools: PEview, Dependency Walker  Disassembly tools: IDA Pro, Ollydbg www.SecurityXploded.com
  • 10. Dynamic Analysis Involves executing the malware in a controlled environment to determine its behavior Steps:  Determine the File system activity tools: process monitor, capturebat  Determine the Process activity tools: process explorer, process monitor, capturebat  Determine the Network activity tools: wireshark  Detemine the Registry activity tools: regmon, process monitor, capturebat www.SecurityXploded.com
  • 11. Memory Analysis Finding and extracting artifacts from computer’s RAM  Determine the process activity  Determine the network connections  Determine hidden artifacts  Detemine the Registry activity Tools: Volatility (Advanced Memory Forensic Framework) Advantages:  helps in rootkit detection  helps in unpacking www.SecurityXploded.com
  • 14. Step 1 – Taking the cryptographic hash The below screenshot shows the md5sum of the sample www.SecurityXploded.com
  • 15. Step 2 – Determine the packer PEiD was unable determine the packer www.SecurityXploded.com
  • 16. Step 3 – Determine the Imports Dependency Walker shows the DLLs and API used by malicious executable www.SecurityXploded.com
  • 17. Step 4 – VirusTotal Submission VirusTotal results show that this sample is a zeus bot (zbot) www.SecurityXploded.com
  • 19. Step 1 – Running the monitoring tools Before executing the malware, montioring tools are run to capture the activities of the malware www.SecurityXploded.com
  • 20. Step 2 – Simulate Internet Services Internet services are simulated to give fake response to malware and also to prevent malware from talking out on the internet www.SecurityXploded.com
  • 21. Step 3 – Executing the malware (edd94.exe) www.SecurityXploded.com
  • 22. Step 4 – process, registry and filesystem activity The below results show the process, registry and fileystem activity after executing the malware (edd94.exe), also explorer.exe performs lot of activity indicating code injection into explorer.exe www.SecurityXploded.com
  • 23. Step 5 – Malware drops a file (raruo.exe) The below results show the malware dropping a file raruo.exe and creating a process. www.SecurityXploded.com
  • 24. Step 6 – Explorer.exe setting value in registry The below output shows explorer.exe setting a value under run registry subkey as a persistence mechanism to survive the reboot. www.SecurityXploded.com
  • 25. Step 7 – DNS query to malicious domain Packet capture shows dns query to users9.nofeehost.com and also response shows that the “A” record for the domain is pointed to the machine 192.168.1.2, which is simulating internet services. www.SecurityXploded.com
  • 26. Step 8 – http connection to malicious domain The below output shows zeus bot trying to download configuration file from C&C and also the fake response given by the inetsim server. www.SecurityXploded.com
  • 27. Step 9– ZeuS Tracker result ZueS Tracker shows that the domain was a ZeuS C&C server www.SecurityXploded.com
  • 29. Step 1 – Taking the memory image Suspending the VM creates a memory image of the infected machine, the below screenshot show the memory image (infected.vmem) of the infected machine www.SecurityXploded.com
  • 30. Step 2 – Process listing from memory image Volatility’s pslist module shows the two process edd94.exe and raruo.exe www.SecurityXploded.com
  • 31. Step 3 – Network connections from memory image Volatility’s connscan module shows pid 1748 making http connection, this pid 1748 is associated with explorer.exe www.SecurityXploded.com
  • 32. Step 4 – Embedded exe and api hooks in explorer.exe The below output shows the inline api hooks and embedded executable in explorer.exe, and also the embedded executable is dumped into a directory (dump) by malfind plugin www.SecurityXploded.com
  • 33. Step 5 – Virustotal submission of dumped exe The virustotal submission confirms the dumped exe to be component of ZeuS bot www.SecurityXploded.com
  • 34. Step 6 – Printing the registry key Malware creates registry key to survive the reboot www.SecurityXploded.com
  • 35. Step 12 – Finding the malicious exe on infected machine Finding malicious sample (raruo.exe) from infected host and virustotal submission confirms ZeuS(zbot) infection www.SecurityXploded.com
  • 38. Disassembly Example The below screenshot shows the disassembly of http bot, making connection to the C&C www.SecurityXploded.com
  • 39. Disassembly Example (contd) The bot send the http request to the C&C www.SecurityXploded.com
  • 40. Disassembly Example (contd) The bot retireves data from C&C www.SecurityXploded.com
  • 41. Disassembly Example (contd) The below sceenshot shows some of the supported commands of this http bot www.SecurityXploded.com
  • 42. Disassembly Example (contd) Bot runs the below code if the received command is “Execute”, it creates a process and sends the process id to the C&C server www.SecurityXploded.com
  • 43. Reference  Complete Reference Guide for Reversing & Malware Analysis Training www.SecurityXploded.com