SlideShare a Scribd company logo
How to convince a malware
to avoid us?
Csaba Fitzl
whoami
blue teamer
security researcher, blogger
certification monkey
husband, father
hiker
What is this talk about?
How to convince a malware to avoid us
Agenda
part #1 - What malware authors afraid of and how
they detect it?
part #2 - Real world examples
part #3 - My POC tools for vaccination
What malware authors are
afraid of?
security researchers
sandboxes
virtual machines
hardened machines
=> malware hates being analyzed
also tries to avoid certain targets
How they detect it?
Debuggers
IsDebuggerPresent
PEB!IsDebugged
PEB!NtGlobalFlags
OutputDebugString
timing (RDTSC)
self debug
INT3
actual windows names
etc…
Virtual machines
look for artifacts in:
registry
file system
processes
MAC address…
VMware I/O ports
red pill
Sandboxes
screen resolution (low)
installed software (limited)
number of cores
memory
desktop
etc…
ref: Zoltán Balázs –
Sandbox detection for the
masses: leak, abuse, test
Antivirus
registry
file system
antivirus product registered
Real world samples
How to convince a malware to avoid us
048fc07fb94a74990d2d2b8e92c099f3f986
af185c32d74c857b07f7fcce7f8e
Word dropper
sandbox detection
Public Sub IuIxpP()
If DKTxHE Then Error 101
If qrNjY Then Error 102
(…)
Public Function DKTxHE() As Boolean
DKTxHE = RecentFiles.Count < 3
End Function
demo time
c279165952de10a5f715df706da26b2d5a57cc
50e49dcab74fc91dba2ce1408b
generic trojan
checks for plenty of
analysis SW
checks for anti malware
demo time
ca7cb56b9a254748e983929953df32f219905f
96486d91390e8d5d641dc9916d
Teslacrypt
antivirus detection
demo time
Today’s research
What is in the focus?
mainly about hiding analysis tools
e.g.: zer0fox
ease researcher’s job
verify environment - pafish
How about vaccination?
let’s try to emulate ‘unhealthy’ environment
less researched
malware might avoid us
Previous research
White Paper
Towards an Understanding of Anti-virtualization and Anti-debugging Behavior
in Modern Malware, 2008
Rapid7
Vaccinating systems against VM-aware malware, 2013
Gal Bitensky
Demo Vaccination The Anti-Honeypot Approach, 2016
various tools against specific malware
My PoC tools
How to convince a malware to avoid us
tool #1: fakevm
kernel driver w/ SSDT hooking
up to Win7 x86
can emulate VBOX / VMWARE files & registry keys
easy to extend w/ other keys, files
demo time
tool #2:
FakeDebuggerWindows
simple Windows app
creates a window, and doesn’t show it
no conflict with other windows
demo time
tool #3:
mutex-grabber
monitor malwr.com for mutexes
dynamically add them to the system
allows whitelisting
saving / loading files
demo time
Challenges
software compatibility
does normal sw care about VM / debuggers?
system resources
low level vaccination?
needs to be done in clever way (e.g.: machine can’t be
VBOX and VMware at the same time)
Any production grade
solution?
HitMan Pro Alert
uses vaccination
other interesting protections
as well
tested w/ Pafish
demo time
Minerva Labs
sw dedicated for
vaccination
claims to stop many
malware these days
Conclusion
interesting area
it is effective against malware
should be more commonly researched
could have two long term effects
malware stop caring about VM, etc.. -> this method
won’t be effective, but analysis might be easier
everything stays -> we can protect against malware
?
twitter: @theevilbit
tools:
https://github.com/theevilbit/vaccination

More Related Content

PDF
20+ ways to bypass your mac os privacy mechanisms
PDF
Getting root with benign app store apps
PDF
Exploiting Directory Permissions on macOS
PDF
Mitigating Exploits Using Apple's Endpoint Security
PDF
Exploiting XPC in AntiVirus
PDF
GateKeeper - bypass or not bypass?
PDF
20+ Ways To Bypass Your Macos Privacy Mechanisms
PPTX
The Dirty Little Secrets They Didn’t Teach You In Pentesting Class
20+ ways to bypass your mac os privacy mechanisms
Getting root with benign app store apps
Exploiting Directory Permissions on macOS
Mitigating Exploits Using Apple's Endpoint Security
Exploiting XPC in AntiVirus
GateKeeper - bypass or not bypass?
20+ Ways To Bypass Your Macos Privacy Mechanisms
The Dirty Little Secrets They Didn’t Teach You In Pentesting Class

What's hot (20)

PDF
Windows attacks - AT is the new black
PDF
Windows Attacks AT is the new black
PDF
DevOops & How I hacked you DevopsDays DC June 2015
PPTX
DevOOPS: Attacks and Defenses for DevOps Toolchains
PDF
Attacker Ghost Stories (CarolinaCon / Area41 / RVASec)
PPTX
Devoops: DoJ Annual Cybersecurity Training Symposium Edition 2015
PDF
SANS DFIR Prague: PowerShell & WMI
PDF
Jump into Squeak - Integrate Squeak projects with Docker & Github
PDF
Appsec DC - wXf -2010
PDF
Writing malware while the blue team is staring at you
PDF
Attacking Oracle with the Metasploit Framework
PPTX
How to discover 1352 Wordpress plugin 0days in one hour (not really)
PPTX
TakeDownCon Rocket City: WebShells by Adrian Crenshaw
PDF
Big Bang Theory: The Evolution of Pentesting High Security Enviroments IT Def...
PPTX
Defcon - Veil-Pillage
PPT
RIT 2009 Intellectual Pwnership
PDF
Getting root with benign app store apps vsecurityfest
PPTX
Wielding a cortana
PPTX
Everyone Matters In Infosec 2014
PPTX
Dirty Little Secrets They Didn't Teach You In Pentest Class v2
Windows attacks - AT is the new black
Windows Attacks AT is the new black
DevOops & How I hacked you DevopsDays DC June 2015
DevOOPS: Attacks and Defenses for DevOps Toolchains
Attacker Ghost Stories (CarolinaCon / Area41 / RVASec)
Devoops: DoJ Annual Cybersecurity Training Symposium Edition 2015
SANS DFIR Prague: PowerShell & WMI
Jump into Squeak - Integrate Squeak projects with Docker & Github
Appsec DC - wXf -2010
Writing malware while the blue team is staring at you
Attacking Oracle with the Metasploit Framework
How to discover 1352 Wordpress plugin 0days in one hour (not really)
TakeDownCon Rocket City: WebShells by Adrian Crenshaw
Big Bang Theory: The Evolution of Pentesting High Security Enviroments IT Def...
Defcon - Veil-Pillage
RIT 2009 Intellectual Pwnership
Getting root with benign app store apps vsecurityfest
Wielding a cortana
Everyone Matters In Infosec 2014
Dirty Little Secrets They Didn't Teach You In Pentest Class v2
Ad

Similar to How to convince a malware to avoid us (20)

PDF
Understand study
PPTX
(Training) Malware - To the Realm of Malicious Code
PDF
Bypassing Antivirus for effective security
PDF
Malware Evasion Techniques
PDF
Breaking Antivirus Software - Joxean Koret (SYSCAN 2014)
PDF
Breaking av software
PDF
Breaking av software
PDF
Breaking Antivirus Software
PDF
Identifying, Monitoring, and Reporting Malware
PPTX
Two-For-One Talk: Malware Analysis for Everyone
PDF
SANS Digital Forensics and Incident Response Poster 2012
PPT
Rootkit Hunting & Compromise Detection
DOC
Web virus activity
PDF
Ceh v8 labs module 07 viruses and worms
PDF
Exploits Attack on Windows Vulnerabilities
PPT
Antiviruse.ppt
PDF
HackInBo2k16 - Threat Intelligence and Malware Analysis
DOCX
Lab-10 Malware Creation and Denial of Service (DoS) In t.docx
PPTX
Intro to Malware Analysis
PPSX
Computer viruses
Understand study
(Training) Malware - To the Realm of Malicious Code
Bypassing Antivirus for effective security
Malware Evasion Techniques
Breaking Antivirus Software - Joxean Koret (SYSCAN 2014)
Breaking av software
Breaking av software
Breaking Antivirus Software
Identifying, Monitoring, and Reporting Malware
Two-For-One Talk: Malware Analysis for Everyone
SANS Digital Forensics and Incident Response Poster 2012
Rootkit Hunting & Compromise Detection
Web virus activity
Ceh v8 labs module 07 viruses and worms
Exploits Attack on Windows Vulnerabilities
Antiviruse.ppt
HackInBo2k16 - Threat Intelligence and Malware Analysis
Lab-10 Malware Creation and Denial of Service (DoS) In t.docx
Intro to Malware Analysis
Computer viruses
Ad

More from Csaba Fitzl (7)

PDF
The Final Chapter - Unlimited Ways to Bypass Your macOS Privacy Mechanisms
PDF
Launch and Environment Constraints Overview
PDF
macOS Vulnerabilities Hiding in Plain Sight
PDF
SecurityFest-22-Fitzl-beyond.pdf
PDF
Csaba fitzl - Mount(ain) of Bugs
PDF
Exploit generation and javascript analysis automation with WinDBG lu
PDF
Exploit generation automation with WinDBG (Hacktivity 2017)
The Final Chapter - Unlimited Ways to Bypass Your macOS Privacy Mechanisms
Launch and Environment Constraints Overview
macOS Vulnerabilities Hiding in Plain Sight
SecurityFest-22-Fitzl-beyond.pdf
Csaba fitzl - Mount(ain) of Bugs
Exploit generation and javascript analysis automation with WinDBG lu
Exploit generation automation with WinDBG (Hacktivity 2017)

Recently uploaded (20)

PPTX
INTERNATIONAL LABOUR ORAGNISATION PPT ON SOCIAL SCIENCE
PPTX
Role and Responsibilities of Bangladesh Coast Guard Base, Mongla Challenges
PPTX
Hydrogel Based delivery Cancer Treatment
PPTX
Anesthesia and it's stage with mnemonic and images
PPTX
Non-Verbal-Communication .mh.pdf_110245_compressed.pptx
PPTX
worship songs, in any order, compilation
PPTX
Intro to ISO 9001 2015.pptx wareness raising
PPTX
Human Mind & its character Characteristics
PPTX
ART-APP-REPORT-FINctrwxsg f fuy L-na.pptx
PDF
Nykaa-Strategy-Case-Fixing-Retention-UX-and-D2C-Engagement (1).pdf
PPTX
Emphasizing It's Not The End 08 06 2025.pptx
PPTX
An Unlikely Response 08 10 2025.pptx
PDF
Presentation1 [Autosaved].pdf diagnosiss
PPTX
The Effect of Human Resource Management Practice on Organizational Performanc...
PPTX
Impressionism_PostImpressionism_Presentation.pptx
PPTX
BIOLOGY TISSUE PPT CLASS 9 PROJECT PUBLIC
PPTX
Learning-Plan-5-Policies-and-Practices.pptx
PDF
Instagram's Product Secrets Unveiled with this PPT
PPTX
Primary and secondary sources, and history
DOCX
"Project Management: Ultimate Guide to Tools, Techniques, and Strategies (2025)"
INTERNATIONAL LABOUR ORAGNISATION PPT ON SOCIAL SCIENCE
Role and Responsibilities of Bangladesh Coast Guard Base, Mongla Challenges
Hydrogel Based delivery Cancer Treatment
Anesthesia and it's stage with mnemonic and images
Non-Verbal-Communication .mh.pdf_110245_compressed.pptx
worship songs, in any order, compilation
Intro to ISO 9001 2015.pptx wareness raising
Human Mind & its character Characteristics
ART-APP-REPORT-FINctrwxsg f fuy L-na.pptx
Nykaa-Strategy-Case-Fixing-Retention-UX-and-D2C-Engagement (1).pdf
Emphasizing It's Not The End 08 06 2025.pptx
An Unlikely Response 08 10 2025.pptx
Presentation1 [Autosaved].pdf diagnosiss
The Effect of Human Resource Management Practice on Organizational Performanc...
Impressionism_PostImpressionism_Presentation.pptx
BIOLOGY TISSUE PPT CLASS 9 PROJECT PUBLIC
Learning-Plan-5-Policies-and-Practices.pptx
Instagram's Product Secrets Unveiled with this PPT
Primary and secondary sources, and history
"Project Management: Ultimate Guide to Tools, Techniques, and Strategies (2025)"

How to convince a malware to avoid us