SlideShare une entreprise Scribd logo
1  sur  40
AntiRE en Masse Investigating Ferrie’s Documented AntiUnpacking Tricks in the World’s Worst Mal-Families Kurt Baumgartner, VP Behavioral Threat Research PCTools ThreatFire
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Ferrie’s Virus Bulletin Papers – Anti-unpacking Tricks Series I-VII ,[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Ferrie’s Virus Bulletin Series  Part One Anti-dump Anti-debug Anti-emulation Part Two Implemented anti-debug Part Three Syser Anti-debug Part Four “ Speculative” Generic Anti-debug Part Five “ Speculative” Anti-Ollydbg Tricks Part Six “ Speculative” Anti-Ollydbg-plugin Tricks Part Seven Mixed bag of “Speculative” Tricks
Ferrie’s Papers - Packer Content Mentions publicly available legitimate and grey (19) Yoda's Crypter, Armadillo, Shrinker, VMprotect, ExeCrypter, Themida, SafeDisc, HyperUnpackMe2,Yoda's Protector, PC Guard, Invius, ASProtect, tELock, PECompact, MEW, PE-Crypt32, TryGames, ASPack, RLPack Mentions underground packers (3) Tibs, MSLRH, NsAnti
Spectrum of “Packers” - Legitimate, Grey, Malicious Legitimate executable packers compress PE file contents, adding an unpacking stub used to decompress contents at runtime.  Open source gold standard - UPX “ UPX is a free, portable, extendable, high-performance executable packer for  several different executable formats.  It achieves an excellent compression ratio and offers very fast decompression.  Your executables suffer no memory overhead or other drawbacks for most of the  formats supported, because of in-place decompression.” http://upx.sourceforge.net/#abstract Themida “ Advanced Windows software protection system, developed for software developers who wish to protect their applications against advanced reverse engineering and software cracking.” http://www.themida.com/
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Unpacking Tools and Public Resources Ollydbg, Titan, Windbg, the Ether project. Syser, SoftICE, ImpRec, LordPE, PETools, OllyDump by Gigapede, FKMA’s PE Dumper, AdvancedOlly, StrongOD, InvisbleOD, Syser, IDA Pro OpenRce.org, Woodmann RCE Library and forums, Google + Google Translate
Mebroot/Sinowal Overview Packed malcode components Anti-unpacking tricks
Mebroot Overview ,[object Object],[object Object],[object Object]
[object Object],[object Object],Mebroot Overview (cont.)
Mebroot Packed Components ,[object Object],[object Object],[object Object]
Mebroot - Anti-unpacking tricks ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Mebroot - Anti-unpacking tricks (cont.) ,[object Object],[object Object],[object Object],[object Object],[object Object]
Mebroot - Anti-unpacking tricks (cont.) – Modified  XTEA Decryption Loop dec(z,(((y shl 4) xor (y shr 5)) + y) xor (sum+key[(sum shr 11) and 3])); 0x243f6a88 is ripped here  (proposed key  for Schneier’s  Blowfish algorithm) Anti-crude crypto detection?
Waledac Overview Packed malcode components Anti-unpacking tricks
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Waledac (Bredolab?) Downloader Overview ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Waledac Downloader - Overview (cont.) ,[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],Waledac Downloader - Anti-unpacking tricks
[object Object],[object Object],[object Object],[object Object],Waledac Downloader AntiRE Tricks –  Anti-Debug/Anti-Emulation
Visual/mathematical representation of the EP anti-debug/anti-emulation Waledac Anti-emulation/anti-debug KiSystemService predictable error condition
Anti-debug/Anti-emulation (cont.) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Simple ROL “0x0e9” loop surrounded by garbage code Waledac Downloader Simple Decoding Loops
Waledac Downloader Decoding/Decryption Schemes Modified TEA decryption loop following simple rol loop
Waldec Spambot Custom Crypto ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],for (i=0; i<0x669; i++) { x = y[i]; y[i] = (((x >> 4) << 0x1a) + 0x0b ^ 0x0d9); }
Waledac Spambot Anti-Unpacking Tricks ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Waledac Spambot Anti-Unpacking Tricks (cont.) Entry point stack manipulation for fake system thread re-entry followed by  time-lock puzzle (i.e. onlyyou.exe)
Entry point stack manipulation + system thread re-entry followed by  time-lock puzzle (i.e. onlyyou.exe), the two look like this… Waledac Spambot Anti-Unpacking Tricks (cont.) mov  ecx, dword ptr ds:[ebx+8]  ; stack  [0006FFC0]=0006FFF0 add  ecx, 8 mov  ebx, 00460013 ; several bytes after ep mov  dword ptr ds:[ecx], ebx ; stack location for ret from kernel32 Jmp  esi ; kernel32.77E7EB56 _BaseProcessStart -> ret -> 00460013
Taterf… Packed.NsAnti/Frethog/Trojan.Lineage/Gampass Overview Packed malcode components Anti-unpacking tricks Flowchart
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Taterf/Packed.NsAnti/Gampass Packed Components ,[object Object],[object Object]
Taterf/Packed.NsAnti/Gampass Anti-unpacking Tricks ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Koobface Overview Packed malcode components Anti-unpacking tricks
Koobface Overview ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Koobface Packed Malcode Components ,[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],Zbot Packed Malcode Components
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

Contenu connexe

Tendances

How to drive a malware analyst crazy
How to drive a malware analyst crazyHow to drive a malware analyst crazy
How to drive a malware analyst crazyMichael Boman
 
6 buffer overflows
6   buffer overflows6   buffer overflows
6 buffer overflowsdrewz lin
 
Using Python3 to Build a Cloud Computing Service for my Superboard II
Using Python3 to Build a Cloud Computing Service for my Superboard IIUsing Python3 to Build a Cloud Computing Service for my Superboard II
Using Python3 to Build a Cloud Computing Service for my Superboard IIDavid Beazley (Dabeaz LLC)
 
Reversing & malware analysis training part 2 introduction to windows internals
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
 
07 - Bypassing ASLR, or why X^W matters
07 - Bypassing ASLR, or why X^W matters07 - Bypassing ASLR, or why X^W matters
07 - Bypassing ASLR, or why X^W mattersAlexandre Moneger
 
Formbook - In-depth malware analysis (Botconf 2018)
Formbook - In-depth malware analysis (Botconf 2018)Formbook - In-depth malware analysis (Botconf 2018)
Formbook - In-depth malware analysis (Botconf 2018)Rémi Jullian
 
Bh Usa 07 Butler And Kendall
Bh Usa 07 Butler And KendallBh Usa 07 Butler And Kendall
Bh Usa 07 Butler And KendallKarlFrank99
 
Virus Bulletin 2015: Exposing Gatekeeper
Virus Bulletin 2015: Exposing GatekeeperVirus Bulletin 2015: Exposing Gatekeeper
Virus Bulletin 2015: Exposing GatekeeperSynack
 
Csw2016 gong pwn_a_nexus_device_with_a_single_vulnerability
Csw2016 gong pwn_a_nexus_device_with_a_single_vulnerabilityCsw2016 gong pwn_a_nexus_device_with_a_single_vulnerability
Csw2016 gong pwn_a_nexus_device_with_a_single_vulnerabilityCanSecWest
 
Reversing & malware analysis training part 3 windows pe file format basics
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 basicssecurityxploded
 
Advanced Malware Analysis Training Session 5 - Reversing Automation
Advanced Malware Analysis Training Session 5 - Reversing AutomationAdvanced Malware Analysis Training Session 5 - Reversing Automation
Advanced Malware Analysis Training Session 5 - Reversing Automationsecurityxploded
 
Проведение криминалистической экспертизы и анализа руткит-программ на примере...
Проведение криминалистической экспертизы и анализа руткит-программ на примере...Проведение криминалистической экспертизы и анализа руткит-программ на примере...
Проведение криминалистической экспертизы и анализа руткит-программ на примере...Alex Matrosov
 
Malware Analysis on a Shoestring Budget
Malware Analysis on a Shoestring BudgetMalware Analysis on a Shoestring Budget
Malware Analysis on a Shoestring BudgetMichael Boman
 
Advanced System Security and Digital Forensics
Advanced System Security and Digital ForensicsAdvanced System Security and Digital Forensics
Advanced System Security and Digital ForensicsDr. Ramchandra Mangrulkar
 
Information Theft: Wireless Router Shareport for Phun and profit - Hero Suhar...
Information Theft: Wireless Router Shareport for Phun and profit - Hero Suhar...Information Theft: Wireless Router Shareport for Phun and profit - Hero Suhar...
Information Theft: Wireless Router Shareport for Phun and profit - Hero Suhar...idsecconf
 
A New Era of SSRF - Exploiting URL Parser in Trending Programming Languages! ...
A New Era of SSRF - Exploiting URL Parser in Trending Programming Languages! ...A New Era of SSRF - Exploiting URL Parser in Trending Programming Languages! ...
A New Era of SSRF - Exploiting URL Parser in Trending Programming Languages! ...CODE BLUE
 

Tendances (20)

How to drive a malware analyst crazy
How to drive a malware analyst crazyHow to drive a malware analyst crazy
How to drive a malware analyst crazy
 
6 buffer overflows
6   buffer overflows6   buffer overflows
6 buffer overflows
 
Using Python3 to Build a Cloud Computing Service for my Superboard II
Using Python3 to Build a Cloud Computing Service for my Superboard IIUsing Python3 to Build a Cloud Computing Service for my Superboard II
Using Python3 to Build a Cloud Computing Service for my Superboard II
 
Reversing & malware analysis training part 2 introduction to windows internals
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
 
07 - Bypassing ASLR, or why X^W matters
07 - Bypassing ASLR, or why X^W matters07 - Bypassing ASLR, or why X^W matters
07 - Bypassing ASLR, or why X^W matters
 
Formbook - In-depth malware analysis (Botconf 2018)
Formbook - In-depth malware analysis (Botconf 2018)Formbook - In-depth malware analysis (Botconf 2018)
Formbook - In-depth malware analysis (Botconf 2018)
 
The walking 0xDEAD
The walking 0xDEADThe walking 0xDEAD
The walking 0xDEAD
 
AFPS_2011
AFPS_2011AFPS_2011
AFPS_2011
 
Bh Usa 07 Butler And Kendall
Bh Usa 07 Butler And KendallBh Usa 07 Butler And Kendall
Bh Usa 07 Butler And Kendall
 
Virus Bulletin 2015: Exposing Gatekeeper
Virus Bulletin 2015: Exposing GatekeeperVirus Bulletin 2015: Exposing Gatekeeper
Virus Bulletin 2015: Exposing Gatekeeper
 
Valgrind
ValgrindValgrind
Valgrind
 
Csw2016 gong pwn_a_nexus_device_with_a_single_vulnerability
Csw2016 gong pwn_a_nexus_device_with_a_single_vulnerabilityCsw2016 gong pwn_a_nexus_device_with_a_single_vulnerability
Csw2016 gong pwn_a_nexus_device_with_a_single_vulnerability
 
Reversing & malware analysis training part 3 windows pe file format basics
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
 
Advanced Malware Analysis Training Session 5 - Reversing Automation
Advanced Malware Analysis Training Session 5 - Reversing AutomationAdvanced Malware Analysis Training Session 5 - Reversing Automation
Advanced Malware Analysis Training Session 5 - Reversing Automation
 
Проведение криминалистической экспертизы и анализа руткит-программ на примере...
Проведение криминалистической экспертизы и анализа руткит-программ на примере...Проведение криминалистической экспертизы и анализа руткит-программ на примере...
Проведение криминалистической экспертизы и анализа руткит-программ на примере...
 
Malware Analysis on a Shoestring Budget
Malware Analysis on a Shoestring BudgetMalware Analysis on a Shoestring Budget
Malware Analysis on a Shoestring Budget
 
Advanced System Security and Digital Forensics
Advanced System Security and Digital ForensicsAdvanced System Security and Digital Forensics
Advanced System Security and Digital Forensics
 
Inside Winnyp
Inside WinnypInside Winnyp
Inside Winnyp
 
Information Theft: Wireless Router Shareport for Phun and profit - Hero Suhar...
Information Theft: Wireless Router Shareport for Phun and profit - Hero Suhar...Information Theft: Wireless Router Shareport for Phun and profit - Hero Suhar...
Information Theft: Wireless Router Shareport for Phun and profit - Hero Suhar...
 
A New Era of SSRF - Exploiting URL Parser in Trending Programming Languages! ...
A New Era of SSRF - Exploiting URL Parser in Trending Programming Languages! ...A New Era of SSRF - Exploiting URL Parser in Trending Programming Languages! ...
A New Era of SSRF - Exploiting URL Parser in Trending Programming Languages! ...
 

En vedette

Not-so Passive Sonar - Red October
Not-so Passive Sonar - Red OctoberNot-so Passive Sonar - Red October
Not-so Passive Sonar - Red OctoberKurt Baumgartner
 
מצגת קורס אלקטרוניקה
מצגת קורס אלקטרוניקהמצגת קורס אלקטרוניקה
מצגת קורס אלקטרוניקהgoodvibes
 
שיוף סריגים
שיוף סריגיםשיוף סריגים
שיוף סריגיםgoodvibes
 
Learning With New Media
Learning With New MediaLearning With New Media
Learning With New Mediaguesteaa1f
 
Billington 2013 IceFog APT
Billington 2013 IceFog APTBillington 2013 IceFog APT
Billington 2013 IceFog APTKurt Baumgartner
 

En vedette (8)

Recent Rogueware
Recent RoguewareRecent Rogueware
Recent Rogueware
 
Not-so Passive Sonar - Red October
Not-so Passive Sonar - Red OctoberNot-so Passive Sonar - Red October
Not-so Passive Sonar - Red October
 
מצגת קורס אלקטרוניקה
מצגת קורס אלקטרוניקהמצגת קורס אלקטרוניקה
מצגת קורס אלקטרוניקה
 
שיוף סריגים
שיוף סריגיםשיוף סריגים
שיוף סריגים
 
Learning With New Media
Learning With New MediaLearning With New Media
Learning With New Media
 
WiFi Insecurity2013
WiFi Insecurity2013WiFi Insecurity2013
WiFi Insecurity2013
 
Billington 2013 IceFog APT
Billington 2013 IceFog APTBillington 2013 IceFog APT
Billington 2013 IceFog APT
 
Jamcracker
JamcrackerJamcracker
Jamcracker
 

Similaire à AntiRE en Masse

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
Advanced Malware Analysis Training Session 2 - Botnet Analysis Part 1 securityxploded
 
2600 av evasion_deuce
2600 av evasion_deuce2600 av evasion_deuce
2600 av evasion_deuceDb Cooper
 
Security Challenges of Antivirus Engines, Products and Systems
Security Challenges of Antivirus Engines, Products and SystemsSecurity Challenges of Antivirus Engines, Products and Systems
Security Challenges of Antivirus Engines, Products and SystemsAntiy Labs
 
Elixir Into Production
Elixir Into ProductionElixir Into Production
Elixir Into ProductionJamie Winsor
 
VB2013 - Security Research and Development Framework
VB2013 - Security Research and Development FrameworkVB2013 - Security Research and Development Framework
VB2013 - Security Research and Development FrameworkAmr Thabet
 
Advanced malwareanalysis training session2 botnet analysis part1
Advanced malwareanalysis training session2 botnet analysis part1Advanced malwareanalysis training session2 botnet analysis part1
Advanced malwareanalysis training session2 botnet analysis part1Cysinfo Cyber Security Community
 
BSides IR in Heterogeneous Environment
BSides IR in Heterogeneous EnvironmentBSides IR in Heterogeneous Environment
BSides IR in Heterogeneous EnvironmentStefano Maccaglia
 
Inside the Matrix,How to Build Transparent Sandbox for Malware Analysis
Inside the Matrix,How to Build Transparent Sandbox for Malware AnalysisInside the Matrix,How to Build Transparent Sandbox for Malware Analysis
Inside the Matrix,How to Build Transparent Sandbox for Malware AnalysisChong-Kuan Chen
 
Penetrating Windows 8 with syringe utility
Penetrating Windows 8 with syringe utilityPenetrating Windows 8 with syringe utility
Penetrating Windows 8 with syringe utilityIOSR Journals
 
Cansecwest - The Death of AV defence in depth
Cansecwest - The Death of AV defence in depthCansecwest - The Death of AV defence in depth
Cansecwest - The Death of AV defence in depthThierry Zoller
 
44CON London 2015 - How to drive a malware analyst crazy
44CON London 2015 - How to drive a malware analyst crazy44CON London 2015 - How to drive a malware analyst crazy
44CON London 2015 - How to drive a malware analyst crazy44CON
 
Debugging With Id
Debugging With IdDebugging With Id
Debugging With Idguest215c4e
 
DEF CON 27 - workshop ANTHONY ROSE - introduction to amsi bypasses and sandbo...
DEF CON 27 - workshop ANTHONY ROSE - introduction to amsi bypasses and sandbo...DEF CON 27 - workshop ANTHONY ROSE - introduction to amsi bypasses and sandbo...
DEF CON 27 - workshop ANTHONY ROSE - introduction to amsi bypasses and sandbo...Felipe Prado
 
The Hacking Games - Operation System Vulnerabilities Meetup 29112022
The Hacking Games - Operation System Vulnerabilities Meetup 29112022The Hacking Games - Operation System Vulnerabilities Meetup 29112022
The Hacking Games - Operation System Vulnerabilities Meetup 29112022lior mazor
 
MODERN TECHNIQUES TO DEOBFUSCATE AND UEFI/BIOS MALWARE -- HITB 2019 AMSTERDAM
MODERN TECHNIQUES TO DEOBFUSCATE AND UEFI/BIOS MALWARE -- HITB 2019 AMSTERDAMMODERN TECHNIQUES TO DEOBFUSCATE AND UEFI/BIOS MALWARE -- HITB 2019 AMSTERDAM
MODERN TECHNIQUES TO DEOBFUSCATE AND UEFI/BIOS MALWARE -- HITB 2019 AMSTERDAMAlexandre Borges
 
DEFCON 21: EDS: Exploitation Detection System WP
DEFCON 21: EDS: Exploitation Detection System WPDEFCON 21: EDS: Exploitation Detection System WP
DEFCON 21: EDS: Exploitation Detection System WPAmr Thabet
 
Reducing attack surface on ICS with Windows native solutions
Reducing attack surface on ICS with Windows native solutionsReducing attack surface on ICS with Windows native solutions
Reducing attack surface on ICS with Windows native solutionsJan Seidl
 
Breaking Antivirus Software - Joxean Koret (SYSCAN 2014)
Breaking Antivirus Software - Joxean Koret (SYSCAN 2014)Breaking Antivirus Software - Joxean Koret (SYSCAN 2014)
Breaking Antivirus Software - Joxean Koret (SYSCAN 2014)Akmal Hisyam
 
Breaking av software
Breaking av softwareBreaking av software
Breaking av softwareJoxean Koret
 

Similaire à AntiRE en Masse (20)

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
Advanced Malware Analysis Training Session 2 - Botnet Analysis Part 1
 
2600 av evasion_deuce
2600 av evasion_deuce2600 av evasion_deuce
2600 av evasion_deuce
 
Security Challenges of Antivirus Engines, Products and Systems
Security Challenges of Antivirus Engines, Products and SystemsSecurity Challenges of Antivirus Engines, Products and Systems
Security Challenges of Antivirus Engines, Products and Systems
 
Elixir Into Production
Elixir Into ProductionElixir Into Production
Elixir Into Production
 
VB2013 - Security Research and Development Framework
VB2013 - Security Research and Development FrameworkVB2013 - Security Research and Development Framework
VB2013 - Security Research and Development Framework
 
Advanced malwareanalysis training session2 botnet analysis part1
Advanced malwareanalysis training session2 botnet analysis part1Advanced malwareanalysis training session2 botnet analysis part1
Advanced malwareanalysis training session2 botnet analysis part1
 
BSides IR in Heterogeneous Environment
BSides IR in Heterogeneous EnvironmentBSides IR in Heterogeneous Environment
BSides IR in Heterogeneous Environment
 
Inside the Matrix,How to Build Transparent Sandbox for Malware Analysis
Inside the Matrix,How to Build Transparent Sandbox for Malware AnalysisInside the Matrix,How to Build Transparent Sandbox for Malware Analysis
Inside the Matrix,How to Build Transparent Sandbox for Malware Analysis
 
Penetrating Windows 8 with syringe utility
Penetrating Windows 8 with syringe utilityPenetrating Windows 8 with syringe utility
Penetrating Windows 8 with syringe utility
 
The Veil-Framework
The Veil-FrameworkThe Veil-Framework
The Veil-Framework
 
Cansecwest - The Death of AV defence in depth
Cansecwest - The Death of AV defence in depthCansecwest - The Death of AV defence in depth
Cansecwest - The Death of AV defence in depth
 
44CON London 2015 - How to drive a malware analyst crazy
44CON London 2015 - How to drive a malware analyst crazy44CON London 2015 - How to drive a malware analyst crazy
44CON London 2015 - How to drive a malware analyst crazy
 
Debugging With Id
Debugging With IdDebugging With Id
Debugging With Id
 
DEF CON 27 - workshop ANTHONY ROSE - introduction to amsi bypasses and sandbo...
DEF CON 27 - workshop ANTHONY ROSE - introduction to amsi bypasses and sandbo...DEF CON 27 - workshop ANTHONY ROSE - introduction to amsi bypasses and sandbo...
DEF CON 27 - workshop ANTHONY ROSE - introduction to amsi bypasses and sandbo...
 
The Hacking Games - Operation System Vulnerabilities Meetup 29112022
The Hacking Games - Operation System Vulnerabilities Meetup 29112022The Hacking Games - Operation System Vulnerabilities Meetup 29112022
The Hacking Games - Operation System Vulnerabilities Meetup 29112022
 
MODERN TECHNIQUES TO DEOBFUSCATE AND UEFI/BIOS MALWARE -- HITB 2019 AMSTERDAM
MODERN TECHNIQUES TO DEOBFUSCATE AND UEFI/BIOS MALWARE -- HITB 2019 AMSTERDAMMODERN TECHNIQUES TO DEOBFUSCATE AND UEFI/BIOS MALWARE -- HITB 2019 AMSTERDAM
MODERN TECHNIQUES TO DEOBFUSCATE AND UEFI/BIOS MALWARE -- HITB 2019 AMSTERDAM
 
DEFCON 21: EDS: Exploitation Detection System WP
DEFCON 21: EDS: Exploitation Detection System WPDEFCON 21: EDS: Exploitation Detection System WP
DEFCON 21: EDS: Exploitation Detection System WP
 
Reducing attack surface on ICS with Windows native solutions
Reducing attack surface on ICS with Windows native solutionsReducing attack surface on ICS with Windows native solutions
Reducing attack surface on ICS with Windows native solutions
 
Breaking Antivirus Software - Joxean Koret (SYSCAN 2014)
Breaking Antivirus Software - Joxean Koret (SYSCAN 2014)Breaking Antivirus Software - Joxean Koret (SYSCAN 2014)
Breaking Antivirus Software - Joxean Koret (SYSCAN 2014)
 
Breaking av software
Breaking av softwareBreaking av software
Breaking av software
 

AntiRE en Masse

  • 1. AntiRE en Masse Investigating Ferrie’s Documented AntiUnpacking Tricks in the World’s Worst Mal-Families Kurt Baumgartner, VP Behavioral Threat Research PCTools ThreatFire
  • 2.
  • 3.
  • 4.
  • 5. Ferrie’s Virus Bulletin Series Part One Anti-dump Anti-debug Anti-emulation Part Two Implemented anti-debug Part Three Syser Anti-debug Part Four “ Speculative” Generic Anti-debug Part Five “ Speculative” Anti-Ollydbg Tricks Part Six “ Speculative” Anti-Ollydbg-plugin Tricks Part Seven Mixed bag of “Speculative” Tricks
  • 6. Ferrie’s Papers - Packer Content Mentions publicly available legitimate and grey (19) Yoda's Crypter, Armadillo, Shrinker, VMprotect, ExeCrypter, Themida, SafeDisc, HyperUnpackMe2,Yoda's Protector, PC Guard, Invius, ASProtect, tELock, PECompact, MEW, PE-Crypt32, TryGames, ASPack, RLPack Mentions underground packers (3) Tibs, MSLRH, NsAnti
  • 7. Spectrum of “Packers” - Legitimate, Grey, Malicious Legitimate executable packers compress PE file contents, adding an unpacking stub used to decompress contents at runtime. Open source gold standard - UPX “ UPX is a free, portable, extendable, high-performance executable packer for several different executable formats. It achieves an excellent compression ratio and offers very fast decompression. Your executables suffer no memory overhead or other drawbacks for most of the formats supported, because of in-place decompression.” http://upx.sourceforge.net/#abstract Themida “ Advanced Windows software protection system, developed for software developers who wish to protect their applications against advanced reverse engineering and software cracking.” http://www.themida.com/
  • 8.
  • 9. Unpacking Tools and Public Resources Ollydbg, Titan, Windbg, the Ether project. Syser, SoftICE, ImpRec, LordPE, PETools, OllyDump by Gigapede, FKMA’s PE Dumper, AdvancedOlly, StrongOD, InvisbleOD, Syser, IDA Pro OpenRce.org, Woodmann RCE Library and forums, Google + Google Translate
  • 10. Mebroot/Sinowal Overview Packed malcode components Anti-unpacking tricks
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16. Mebroot - Anti-unpacking tricks (cont.) – Modified XTEA Decryption Loop dec(z,(((y shl 4) xor (y shr 5)) + y) xor (sum+key[(sum shr 11) and 3])); 0x243f6a88 is ripped here (proposed key for Schneier’s Blowfish algorithm) Anti-crude crypto detection?
  • 17. Waledac Overview Packed malcode components Anti-unpacking tricks
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23. Visual/mathematical representation of the EP anti-debug/anti-emulation Waledac Anti-emulation/anti-debug KiSystemService predictable error condition
  • 24.
  • 25. Simple ROL “0x0e9” loop surrounded by garbage code Waledac Downloader Simple Decoding Loops
  • 26. Waledac Downloader Decoding/Decryption Schemes Modified TEA decryption loop following simple rol loop
  • 27.
  • 28.
  • 29. Waledac Spambot Anti-Unpacking Tricks (cont.) Entry point stack manipulation for fake system thread re-entry followed by time-lock puzzle (i.e. onlyyou.exe)
  • 30. Entry point stack manipulation + system thread re-entry followed by time-lock puzzle (i.e. onlyyou.exe), the two look like this… Waledac Spambot Anti-Unpacking Tricks (cont.) mov ecx, dword ptr ds:[ebx+8] ; stack [0006FFC0]=0006FFF0 add ecx, 8 mov ebx, 00460013 ; several bytes after ep mov dword ptr ds:[ecx], ebx ; stack location for ret from kernel32 Jmp esi ; kernel32.77E7EB56 _BaseProcessStart -> ret -> 00460013
  • 31. Taterf… Packed.NsAnti/Frethog/Trojan.Lineage/Gampass Overview Packed malcode components Anti-unpacking tricks Flowchart
  • 32.
  • 33.
  • 34.
  • 35. Koobface Overview Packed malcode components Anti-unpacking tricks
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.