SlideShare a Scribd company logo
Static Malware Analysis SOP
This documentistargeted at Tier I and Tier II MalwareAnalysis. This
will not cover dynamicmalwareanalysiswhich requiresa live system
which needsto be actively compromised for analysis.
This documentwillcover how to analyzethe following: Suspected
malicious PDFfiles, suspected maliciousOffice documents, and
suspiciousexecutables.
The tools required are:
Olevba.py – For Office DocumentAnalysis
Pyew.py – for PDF, Officedocument, and maliciousexecutable analysis
UPX – for unpackingexecutables
xorBruteForcer.py – for further deobfuscation of maliciousexecutables
and their payloads
ghex – for lookingat a raw binary
strings – for pullingtext outof a file
NOTE: Wehave also been given access to the Norse Odin and Norse
DarkVision accounts which will help us analyzeURLsand malware in
the future.
Part I: MaliciousPDF Analysis
Of course, our first stop is usually VirusTotal to see if anyoneelse has
seen this before…in this case infected.pdf isa “heap spray” attack.
Figure1 - VirusTotal positivehits for infected.pdf
Wetry openingthe infected.pdf withpyew, and wesee already there is
some Javascriptin there
USAGE: pyew.py infected.pdf
Figure2 - pyew.py shows someJavascript insidethe pdf
Runningthe command “pdfview” from insideof pyew lets usactually
read the JavaScript….in this case it is suspiciousand appear to be hiding
some sort of shellcode…since wesee that VirusTotal has a hit on it and
also there is some Javascriptembedded in the PDF, we can declare this
malware. The Tier III personnelwillhave the tools and expertise to de-
obfuscate this JavaScript and figureout what it is doing.
Figure3 - pdfview shows us the Javascript embedded inside.
So here wesee someobfuscated JavaScriptwhich is difficultto decode
unlessyou are very familiar with JavaScript, and we see a very strangely
named function and avariable named “large_hahacode”.
Part II: Malicious Office Documents
Analysisof these is pretty simple, but what is visible in regular .xls
documentsis notvisible in the new .xlsm formatfor Office which is
based on .xml.
Wewill look at 2 Excel sheets with the same basic exploit inside, but one
is an .xls documentand the other is a .xlsm document. The basic exploit
here is a VBScript macro that opensnotepad.exeand pings127.0.0.1.
Running“strings” against the malware.xlsfile gives uspretty obvious
results as we see the referenceclearly to notepad.exeand 127.0.0.1
Figure4 - strings against a .xls file
Butrunningstringsagainst the malware.xlsm file does not.
Figure5 - strings against the new OfficeXML-based format
A morereliable tool is olevba.py. Itsvery easy to use and quickly
extracts VBA Macros. As you can see below, it indicates what the macro
is, and even gives you a list of IOCs you can use to detect how
widespread this is on your network
Figure6 - olevba output against a .xls Officedocument
Here we can see the same items that “strings” found for usin the
original .xls.
Figure 7 - olevba.py against an xlsm document
Here we can see the referencesto vbaProject.bin which seems to be
what is hidingthe pertinentinformation from “strings” in .xlsm
documents.
From the olevba.py report, we can determine that there are some bad VBA Macros
in these documents and can pass along for Tier III Malware Analysis with our
findings.
Part III: Malicious Executable Analysis
This is by far the most difficult and time consuming. Obfuscation and evasion
techniques such as packing and XOR’ing of contents makes these difficult to find out
what is going on or to generate a list of IOCs (Indicators of compromise).
We will be using a piece of malware known as “Frethog”, a keylogger and password
stealing program.
When we open it with “pyew.py”, we don’t see much, and when we run the pyew
command “packer”, we can see why. Its packed using the UPX algorithm in an
attempt to evade analysis.
Figure8 - pyew "packer" analysis of an .exe file
Running “strings” against a packed file gives us very little, so we have to unpack this
file.
Figure9 - strings runagainst a UPX packed file
To “unpack” the file we use the UPX program
USAGE: upx –d –k fethog.000 (-d -= decompress –k = “keep a copy”) which will give
us an unpacked file named “fethog.000” to analyze and the original is renamed
fethog.00~
Figure10 - using UPX tp unpack a malicious executable
Now we can look at it with pyew again and check the packing…now we see it is
seeing it as a VisualBasic file
Figure11 - pyew analysis of the unpacked malware
And we can see “strings” gives us better results now
Figure12 - strings analysis against the unpacked file
BONUS ROUND
However, this file is also using XOR to hide its payload, so we are going to use
xorBruteForcer.py to try every possible key against its contents to see if anything
works….once you see some entries with cleartext, then you know you have found
the right key…in this case, the key was 0x20. So we use xorBruteforcer.py again
with the key specified, and we get some more valuable information.
USAGE: xorBruteForcer.py fethog.000 - this will try all key combinations and we
will look at this output to determine what the key was by looking at cleartext.
USAGE: xorBruteForcer.py –k 20 fethog.000 -k indicates the key we want to use
Figure13 - output of xorBruteForcer against the unpacked malware
Now we see references to www.yswm.net, www.ahwm.net, and couple other URLs,
but now we have some additional IOC’s (Indicators of Compromise) that we can
check to see if any other computers on our network have been trying to get to these
sites. …they are reaching out trying to pull down file.txt.
Further analysis of this de-XOR’d file will yield even more IOC’s that we can proved
to SOC Analysts to investigate.

More Related Content

What's hot

Reverse Engineering Malware
Reverse Engineering MalwareReverse Engineering Malware
Reverse Engineering Malware
securityxploded
 
Registry Forensics
Registry ForensicsRegistry Forensics
Registry Forensics
Somesh Sawhney
 
File accessing modes in c
File accessing modes in cFile accessing modes in c
File accessing modes in c
manojmanoj218596
 
Appreciative Advanced Blind SQLI Attack
Appreciative Advanced Blind SQLI AttackAppreciative Advanced Blind SQLI Attack
Appreciative Advanced Blind SQLI Attack
ijtsrd
 
Windows Registry Analysis
Windows Registry AnalysisWindows Registry Analysis
Windows Registry Analysis
Himanshu0734
 
The Power of FOCA 3
The Power of FOCA 3The Power of FOCA 3
The Power of FOCA 3
Chema Alonso
 
Working with files and directories in Linux
Working with files and directories in LinuxWorking with files and directories in Linux
Working with files and directories in Linux
Zeeshan Iqbal
 
MindMap - Forensics Windows Registry Cheat Sheet
MindMap - Forensics Windows Registry Cheat SheetMindMap - Forensics Windows Registry Cheat Sheet
MindMap - Forensics Windows Registry Cheat Sheet
Juan F. Padilla
 
Mining Product Synonyms - Slides
Mining Product Synonyms - SlidesMining Product Synonyms - Slides
Mining Product Synonyms - Slides
Ankush Jain
 

What's hot (9)

Reverse Engineering Malware
Reverse Engineering MalwareReverse Engineering Malware
Reverse Engineering Malware
 
Registry Forensics
Registry ForensicsRegistry Forensics
Registry Forensics
 
File accessing modes in c
File accessing modes in cFile accessing modes in c
File accessing modes in c
 
Appreciative Advanced Blind SQLI Attack
Appreciative Advanced Blind SQLI AttackAppreciative Advanced Blind SQLI Attack
Appreciative Advanced Blind SQLI Attack
 
Windows Registry Analysis
Windows Registry AnalysisWindows Registry Analysis
Windows Registry Analysis
 
The Power of FOCA 3
The Power of FOCA 3The Power of FOCA 3
The Power of FOCA 3
 
Working with files and directories in Linux
Working with files and directories in LinuxWorking with files and directories in Linux
Working with files and directories in Linux
 
MindMap - Forensics Windows Registry Cheat Sheet
MindMap - Forensics Windows Registry Cheat SheetMindMap - Forensics Windows Registry Cheat Sheet
MindMap - Forensics Windows Registry Cheat Sheet
 
Mining Product Synonyms - Slides
Mining Product Synonyms - SlidesMining Product Synonyms - Slides
Mining Product Synonyms - Slides
 

Similar to Static malware analysis sop

Rootkit case
Rootkit caseRootkit case
Rootkit case
Artem I. Baranov
 
CHAPTER 2 BASIC ANALYSIS.ppt
CHAPTER 2 BASIC ANALYSIS.pptCHAPTER 2 BASIC ANALYSIS.ppt
CHAPTER 2 BASIC ANALYSIS.ppt
ManjuAppukuttan2
 
CHAPTER 2 BASIC ANALYSIS.pdf
CHAPTER 2 BASIC ANALYSIS.pdfCHAPTER 2 BASIC ANALYSIS.pdf
CHAPTER 2 BASIC ANALYSIS.pdf
ManjuAppukuttan2
 
Cutting out Malware
Cutting out MalwareCutting out Malware
Cutting out Malware
luigi capuzzello
 
2600 av evasion_deuce
2600 av evasion_deuce2600 av evasion_deuce
2600 av evasion_deuceDb Cooper
 
Cyber Defense Forensic Analyst - Real World Hands-on Examples
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
Sandeep Kumar Seeram
 
Crisis. advanced malware
Crisis. advanced malwareCrisis. advanced malware
Crisis. advanced malwareYury Chemerkin
 
Asert threat-intelligence-brief-2014-07-illuminating-etumbot-apt
Asert threat-intelligence-brief-2014-07-illuminating-etumbot-aptAsert threat-intelligence-brief-2014-07-illuminating-etumbot-apt
Asert threat-intelligence-brief-2014-07-illuminating-etumbot-apt
Juan Bosoms
 
Vulners: Google for hackers
Vulners: Google for hackersVulners: Google for hackers
Vulners: Google for hackers
Kirill Ermakov
 
Flask jwt authentication tutorial
Flask jwt authentication tutorialFlask jwt authentication tutorial
Flask jwt authentication tutorial
Katy Slemon
 
Bypassing anti virus scanners
Bypassing anti virus scannersBypassing anti virus scanners
Bypassing anti virus scannersmartacax
 
Ransomware for fun and non-profit
Ransomware for fun and non-profitRansomware for fun and non-profit
Ransomware for fun and non-profit
Youness Zougar
 
PE Packers Used in Malicious Software - Part 1
PE Packers Used in Malicious Software - Part 1PE Packers Used in Malicious Software - Part 1
PE Packers Used in Malicious Software - Part 1
amiable_indian
 
Call Graph Agnostic Malware Indexing (EuskalHack 2017)
Call Graph Agnostic Malware Indexing (EuskalHack 2017)Call Graph Agnostic Malware Indexing (EuskalHack 2017)
Call Graph Agnostic Malware Indexing (EuskalHack 2017)
Joxean Koret
 
How to bypass email gateways using common payloads... Bsides Manchester 2017
How to bypass email gateways using common payloads... Bsides Manchester 2017How to bypass email gateways using common payloads... Bsides Manchester 2017
How to bypass email gateways using common payloads... Bsides Manchester 2017
Neil Lines
 
Strategies to design FUD malware
Strategies to design FUD malwareStrategies to design FUD malware
Strategies to design FUD malware
Pedro Tavares
 
Python in the land of serverless
Python in the land of serverlessPython in the land of serverless
Python in the land of serverless
David Przybilla
 
Iranian Non-malware Fileless Attacks targeting aerospace and telecom
Iranian Non-malware Fileless Attacks targeting aerospace and telecomIranian Non-malware Fileless Attacks targeting aerospace and telecom
Iranian Non-malware Fileless Attacks targeting aerospace and telecom
AhmedA79
 

Similar to Static malware analysis sop (20)

Rootkit case
Rootkit caseRootkit case
Rootkit case
 
CHAPTER 2 BASIC ANALYSIS.ppt
CHAPTER 2 BASIC ANALYSIS.pptCHAPTER 2 BASIC ANALYSIS.ppt
CHAPTER 2 BASIC ANALYSIS.ppt
 
CHAPTER 2 BASIC ANALYSIS.pdf
CHAPTER 2 BASIC ANALYSIS.pdfCHAPTER 2 BASIC ANALYSIS.pdf
CHAPTER 2 BASIC ANALYSIS.pdf
 
Cutting out Malware
Cutting out MalwareCutting out Malware
Cutting out Malware
 
2600 av evasion_deuce
2600 av evasion_deuce2600 av evasion_deuce
2600 av evasion_deuce
 
Cyber Defense Forensic Analyst - Real World Hands-on Examples
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
 
Crisis. advanced malware
Crisis. advanced malwareCrisis. advanced malware
Crisis. advanced malware
 
Asert threat-intelligence-brief-2014-07-illuminating-etumbot-apt
Asert threat-intelligence-brief-2014-07-illuminating-etumbot-aptAsert threat-intelligence-brief-2014-07-illuminating-etumbot-apt
Asert threat-intelligence-brief-2014-07-illuminating-etumbot-apt
 
Vulners: Google for hackers
Vulners: Google for hackersVulners: Google for hackers
Vulners: Google for hackers
 
Flask jwt authentication tutorial
Flask jwt authentication tutorialFlask jwt authentication tutorial
Flask jwt authentication tutorial
 
Bypassing anti virus scanners
Bypassing anti virus scannersBypassing anti virus scanners
Bypassing anti virus scanners
 
Ransomware for fun and non-profit
Ransomware for fun and non-profitRansomware for fun and non-profit
Ransomware for fun and non-profit
 
PE Packers Used in Malicious Software - Part 1
PE Packers Used in Malicious Software - Part 1PE Packers Used in Malicious Software - Part 1
PE Packers Used in Malicious Software - Part 1
 
Call Graph Agnostic Malware Indexing (EuskalHack 2017)
Call Graph Agnostic Malware Indexing (EuskalHack 2017)Call Graph Agnostic Malware Indexing (EuskalHack 2017)
Call Graph Agnostic Malware Indexing (EuskalHack 2017)
 
How to bypass email gateways using common payloads... Bsides Manchester 2017
How to bypass email gateways using common payloads... Bsides Manchester 2017How to bypass email gateways using common payloads... Bsides Manchester 2017
How to bypass email gateways using common payloads... Bsides Manchester 2017
 
Booklet
BookletBooklet
Booklet
 
Fin fisher's spy kit
Fin fisher's spy kitFin fisher's spy kit
Fin fisher's spy kit
 
Strategies to design FUD malware
Strategies to design FUD malwareStrategies to design FUD malware
Strategies to design FUD malware
 
Python in the land of serverless
Python in the land of serverlessPython in the land of serverless
Python in the land of serverless
 
Iranian Non-malware Fileless Attacks targeting aerospace and telecom
Iranian Non-malware Fileless Attacks targeting aerospace and telecomIranian Non-malware Fileless Attacks targeting aerospace and telecom
Iranian Non-malware Fileless Attacks targeting aerospace and telecom
 

Recently uploaded

FP Growth Algorithm and its Applications
FP Growth Algorithm and its ApplicationsFP Growth Algorithm and its Applications
FP Growth Algorithm and its Applications
MaleehaSheikh2
 
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
Timothy Spann
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
ewymefz
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP
 
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
John Andrews
 
一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单
ewymefz
 
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
NABLAS株式会社
 
Opendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptxOpendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptx
Opendatabay
 
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
axoqas
 
Empowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptxEmpowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptx
benishzehra469
 
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
nscud
 
Adjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTESAdjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTES
Subhajit Sahu
 
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
ewymefz
 
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
Timothy Spann
 
一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单
ocavb
 
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
74nqk8xf
 
Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)
TravisMalana
 
一比一原版(QU毕业证)皇后大学毕业证成绩单
一比一原版(QU毕业证)皇后大学毕业证成绩单一比一原版(QU毕业证)皇后大学毕业证成绩单
一比一原版(QU毕业证)皇后大学毕业证成绩单
enxupq
 
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
ewymefz
 
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdfSample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Linda486226
 

Recently uploaded (20)

FP Growth Algorithm and its Applications
FP Growth Algorithm and its ApplicationsFP Growth Algorithm and its Applications
FP Growth Algorithm and its Applications
 
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
 
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
 
一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单
 
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
 
Opendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptxOpendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptx
 
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
 
Empowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptxEmpowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptx
 
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
 
Adjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTESAdjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTES
 
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
 
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
 
一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单
 
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
 
Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)
 
一比一原版(QU毕业证)皇后大学毕业证成绩单
一比一原版(QU毕业证)皇后大学毕业证成绩单一比一原版(QU毕业证)皇后大学毕业证成绩单
一比一原版(QU毕业证)皇后大学毕业证成绩单
 
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
 
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdfSample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
 

Static malware analysis sop

  • 1. Static Malware Analysis SOP This documentistargeted at Tier I and Tier II MalwareAnalysis. This will not cover dynamicmalwareanalysiswhich requiresa live system which needsto be actively compromised for analysis. This documentwillcover how to analyzethe following: Suspected malicious PDFfiles, suspected maliciousOffice documents, and suspiciousexecutables. The tools required are: Olevba.py – For Office DocumentAnalysis Pyew.py – for PDF, Officedocument, and maliciousexecutable analysis UPX – for unpackingexecutables xorBruteForcer.py – for further deobfuscation of maliciousexecutables and their payloads ghex – for lookingat a raw binary strings – for pullingtext outof a file NOTE: Wehave also been given access to the Norse Odin and Norse DarkVision accounts which will help us analyzeURLsand malware in the future. Part I: MaliciousPDF Analysis Of course, our first stop is usually VirusTotal to see if anyoneelse has seen this before…in this case infected.pdf isa “heap spray” attack.
  • 2. Figure1 - VirusTotal positivehits for infected.pdf Wetry openingthe infected.pdf withpyew, and wesee already there is some Javascriptin there USAGE: pyew.py infected.pdf
  • 3. Figure2 - pyew.py shows someJavascript insidethe pdf Runningthe command “pdfview” from insideof pyew lets usactually read the JavaScript….in this case it is suspiciousand appear to be hiding some sort of shellcode…since wesee that VirusTotal has a hit on it and also there is some Javascriptembedded in the PDF, we can declare this malware. The Tier III personnelwillhave the tools and expertise to de- obfuscate this JavaScript and figureout what it is doing.
  • 4. Figure3 - pdfview shows us the Javascript embedded inside. So here wesee someobfuscated JavaScriptwhich is difficultto decode unlessyou are very familiar with JavaScript, and we see a very strangely named function and avariable named “large_hahacode”. Part II: Malicious Office Documents Analysisof these is pretty simple, but what is visible in regular .xls documentsis notvisible in the new .xlsm formatfor Office which is based on .xml. Wewill look at 2 Excel sheets with the same basic exploit inside, but one is an .xls documentand the other is a .xlsm document. The basic exploit here is a VBScript macro that opensnotepad.exeand pings127.0.0.1. Running“strings” against the malware.xlsfile gives uspretty obvious results as we see the referenceclearly to notepad.exeand 127.0.0.1
  • 5. Figure4 - strings against a .xls file Butrunningstringsagainst the malware.xlsm file does not. Figure5 - strings against the new OfficeXML-based format A morereliable tool is olevba.py. Itsvery easy to use and quickly extracts VBA Macros. As you can see below, it indicates what the macro is, and even gives you a list of IOCs you can use to detect how widespread this is on your network
  • 6. Figure6 - olevba output against a .xls Officedocument Here we can see the same items that “strings” found for usin the original .xls.
  • 7. Figure 7 - olevba.py against an xlsm document Here we can see the referencesto vbaProject.bin which seems to be what is hidingthe pertinentinformation from “strings” in .xlsm documents. From the olevba.py report, we can determine that there are some bad VBA Macros in these documents and can pass along for Tier III Malware Analysis with our findings. Part III: Malicious Executable Analysis This is by far the most difficult and time consuming. Obfuscation and evasion techniques such as packing and XOR’ing of contents makes these difficult to find out what is going on or to generate a list of IOCs (Indicators of compromise). We will be using a piece of malware known as “Frethog”, a keylogger and password stealing program. When we open it with “pyew.py”, we don’t see much, and when we run the pyew command “packer”, we can see why. Its packed using the UPX algorithm in an attempt to evade analysis.
  • 8. Figure8 - pyew "packer" analysis of an .exe file Running “strings” against a packed file gives us very little, so we have to unpack this file. Figure9 - strings runagainst a UPX packed file To “unpack” the file we use the UPX program USAGE: upx –d –k fethog.000 (-d -= decompress –k = “keep a copy”) which will give us an unpacked file named “fethog.000” to analyze and the original is renamed fethog.00~
  • 9. Figure10 - using UPX tp unpack a malicious executable Now we can look at it with pyew again and check the packing…now we see it is seeing it as a VisualBasic file Figure11 - pyew analysis of the unpacked malware And we can see “strings” gives us better results now
  • 10. Figure12 - strings analysis against the unpacked file BONUS ROUND However, this file is also using XOR to hide its payload, so we are going to use xorBruteForcer.py to try every possible key against its contents to see if anything works….once you see some entries with cleartext, then you know you have found the right key…in this case, the key was 0x20. So we use xorBruteforcer.py again with the key specified, and we get some more valuable information. USAGE: xorBruteForcer.py fethog.000 - this will try all key combinations and we will look at this output to determine what the key was by looking at cleartext. USAGE: xorBruteForcer.py –k 20 fethog.000 -k indicates the key we want to use
  • 11. Figure13 - output of xorBruteForcer against the unpacked malware Now we see references to www.yswm.net, www.ahwm.net, and couple other URLs, but now we have some additional IOC’s (Indicators of Compromise) that we can check to see if any other computers on our network have been trying to get to these sites. …they are reaching out trying to pull down file.txt. Further analysis of this de-XOR’d file will yield even more IOC’s that we can proved to SOC Analysts to investigate.