SlideShare a Scribd company logo
1 of 67
Download to read offline
A Battle Against the
Industry - Beating
Antivirus for Meterpreter
and More
@ChrisTruncer
Whoami
■ A systems administrator turnedredteamer
■ Florida State Seminole
■ Open Source Software Developer
■ Veil-Framework
■ EyeWitness
Thanks Robin :)
■ Egress-Assess
■ Just-Metadata
Why am I here today?
■Share some laughs at Antivirus :)
■Give a background on stagers
■Showcase a Veil-Evasion signature bypass
■Anyone can do this..
■Talk about developing your own code
■Case studies on previously developed code
Stagers
What are stagers?
■Can be referred to as “stage 1”
■Might be msfvenom, Veil-Evasion, etc. output
■Goal is typically to inject shellcode into memory
■Shellcode usually downloads and executes a
reflectively injectable dll
■…but it can also do anything you want if you
write it :)
What are stagers?
■Stagers are really used as loaders for your real
malware
■They’re designed to be expendable and tiny
■Don’t give away your engineered malware by
dropping it to disk
■Load everything in memory
What are stagers?
■Any language that has the ability to access
windows functions can be used to write a stager!
■Pretty cool, and allows us to expand out from
traditional “Windows Langauges”
■Interacting with Windows functions can seem
daunting, but isn’t all that bad
■4 or 5 function calls
Function Calls
Stagers in a Nutshell
■ Allocate memory to store the shellcode being
injected, and apply proper memory permissions
■ Copy the shellcode into the allocated memory
■ Create a thread to run the shellcode copied into
the process’s memory
■ Wait for the thread to complete running before
exiting the program
Windows API Calls
■Most stagers utilize VirtualAlloc to allocate
memory
■This talk shows an alternate way to allocate
memory that isn’t heavily utilized
■It might be a better way to fly under the radar
HeapCreate
■Creates a private heap object that can be used by
the process creating the heap
■Specify the memory protections
■Requires the size of the heap that will need to be
allocated
■Shellcode length
■Max size of allocated memory
■I do twice the shellcode length
HeapAlloc
■ Allocates memory from the previously created
heap object
■ Receives a handle to the previously allocated
heap object
■ Specify the total amount of space that you are
allocating for shellcode
RtlMoveMemory
■Places the shellcode you are injecting into the
allocated heap space
■Needs a pointer to where data (shellcode) will be
copied to (heapalloc output)
■Needs a pointer to the data (shellcode)
■Needs the length of the shellcode being injected
CreateThread
■This function creates a new thread within the
current process to execute the data (shellcode)
that was injected
■Requires a pointer to the data (shellcode) that will
run in the new thread
■Schedule the thread to execute immediately
WaitForSingleObject
■This function is like a blocking call to prevent the
program from exiting immediately
■Requires a handle to the thread that was created
by the CreateThread function
■Requires a value (-1) to specify that the program
should wait to exit until the thread exists
Stagers in a Nutshell (Repeated)
■ Allocate memory to store the shellcode being
injected, and apply proper memory permissions
■ Copy the shellcode into the allocated memory
■ Create a thread to run the shellcode copied into
the process’s memory
■ Wait for the thread to complete running before
exiting the program
Ordinal Values
Ordinal Values
■ Using ordinal values to reference functions is an
old-school but effective way to bypass antivirus
detection
■Picture an array or Python list containing
functions. To reference a specific function,
you reference it by its location within the
array/list
■Same concept for bypassing AV via ordinal
values
Ordinal Values
■ Rather than calling HeapAlloc or RtlMoveMemory
by name, why not reference it by its ordinal
value?
■ This is still a call to the same function, but just via
a different method
■Check out this code
Ordinal Values
■Simply referencing function calls by their
ordinal value vs. name can bypass anti-virus
■NOTE: Ordinal values can change between both
OSs and Service Packs. You will need to target
your payload to the OS and Service Pack when
referencing via ordinal value.
■So…. how do we find these ordinal values?
Ordinal Values
■PEView is a free program which lets you inspect
PE files, dlls, etc.
■You can use this to load kernel32.dll, search for
the functions that you are calling, and obtain
their ordinal value
■PEView provides the base 16 value, so be sure
to convert it to its base 10 value.
Veil’s Approach
How Veil-Evasion Bypasses AV
■ Completely open sourced
■ Can query VT’s API
■ Veil-Evasion attempts to bypass AV through a
few different techniques
■Obfuscated Code
■Encrypted Code
■Non-standard languages for binaries
Flat vs. encrypted code
How Veil-Evasion Bypasses AV
■ Languages that Veil-Evasion supports
■Python
■Perl
■PowerShell
■C#
■C
■Go
■Ruby
How Veil-Evasion Bypasses AV
■Using a non-standard language (read not C, C++,
or C#) resulted in payloads that immediately
bypassed antivirus
■AV just didn’t understand how to properly
inspect these executables
■Example:
■C Flat vs. Python Flat
Ordinal Values
■ Simply changing the
language the payload
was written in
completely bypassed
all AV signatures.
Antivirus Signature
Veil-Evasion
■After about 1 year, Veil-Evasion finally had its
first signature!
■I was informed about this on IRC and wanted to
check it out.
Custom Code
Browser Check Scenario
■Instead of sending just some random executable
when phishing, what if you promise to secure
their system?
■Developed by Hunter Hardman (@t3ntman)
■Written in C#
■Custom code, so it bypasses every single AV out
there (at least before Hunter made it public :))
Browser Check Scenario
■This works great for phishing scenarios
■We target individuals impersonating their IT
Security, or just IT staff
■Warn them about the dangers of
misconfigured/old browsers
■Give them a solution!
Browser Check Scenario
■Once the program starts, it spawns PowerShell
and executes any code you give it
■Meterpreter or Beacon!
■It’s fully functional, once user tells it to start,
they see a progress bar go to completion.
■Once complete, it lets them know their system is
secure!
Browser Check Scenario
■Delivery is dependent upon the situation
■We’ve created websites hosting it over HTTPS
to make users think it is secure
■Created fake “secure file transfer” websites
■Rarely, we’ve sent just the executable
■For our initial access, this has been pretty
successful, and the lack of AV detection helps the
user trust the program
Browser Check Scenario
■Currently available for review at -
https://github.com/t3ntman/BrowserCheck
Enumerator
Enumerator
■Customer didn’t want actual shellcode injection
of infection of their endpoints
■Wanted intel collection to act as proof of
“compromise”
■I developed a script that would gather host
information and would POST the data out over
HTTPS to our server.
Enumerator
■Information gathered
■System hostname
■IP address(es)
■System drives and drive space
■Current user
■Tasklist
Github
■https://github.com/ChrisTruncer/PenTestScript
s/blob/master/enumeration.py
■https://github.com/ChrisTruncer/PenTestScript
s/blob/master/enum_server.py
WMIOps
WMIOps
■Why waste engineering time, developing a RAT,
hoping it never gets burnt. Just leverage built in
functionality!
■Anything useful for system administration is
just as easily repurposed for illegitimate use :)
■Just live off the land!
WMIOps
■Used WMI much?
■WMI is installed and running by default on
Windows systems since Windows 2000
■It does require local admin privileges on the
targeted system
But this can make it great for post-
exploitation
WMIOps
■ WMIOps - A PowerShell based tool which uses
WMI to carry out various actions on targeted
systems.
■ Developed in PowerShell - we can load it in
memory and execute a variety of different tasks
WMIOps
■ Want to see which users have active processes on
a system?
■Might be good to know where you can snag
creds!
■Rather than needing to compromise the
machine, just run a simple WMI query with
WMIOps!
WMIOps
■Now that we know who is on the system, want to
run Mimikatz to capture user credentials?
■Traditionally we’d have to compromise it, and
load up Mimikatz.
■Why not leverage WMI to do everything in
memory without needing the use of a RAT?
WMIOps
■ Invoke-RemoteScriptWithOutput
■Spawn PowerShell on the remote system
■Download the PowerShell script in memory
■Runs the user specified function
■Saves output
■Performs a POST over HTTPS to a user
specified IP address
WMIOps
■ WMIOps can do other tasks as well
■Run commands
■Kill processes
■Search for files
■Transfer files
■Etc.
Available here -
https://github.com/ChrisTruncer/WMIOps
Thanks!
Any questions?
Reach out to me!
■ @ChrisTruncer
■ Chris@Christophertruncer.com
■ https://www.christophertruncer.com
■ https://www.github.com/ChrisTruncer

More Related Content

What's hot

The Art of AV Evasion - Or Lack Thereof
The Art of AV Evasion - Or Lack ThereofThe Art of AV Evasion - Or Lack Thereof
The Art of AV Evasion - Or Lack ThereofCTruncer
 
The State of the Veil Framework
The State of the Veil FrameworkThe State of the Veil Framework
The State of the Veil FrameworkVeilFramework
 
An EyeWitness View into your Network
An EyeWitness View into your NetworkAn EyeWitness View into your Network
An EyeWitness View into your NetworkCTruncer
 
Bringing Down the House - How One Python Script Ruled Over AntiVirus
Bringing Down the House - How One Python Script Ruled Over AntiVirusBringing Down the House - How One Python Script Ruled Over AntiVirus
Bringing Down the House - How One Python Script Ruled Over AntiVirusCTruncer
 
CheckPlease - Payload-Agnostic Implant Security
CheckPlease - Payload-Agnostic Implant SecurityCheckPlease - Payload-Agnostic Implant Security
CheckPlease - Payload-Agnostic Implant SecurityBrandon Arvanaghi
 
Hacking - Breaking Into It
Hacking - Breaking Into ItHacking - Breaking Into It
Hacking - Breaking Into ItCTruncer
 
CheckPlease: Payload-Agnostic Targeted Malware
CheckPlease: Payload-Agnostic Targeted MalwareCheckPlease: Payload-Agnostic Targeted Malware
CheckPlease: Payload-Agnostic Targeted MalwareBrandon Arvanaghi
 
Patching Windows Executables with the Backdoor Factory | DerbyCon 2013
Patching Windows Executables with the Backdoor Factory | DerbyCon 2013Patching Windows Executables with the Backdoor Factory | DerbyCon 2013
Patching Windows Executables with the Backdoor Factory | DerbyCon 2013midnite_runr
 
Egress-Assess and Owning Data Exfiltration
Egress-Assess and Owning Data ExfiltrationEgress-Assess and Owning Data Exfiltration
Egress-Assess and Owning Data ExfiltrationCTruncer
 
Passive Intelligence Gathering and Analytics - It's All Just Metadata!
Passive Intelligence Gathering and Analytics - It's All Just Metadata!Passive Intelligence Gathering and Analytics - It's All Just Metadata!
Passive Intelligence Gathering and Analytics - It's All Just Metadata!CTruncer
 
What Goes In Must Come Out: Egress-Assess and Data Exfiltration
What Goes In Must Come Out: Egress-Assess and Data ExfiltrationWhat Goes In Must Come Out: Egress-Assess and Data Exfiltration
What Goes In Must Come Out: Egress-Assess and Data ExfiltrationCTruncer
 
Veil-PowerView - NovaHackers
Veil-PowerView - NovaHackersVeil-PowerView - NovaHackers
Veil-PowerView - NovaHackersVeilFramework
 
Csw2016 d antoine_automatic_exploitgeneration
Csw2016 d antoine_automatic_exploitgenerationCsw2016 d antoine_automatic_exploitgeneration
Csw2016 d antoine_automatic_exploitgenerationCanSecWest
 
Exploitation and State Machines
Exploitation and State MachinesExploitation and State Machines
Exploitation and State MachinesMichael Scovetta
 
Introduction of ShinoBOT (Black Hat USA 2013 Arsenal)
Introduction of ShinoBOT (Black Hat USA 2013 Arsenal)Introduction of ShinoBOT (Black Hat USA 2013 Arsenal)
Introduction of ShinoBOT (Black Hat USA 2013 Arsenal)Shota Shinogi
 
Масштабируемый и эффективный фаззинг Google Chrome
Масштабируемый и эффективный фаззинг Google ChromeМасштабируемый и эффективный фаззинг Google Chrome
Масштабируемый и эффективный фаззинг Google ChromePositive Hack Days
 
Integrating web archiving in preservation workflows. Louise Fauduet, Clément ...
Integrating web archiving in preservation workflows. Louise Fauduet, Clément ...Integrating web archiving in preservation workflows. Louise Fauduet, Clément ...
Integrating web archiving in preservation workflows. Louise Fauduet, Clément ...Biblioteca Nacional de España
 
Injection on Steroids: Codeless code injection and 0-day techniques
Injection on Steroids: Codeless code injection and 0-day techniquesInjection on Steroids: Codeless code injection and 0-day techniques
Injection on Steroids: Codeless code injection and 0-day techniquesenSilo
 
Introduction to Dynamic Malware Analysis ...Or am I "Cuckoo for Malware?"
Introduction to Dynamic Malware Analysis   ...Or am I "Cuckoo for Malware?"Introduction to Dynamic Malware Analysis   ...Or am I "Cuckoo for Malware?"
Introduction to Dynamic Malware Analysis ...Or am I "Cuckoo for Malware?"Lane Huff
 

What's hot (20)

Veil-Ordnance
Veil-OrdnanceVeil-Ordnance
Veil-Ordnance
 
The Art of AV Evasion - Or Lack Thereof
The Art of AV Evasion - Or Lack ThereofThe Art of AV Evasion - Or Lack Thereof
The Art of AV Evasion - Or Lack Thereof
 
The State of the Veil Framework
The State of the Veil FrameworkThe State of the Veil Framework
The State of the Veil Framework
 
An EyeWitness View into your Network
An EyeWitness View into your NetworkAn EyeWitness View into your Network
An EyeWitness View into your Network
 
Bringing Down the House - How One Python Script Ruled Over AntiVirus
Bringing Down the House - How One Python Script Ruled Over AntiVirusBringing Down the House - How One Python Script Ruled Over AntiVirus
Bringing Down the House - How One Python Script Ruled Over AntiVirus
 
CheckPlease - Payload-Agnostic Implant Security
CheckPlease - Payload-Agnostic Implant SecurityCheckPlease - Payload-Agnostic Implant Security
CheckPlease - Payload-Agnostic Implant Security
 
Hacking - Breaking Into It
Hacking - Breaking Into ItHacking - Breaking Into It
Hacking - Breaking Into It
 
CheckPlease: Payload-Agnostic Targeted Malware
CheckPlease: Payload-Agnostic Targeted MalwareCheckPlease: Payload-Agnostic Targeted Malware
CheckPlease: Payload-Agnostic Targeted Malware
 
Patching Windows Executables with the Backdoor Factory | DerbyCon 2013
Patching Windows Executables with the Backdoor Factory | DerbyCon 2013Patching Windows Executables with the Backdoor Factory | DerbyCon 2013
Patching Windows Executables with the Backdoor Factory | DerbyCon 2013
 
Egress-Assess and Owning Data Exfiltration
Egress-Assess and Owning Data ExfiltrationEgress-Assess and Owning Data Exfiltration
Egress-Assess and Owning Data Exfiltration
 
Passive Intelligence Gathering and Analytics - It's All Just Metadata!
Passive Intelligence Gathering and Analytics - It's All Just Metadata!Passive Intelligence Gathering and Analytics - It's All Just Metadata!
Passive Intelligence Gathering and Analytics - It's All Just Metadata!
 
What Goes In Must Come Out: Egress-Assess and Data Exfiltration
What Goes In Must Come Out: Egress-Assess and Data ExfiltrationWhat Goes In Must Come Out: Egress-Assess and Data Exfiltration
What Goes In Must Come Out: Egress-Assess and Data Exfiltration
 
Veil-PowerView - NovaHackers
Veil-PowerView - NovaHackersVeil-PowerView - NovaHackers
Veil-PowerView - NovaHackers
 
Csw2016 d antoine_automatic_exploitgeneration
Csw2016 d antoine_automatic_exploitgenerationCsw2016 d antoine_automatic_exploitgeneration
Csw2016 d antoine_automatic_exploitgeneration
 
Exploitation and State Machines
Exploitation and State MachinesExploitation and State Machines
Exploitation and State Machines
 
Introduction of ShinoBOT (Black Hat USA 2013 Arsenal)
Introduction of ShinoBOT (Black Hat USA 2013 Arsenal)Introduction of ShinoBOT (Black Hat USA 2013 Arsenal)
Introduction of ShinoBOT (Black Hat USA 2013 Arsenal)
 
Масштабируемый и эффективный фаззинг Google Chrome
Масштабируемый и эффективный фаззинг Google ChromeМасштабируемый и эффективный фаззинг Google Chrome
Масштабируемый и эффективный фаззинг Google Chrome
 
Integrating web archiving in preservation workflows. Louise Fauduet, Clément ...
Integrating web archiving in preservation workflows. Louise Fauduet, Clément ...Integrating web archiving in preservation workflows. Louise Fauduet, Clément ...
Integrating web archiving in preservation workflows. Louise Fauduet, Clément ...
 
Injection on Steroids: Codeless code injection and 0-day techniques
Injection on Steroids: Codeless code injection and 0-day techniquesInjection on Steroids: Codeless code injection and 0-day techniques
Injection on Steroids: Codeless code injection and 0-day techniques
 
Introduction to Dynamic Malware Analysis ...Or am I "Cuckoo for Malware?"
Introduction to Dynamic Malware Analysis   ...Or am I "Cuckoo for Malware?"Introduction to Dynamic Malware Analysis   ...Or am I "Cuckoo for Malware?"
Introduction to Dynamic Malware Analysis ...Or am I "Cuckoo for Malware?"
 

Viewers also liked

Pen Testing, Red Teaming, and More
Pen Testing, Red Teaming, and MorePen Testing, Red Teaming, and More
Pen Testing, Red Teaming, and MoreCTruncer
 
EyeWitness - A Web Application Triage Tool
EyeWitness - A Web Application Triage ToolEyeWitness - A Web Application Triage Tool
EyeWitness - A Web Application Triage ToolCTruncer
 
Ceh v5 module 19 evading ids firewall and honeypot
Ceh v5 module 19 evading ids firewall and honeypotCeh v5 module 19 evading ids firewall and honeypot
Ceh v5 module 19 evading ids firewall and honeypotVi Tính Hoàng Nam
 
Null Mumbai 14th May Lesser Known Webapp attacks by Ninad Sarang
Null Mumbai 14th May Lesser Known Webapp attacks by Ninad SarangNull Mumbai 14th May Lesser Known Webapp attacks by Ninad Sarang
Null Mumbai 14th May Lesser Known Webapp attacks by Ninad Sarangnullowaspmumbai
 
Nullcon Goa 2016 - Automated Mobile Application Security Testing with Mobile ...
Nullcon Goa 2016 - Automated Mobile Application Security Testing with Mobile ...Nullcon Goa 2016 - Automated Mobile Application Security Testing with Mobile ...
Nullcon Goa 2016 - Automated Mobile Application Security Testing with Mobile ...Ajin Abraham
 
Nouveaux outils et dérives de la communication politique : interview exclusiv...
Nouveaux outils et dérives de la communication politique : interview exclusiv...Nouveaux outils et dérives de la communication politique : interview exclusiv...
Nouveaux outils et dérives de la communication politique : interview exclusiv...Damien ARNAUD
 
LuxBox MEDIA.figaro LuxLiberty 17 janvier 2017
LuxBox MEDIA.figaro LuxLiberty 17 janvier 2017LuxBox MEDIA.figaro LuxLiberty 17 janvier 2017
LuxBox MEDIA.figaro LuxLiberty 17 janvier 2017MEDIA.figaro
 
Invoke-Obfuscation nullcon 2017
Invoke-Obfuscation nullcon 2017Invoke-Obfuscation nullcon 2017
Invoke-Obfuscation nullcon 2017Daniel Bohannon
 
RootedCON 2017 - Docker might not be your friend. Trojanizing Docker images
RootedCON 2017 - Docker might not be your friend. Trojanizing Docker imagesRootedCON 2017 - Docker might not be your friend. Trojanizing Docker images
RootedCON 2017 - Docker might not be your friend. Trojanizing Docker imagesDaniel Garcia (a.k.a cr0hn)
 
55 New Features in JDK 9
55 New Features in JDK 955 New Features in JDK 9
55 New Features in JDK 9Simon Ritter
 

Viewers also liked (11)

Pen Testing, Red Teaming, and More
Pen Testing, Red Teaming, and MorePen Testing, Red Teaming, and More
Pen Testing, Red Teaming, and More
 
EyeWitness - A Web Application Triage Tool
EyeWitness - A Web Application Triage ToolEyeWitness - A Web Application Triage Tool
EyeWitness - A Web Application Triage Tool
 
L2
L2L2
L2
 
Ceh v5 module 19 evading ids firewall and honeypot
Ceh v5 module 19 evading ids firewall and honeypotCeh v5 module 19 evading ids firewall and honeypot
Ceh v5 module 19 evading ids firewall and honeypot
 
Null Mumbai 14th May Lesser Known Webapp attacks by Ninad Sarang
Null Mumbai 14th May Lesser Known Webapp attacks by Ninad SarangNull Mumbai 14th May Lesser Known Webapp attacks by Ninad Sarang
Null Mumbai 14th May Lesser Known Webapp attacks by Ninad Sarang
 
Nullcon Goa 2016 - Automated Mobile Application Security Testing with Mobile ...
Nullcon Goa 2016 - Automated Mobile Application Security Testing with Mobile ...Nullcon Goa 2016 - Automated Mobile Application Security Testing with Mobile ...
Nullcon Goa 2016 - Automated Mobile Application Security Testing with Mobile ...
 
Nouveaux outils et dérives de la communication politique : interview exclusiv...
Nouveaux outils et dérives de la communication politique : interview exclusiv...Nouveaux outils et dérives de la communication politique : interview exclusiv...
Nouveaux outils et dérives de la communication politique : interview exclusiv...
 
LuxBox MEDIA.figaro LuxLiberty 17 janvier 2017
LuxBox MEDIA.figaro LuxLiberty 17 janvier 2017LuxBox MEDIA.figaro LuxLiberty 17 janvier 2017
LuxBox MEDIA.figaro LuxLiberty 17 janvier 2017
 
Invoke-Obfuscation nullcon 2017
Invoke-Obfuscation nullcon 2017Invoke-Obfuscation nullcon 2017
Invoke-Obfuscation nullcon 2017
 
RootedCON 2017 - Docker might not be your friend. Trojanizing Docker images
RootedCON 2017 - Docker might not be your friend. Trojanizing Docker imagesRootedCON 2017 - Docker might not be your friend. Trojanizing Docker images
RootedCON 2017 - Docker might not be your friend. Trojanizing Docker images
 
55 New Features in JDK 9
55 New Features in JDK 955 New Features in JDK 9
55 New Features in JDK 9
 

Similar to A Battle Against the Industry - Beating Antivirus for Meterpreter and More

Security & ethical hacking
Security & ethical hackingSecurity & ethical hacking
Security & ethical hackingAmanpreet Singh
 
Security & ethical hacking p2
Security & ethical hacking p2Security & ethical hacking p2
Security & ethical hacking p2ratnalajaggu
 
Reverse Engineering Presentation.pdf
Reverse Engineering Presentation.pdfReverse Engineering Presentation.pdf
Reverse Engineering Presentation.pdfAbdelrahmanShaban3
 
Metasploit - Basic and Android Demo
Metasploit  - Basic and Android DemoMetasploit  - Basic and Android Demo
Metasploit - Basic and Android DemoArpit Agarwal
 
Linux Server Deep Dives (DrupalCon Amsterdam)
Linux Server Deep Dives (DrupalCon Amsterdam)Linux Server Deep Dives (DrupalCon Amsterdam)
Linux Server Deep Dives (DrupalCon Amsterdam)Amin Astaneh
 
Hacking Vulnerable Websites to Bypass Firewalls
Hacking Vulnerable Websites to Bypass FirewallsHacking Vulnerable Websites to Bypass Firewalls
Hacking Vulnerable Websites to Bypass FirewallsNetsparker
 
RIoT (Raiding Internet of Things) by Jacob Holcomb
RIoT  (Raiding Internet of Things)  by Jacob HolcombRIoT  (Raiding Internet of Things)  by Jacob Holcomb
RIoT (Raiding Internet of Things) by Jacob HolcombPriyanka Aash
 
Bypass_AV-EDR.pdf
Bypass_AV-EDR.pdfBypass_AV-EDR.pdf
Bypass_AV-EDR.pdfFarouk2nd
 
Defcon 27 - Writing custom backdoor payloads with C#
Defcon 27 - Writing custom backdoor payloads with C#Defcon 27 - Writing custom backdoor payloads with C#
Defcon 27 - Writing custom backdoor payloads with C#Mauricio Velazco
 
Understanding & analyzing obfuscated malicious web scripts by Vikram Kharvi
Understanding & analyzing obfuscated malicious web scripts by Vikram KharviUnderstanding & analyzing obfuscated malicious web scripts by Vikram Kharvi
Understanding & analyzing obfuscated malicious web scripts by Vikram KharviCysinfo Cyber Security Community
 
DEF CON 27 - workshop - MAURICIO VELAZCO - writing custom paylods
DEF CON 27 - workshop - MAURICIO VELAZCO - writing  custom paylodsDEF CON 27 - workshop - MAURICIO VELAZCO - writing  custom paylods
DEF CON 27 - workshop - MAURICIO VELAZCO - writing custom paylodsFelipe Prado
 
Adversarial Post-Ex: Lessons From The Pros
Adversarial Post-Ex: Lessons From The ProsAdversarial Post-Ex: Lessons From The Pros
Adversarial Post-Ex: Lessons From The ProsJustin Warner
 
Adversarial Post Ex - Lessons from the Pros
Adversarial Post Ex - Lessons from the ProsAdversarial Post Ex - Lessons from the Pros
Adversarial Post Ex - Lessons from the Prossixdub
 
"Revenge of The Script Kiddies: Current Day Uses of Automated Scripts by Top ...
"Revenge of The Script Kiddies: Current Day Uses of Automated Scripts by Top ..."Revenge of The Script Kiddies: Current Day Uses of Automated Scripts by Top ...
"Revenge of The Script Kiddies: Current Day Uses of Automated Scripts by Top ...PROIDEA
 
Malware 101 by saurabh chaudhary
Malware 101 by saurabh chaudharyMalware 101 by saurabh chaudhary
Malware 101 by saurabh chaudharySaurav Chaudhary
 
"Automated Malware Analysis" de Gabriel Negreira Barbosa, Malware Research an...
"Automated Malware Analysis" de Gabriel Negreira Barbosa, Malware Research an..."Automated Malware Analysis" de Gabriel Negreira Barbosa, Malware Research an...
"Automated Malware Analysis" de Gabriel Negreira Barbosa, Malware Research an...SegInfo
 
Penetration Testing and Intrusion Detection System
Penetration Testing and Intrusion Detection SystemPenetration Testing and Intrusion Detection System
Penetration Testing and Intrusion Detection SystemBikrant Gautam
 
Penetrating Windows 8 with syringe utility
Penetrating Windows 8 with syringe utilityPenetrating Windows 8 with syringe utility
Penetrating Windows 8 with syringe utilityIOSR Journals
 

Similar to A Battle Against the Industry - Beating Antivirus for Meterpreter and More (20)

Security & ethical hacking
Security & ethical hackingSecurity & ethical hacking
Security & ethical hacking
 
Security & ethical hacking p2
Security & ethical hacking p2Security & ethical hacking p2
Security & ethical hacking p2
 
RAT - Repurposing Adversarial Tradecraft
RAT - Repurposing Adversarial TradecraftRAT - Repurposing Adversarial Tradecraft
RAT - Repurposing Adversarial Tradecraft
 
Reverse Engineering Presentation.pdf
Reverse Engineering Presentation.pdfReverse Engineering Presentation.pdf
Reverse Engineering Presentation.pdf
 
Metasploit - Basic and Android Demo
Metasploit  - Basic and Android DemoMetasploit  - Basic and Android Demo
Metasploit - Basic and Android Demo
 
Linux Server Deep Dives (DrupalCon Amsterdam)
Linux Server Deep Dives (DrupalCon Amsterdam)Linux Server Deep Dives (DrupalCon Amsterdam)
Linux Server Deep Dives (DrupalCon Amsterdam)
 
Hacking Vulnerable Websites to Bypass Firewalls
Hacking Vulnerable Websites to Bypass FirewallsHacking Vulnerable Websites to Bypass Firewalls
Hacking Vulnerable Websites to Bypass Firewalls
 
RIoT (Raiding Internet of Things) by Jacob Holcomb
RIoT  (Raiding Internet of Things)  by Jacob HolcombRIoT  (Raiding Internet of Things)  by Jacob Holcomb
RIoT (Raiding Internet of Things) by Jacob Holcomb
 
Bypass_AV-EDR.pdf
Bypass_AV-EDR.pdfBypass_AV-EDR.pdf
Bypass_AV-EDR.pdf
 
Defcon 27 - Writing custom backdoor payloads with C#
Defcon 27 - Writing custom backdoor payloads with C#Defcon 27 - Writing custom backdoor payloads with C#
Defcon 27 - Writing custom backdoor payloads with C#
 
I hunt sys admins 2.0
I hunt sys admins 2.0I hunt sys admins 2.0
I hunt sys admins 2.0
 
Understanding & analyzing obfuscated malicious web scripts by Vikram Kharvi
Understanding & analyzing obfuscated malicious web scripts by Vikram KharviUnderstanding & analyzing obfuscated malicious web scripts by Vikram Kharvi
Understanding & analyzing obfuscated malicious web scripts by Vikram Kharvi
 
DEF CON 27 - workshop - MAURICIO VELAZCO - writing custom paylods
DEF CON 27 - workshop - MAURICIO VELAZCO - writing  custom paylodsDEF CON 27 - workshop - MAURICIO VELAZCO - writing  custom paylods
DEF CON 27 - workshop - MAURICIO VELAZCO - writing custom paylods
 
Adversarial Post-Ex: Lessons From The Pros
Adversarial Post-Ex: Lessons From The ProsAdversarial Post-Ex: Lessons From The Pros
Adversarial Post-Ex: Lessons From The Pros
 
Adversarial Post Ex - Lessons from the Pros
Adversarial Post Ex - Lessons from the ProsAdversarial Post Ex - Lessons from the Pros
Adversarial Post Ex - Lessons from the Pros
 
"Revenge of The Script Kiddies: Current Day Uses of Automated Scripts by Top ...
"Revenge of The Script Kiddies: Current Day Uses of Automated Scripts by Top ..."Revenge of The Script Kiddies: Current Day Uses of Automated Scripts by Top ...
"Revenge of The Script Kiddies: Current Day Uses of Automated Scripts by Top ...
 
Malware 101 by saurabh chaudhary
Malware 101 by saurabh chaudharyMalware 101 by saurabh chaudhary
Malware 101 by saurabh chaudhary
 
"Automated Malware Analysis" de Gabriel Negreira Barbosa, Malware Research an...
"Automated Malware Analysis" de Gabriel Negreira Barbosa, Malware Research an..."Automated Malware Analysis" de Gabriel Negreira Barbosa, Malware Research an...
"Automated Malware Analysis" de Gabriel Negreira Barbosa, Malware Research an...
 
Penetration Testing and Intrusion Detection System
Penetration Testing and Intrusion Detection SystemPenetration Testing and Intrusion Detection System
Penetration Testing and Intrusion Detection System
 
Penetrating Windows 8 with syringe utility
Penetrating Windows 8 with syringe utilityPenetrating Windows 8 with syringe utility
Penetrating Windows 8 with syringe utility
 

Recently uploaded

20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdfMatthew Sinclair
 
Meaning of On page SEO & its process in detail.
Meaning of On page SEO & its process in detail.Meaning of On page SEO & its process in detail.
Meaning of On page SEO & its process in detail.krishnachandrapal52
 
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi EscortsIndian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi EscortsMonica Sydney
 
Abu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Abu Dhabi Escorts Service 0508644382 Escorts in Abu DhabiAbu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Abu Dhabi Escorts Service 0508644382 Escorts in Abu DhabiMonica Sydney
 
Call girls Service in Ajman 0505086370 Ajman call girls
Call girls Service in Ajman 0505086370 Ajman call girlsCall girls Service in Ajman 0505086370 Ajman call girls
Call girls Service in Ajman 0505086370 Ajman call girlsMonica Sydney
 
Best SEO Services Company in Dallas | Best SEO Agency Dallas
Best SEO Services Company in Dallas | Best SEO Agency DallasBest SEO Services Company in Dallas | Best SEO Agency Dallas
Best SEO Services Company in Dallas | Best SEO Agency DallasDigicorns Technologies
 
一比一原版奥兹学院毕业证如何办理
一比一原版奥兹学院毕业证如何办理一比一原版奥兹学院毕业证如何办理
一比一原版奥兹学院毕业证如何办理F
 
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency""Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency"growthgrids
 
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac RoomVip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Roommeghakumariji156
 
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制pxcywzqs
 
Trump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts SweatshirtTrump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts Sweatshirtrahman018755
 
20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdfMatthew Sinclair
 
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查ydyuyu
 
Real Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirtReal Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirtrahman018755
 
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdfMatthew Sinclair
 
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girlsRussian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girlsMonica Sydney
 
Local Call Girls in Seoni 9332606886 HOT & SEXY Models beautiful and charmin...
Local Call Girls in Seoni  9332606886 HOT & SEXY Models beautiful and charmin...Local Call Girls in Seoni  9332606886 HOT & SEXY Models beautiful and charmin...
Local Call Girls in Seoni 9332606886 HOT & SEXY Models beautiful and charmin...kumargunjan9515
 
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查ydyuyu
 
Tadepalligudem Escorts Service Girl ^ 9332606886, WhatsApp Anytime Tadepallig...
Tadepalligudem Escorts Service Girl ^ 9332606886, WhatsApp Anytime Tadepallig...Tadepalligudem Escorts Service Girl ^ 9332606886, WhatsApp Anytime Tadepallig...
Tadepalligudem Escorts Service Girl ^ 9332606886, WhatsApp Anytime Tadepallig...meghakumariji156
 

Recently uploaded (20)

20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
 
call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7
call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7
call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7
 
Meaning of On page SEO & its process in detail.
Meaning of On page SEO & its process in detail.Meaning of On page SEO & its process in detail.
Meaning of On page SEO & its process in detail.
 
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi EscortsIndian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
 
Abu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Abu Dhabi Escorts Service 0508644382 Escorts in Abu DhabiAbu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Abu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
 
Call girls Service in Ajman 0505086370 Ajman call girls
Call girls Service in Ajman 0505086370 Ajman call girlsCall girls Service in Ajman 0505086370 Ajman call girls
Call girls Service in Ajman 0505086370 Ajman call girls
 
Best SEO Services Company in Dallas | Best SEO Agency Dallas
Best SEO Services Company in Dallas | Best SEO Agency DallasBest SEO Services Company in Dallas | Best SEO Agency Dallas
Best SEO Services Company in Dallas | Best SEO Agency Dallas
 
一比一原版奥兹学院毕业证如何办理
一比一原版奥兹学院毕业证如何办理一比一原版奥兹学院毕业证如何办理
一比一原版奥兹学院毕业证如何办理
 
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency""Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
 
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac RoomVip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
 
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
 
Trump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts SweatshirtTrump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts Sweatshirt
 
20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf
 
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
 
Real Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirtReal Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirt
 
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
 
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girlsRussian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
 
Local Call Girls in Seoni 9332606886 HOT & SEXY Models beautiful and charmin...
Local Call Girls in Seoni  9332606886 HOT & SEXY Models beautiful and charmin...Local Call Girls in Seoni  9332606886 HOT & SEXY Models beautiful and charmin...
Local Call Girls in Seoni 9332606886 HOT & SEXY Models beautiful and charmin...
 
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
 
Tadepalligudem Escorts Service Girl ^ 9332606886, WhatsApp Anytime Tadepallig...
Tadepalligudem Escorts Service Girl ^ 9332606886, WhatsApp Anytime Tadepallig...Tadepalligudem Escorts Service Girl ^ 9332606886, WhatsApp Anytime Tadepallig...
Tadepalligudem Escorts Service Girl ^ 9332606886, WhatsApp Anytime Tadepallig...
 

A Battle Against the Industry - Beating Antivirus for Meterpreter and More

  • 1. A Battle Against the Industry - Beating Antivirus for Meterpreter and More @ChrisTruncer
  • 2. Whoami ■ A systems administrator turnedredteamer ■ Florida State Seminole ■ Open Source Software Developer ■ Veil-Framework ■ EyeWitness Thanks Robin :) ■ Egress-Assess ■ Just-Metadata
  • 3. Why am I here today? ■Share some laughs at Antivirus :) ■Give a background on stagers ■Showcase a Veil-Evasion signature bypass ■Anyone can do this.. ■Talk about developing your own code ■Case studies on previously developed code
  • 5. What are stagers? ■Can be referred to as “stage 1” ■Might be msfvenom, Veil-Evasion, etc. output ■Goal is typically to inject shellcode into memory ■Shellcode usually downloads and executes a reflectively injectable dll ■…but it can also do anything you want if you write it :)
  • 6. What are stagers? ■Stagers are really used as loaders for your real malware ■They’re designed to be expendable and tiny ■Don’t give away your engineered malware by dropping it to disk ■Load everything in memory
  • 7. What are stagers? ■Any language that has the ability to access windows functions can be used to write a stager! ■Pretty cool, and allows us to expand out from traditional “Windows Langauges” ■Interacting with Windows functions can seem daunting, but isn’t all that bad ■4 or 5 function calls
  • 9. Stagers in a Nutshell ■ Allocate memory to store the shellcode being injected, and apply proper memory permissions ■ Copy the shellcode into the allocated memory ■ Create a thread to run the shellcode copied into the process’s memory ■ Wait for the thread to complete running before exiting the program
  • 10. Windows API Calls ■Most stagers utilize VirtualAlloc to allocate memory ■This talk shows an alternate way to allocate memory that isn’t heavily utilized ■It might be a better way to fly under the radar
  • 11. HeapCreate ■Creates a private heap object that can be used by the process creating the heap ■Specify the memory protections ■Requires the size of the heap that will need to be allocated ■Shellcode length ■Max size of allocated memory ■I do twice the shellcode length
  • 12. HeapAlloc ■ Allocates memory from the previously created heap object ■ Receives a handle to the previously allocated heap object ■ Specify the total amount of space that you are allocating for shellcode
  • 13. RtlMoveMemory ■Places the shellcode you are injecting into the allocated heap space ■Needs a pointer to where data (shellcode) will be copied to (heapalloc output) ■Needs a pointer to the data (shellcode) ■Needs the length of the shellcode being injected
  • 14. CreateThread ■This function creates a new thread within the current process to execute the data (shellcode) that was injected ■Requires a pointer to the data (shellcode) that will run in the new thread ■Schedule the thread to execute immediately
  • 15. WaitForSingleObject ■This function is like a blocking call to prevent the program from exiting immediately ■Requires a handle to the thread that was created by the CreateThread function ■Requires a value (-1) to specify that the program should wait to exit until the thread exists
  • 16. Stagers in a Nutshell (Repeated) ■ Allocate memory to store the shellcode being injected, and apply proper memory permissions ■ Copy the shellcode into the allocated memory ■ Create a thread to run the shellcode copied into the process’s memory ■ Wait for the thread to complete running before exiting the program
  • 17.
  • 19. Ordinal Values ■ Using ordinal values to reference functions is an old-school but effective way to bypass antivirus detection ■Picture an array or Python list containing functions. To reference a specific function, you reference it by its location within the array/list ■Same concept for bypassing AV via ordinal values
  • 20. Ordinal Values ■ Rather than calling HeapAlloc or RtlMoveMemory by name, why not reference it by its ordinal value? ■ This is still a call to the same function, but just via a different method ■Check out this code
  • 21.
  • 22.
  • 23.
  • 24. Ordinal Values ■Simply referencing function calls by their ordinal value vs. name can bypass anti-virus ■NOTE: Ordinal values can change between both OSs and Service Packs. You will need to target your payload to the OS and Service Pack when referencing via ordinal value. ■So…. how do we find these ordinal values?
  • 25.
  • 26. Ordinal Values ■PEView is a free program which lets you inspect PE files, dlls, etc. ■You can use this to load kernel32.dll, search for the functions that you are calling, and obtain their ordinal value ■PEView provides the base 16 value, so be sure to convert it to its base 10 value.
  • 28. How Veil-Evasion Bypasses AV ■ Completely open sourced ■ Can query VT’s API ■ Veil-Evasion attempts to bypass AV through a few different techniques ■Obfuscated Code ■Encrypted Code ■Non-standard languages for binaries Flat vs. encrypted code
  • 29. How Veil-Evasion Bypasses AV ■ Languages that Veil-Evasion supports ■Python ■Perl ■PowerShell ■C# ■C ■Go ■Ruby
  • 30. How Veil-Evasion Bypasses AV ■Using a non-standard language (read not C, C++, or C#) resulted in payloads that immediately bypassed antivirus ■AV just didn’t understand how to properly inspect these executables ■Example: ■C Flat vs. Python Flat
  • 31.
  • 32.
  • 33. Ordinal Values ■ Simply changing the language the payload was written in completely bypassed all AV signatures.
  • 35. Veil-Evasion ■After about 1 year, Veil-Evasion finally had its first signature! ■I was informed about this on IRC and wanted to check it out.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.
  • 44. Browser Check Scenario ■Instead of sending just some random executable when phishing, what if you promise to secure their system? ■Developed by Hunter Hardman (@t3ntman) ■Written in C# ■Custom code, so it bypasses every single AV out there (at least before Hunter made it public :))
  • 45.
  • 46. Browser Check Scenario ■This works great for phishing scenarios ■We target individuals impersonating their IT Security, or just IT staff ■Warn them about the dangers of misconfigured/old browsers ■Give them a solution!
  • 47. Browser Check Scenario ■Once the program starts, it spawns PowerShell and executes any code you give it ■Meterpreter or Beacon! ■It’s fully functional, once user tells it to start, they see a progress bar go to completion. ■Once complete, it lets them know their system is secure!
  • 48. Browser Check Scenario ■Delivery is dependent upon the situation ■We’ve created websites hosting it over HTTPS to make users think it is secure ■Created fake “secure file transfer” websites ■Rarely, we’ve sent just the executable ■For our initial access, this has been pretty successful, and the lack of AV detection helps the user trust the program
  • 49. Browser Check Scenario ■Currently available for review at - https://github.com/t3ntman/BrowserCheck
  • 51. Enumerator ■Customer didn’t want actual shellcode injection of infection of their endpoints ■Wanted intel collection to act as proof of “compromise” ■I developed a script that would gather host information and would POST the data out over HTTPS to our server.
  • 52. Enumerator ■Information gathered ■System hostname ■IP address(es) ■System drives and drive space ■Current user ■Tasklist
  • 53.
  • 54.
  • 57. WMIOps ■Why waste engineering time, developing a RAT, hoping it never gets burnt. Just leverage built in functionality! ■Anything useful for system administration is just as easily repurposed for illegitimate use :) ■Just live off the land!
  • 58. WMIOps ■Used WMI much? ■WMI is installed and running by default on Windows systems since Windows 2000 ■It does require local admin privileges on the targeted system But this can make it great for post- exploitation
  • 59. WMIOps ■ WMIOps - A PowerShell based tool which uses WMI to carry out various actions on targeted systems. ■ Developed in PowerShell - we can load it in memory and execute a variety of different tasks
  • 60. WMIOps ■ Want to see which users have active processes on a system? ■Might be good to know where you can snag creds! ■Rather than needing to compromise the machine, just run a simple WMI query with WMIOps!
  • 61.
  • 62. WMIOps ■Now that we know who is on the system, want to run Mimikatz to capture user credentials? ■Traditionally we’d have to compromise it, and load up Mimikatz. ■Why not leverage WMI to do everything in memory without needing the use of a RAT?
  • 63. WMIOps ■ Invoke-RemoteScriptWithOutput ■Spawn PowerShell on the remote system ■Download the PowerShell script in memory ■Runs the user specified function ■Saves output ■Performs a POST over HTTPS to a user specified IP address
  • 64.
  • 65.
  • 66. WMIOps ■ WMIOps can do other tasks as well ■Run commands ■Kill processes ■Search for files ■Transfer files ■Etc. Available here - https://github.com/ChrisTruncer/WMIOps
  • 67. Thanks! Any questions? Reach out to me! ■ @ChrisTruncer ■ Chris@Christophertruncer.com ■ https://www.christophertruncer.com ■ https://www.github.com/ChrisTruncer