SlideShare a Scribd company logo
Fun with Macros!
And other sneaky tricks to avoid
detection...
▪ SEC560 SANS Instructor
▪ Director, Incident Handling, Red Canary
▪ Nice guy
▪ Former radio broadcaster
Greg Bailey
Director, Incident Handling
RED CANARY
@GRBail
Presenter
What the heck is Endpoint Detection & Response (EDR)?
What telemetry is collected?
How do I bypass it?
Sneaky Macros!
Overview
WHAT IS?
Endpoint Detection
and Response (EDR)
https://blogs.gartner.com/anton-chuvakin/2013/07/26/named-endpoint-threat-detection-response/
Endpoint Detection Response (EDR) Vendors
THERE ARE LIKE
30 MORE BUT I
STOPPED AT TEN
Too
much?
Better?
Total Excitement!
WHAT DOES EDR COLLECT?
Telemetry
▪ Process Telemetry (host, user, domain, proc, parent
proc)
▪ Network Telemetry (port, IP, protocol, bytes transferred)
▪ File Modifications (action, path, name, hash, type)
▪ Module Loads (time, name, path, hash)
▪ Registry Data (time, action path, value)
Windows Telemetry
▪ Process Telemetry (host, user, proc, parent proc)
▪ Network Telemetry (protocol, port, IP, bytes transferred)
▪ File Modifications (action, time, path, name, SHA, type)
▪ Module Loads (time, name, path, SHA)
▪ Binary Metadata (signature, version)
Linux Telemetry A LOT of noise!
▪ Process Telemetry (host, user, hash, proc, parent proc)
▪ Network Telemetry (IP, port, protocol, bytes transferred)
▪ File Modifications (action, path, name, hash, type)
▪ Binary Metadata (digital signature, file version metadata)
MacOS Telemetry Not a lot of
detection
capabilities!
THEY CAN SEE EVERYTHING!
What’s a Red Team to
do?
EVASION
If an EDR platform can’t see it, did it
actually happen?
Evasion Techniques
LIVING OFF THE LAND
LOLBins/LOLScripts
▪ Be a Microsoft-signed file, either native to the OS or downloaded from
Microsoft.
▪ Have extra "unexpected" functionality. It is not interesting to document
intended use cases.
▪ Exceptions are application whitelisting bypasses
▪ Have functionality that would be useful to an APT or red team
LOLBins/LOLScripts - Criteria
https://github.com/LOLBAS-Project/LOLBAS
Executing Code
▪ Arbitrary code execution
▪ Pass-through execution of other programs (unsigned) or scripts (via a LOLBin)
Compiling Code
File Operations
▪ Downloading
▪ Upload
▪ Copy
Persistence
▪ Pass-through persistence utilizing existing LOLBin
▪ Persistence (e.g. hide data in ADS, execute at logon)
LOLBin - functionality
UAC bypass
Credential theft
Dumping process memory
Surveillance (e.g. keylogger, network trace)
Log evasion/modification
DLL side-loading/hijacking without being relocated elsewhere in the
filesystem.
LOLBin - functionality
Bitsadmin
▪ download/upload jobs and monitor progress
▪ Pass-through execution of other programs (unsigned) or scripts (via a
LOLBin)
certutil
installutil
csc
LOLBin - Examples
If an EDR platform generates data in the
woods, do we see it?
Evasion Techniques
▪ Bitsadmin is a LOLBin
▪ Certutil is a LOLBin
▪ InstallUtil is another LOLBin
Let’s Look at a few Techniques
▪ create download or upload jobs and monitor their progress
bitsadmin
https://docs.microsoft.com/en-us/windows/win32/bits/background-intelligent-transfer-service-portal
Alternate Data Streams
▪ Defense evasion or persistence
▪ Execute specific file in ADS
Download
▪ Download file from the internet
Copy
▪ Copy file
Execute
▪ Defense evasion
▪ Execute specified binary
bitsadmin abuse
Rob Fuller - @mubix
Chris Gates - @carnal0wnage
Oddvar Moe - @oddvarmoe
https://atomicredteam.io/
https://github.com/redcanaryco/atomic-red-team
How to Detect Malicious Behavior
Additional flags, processes
used for obfuscation
Look for /AddFile flag
Scheduled tasks for persistence
▪ A Microsoft signed binary, used to obtain Certificate Authority
information and configure Certificate Services
certutil
https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/certutil
Download
▪ Download file from the Internet
Alternate Data Streams
▪ Download file from the internet and save it in NTFS Alternate Data Stream
Encode
▪ Encode a file to evade defensive measures
Decode
▪ Decode files to evade defensive measures
certutil abuse
Matt Graeber - @mattifestation
Moriarty - @Moriarty_Meng
egre55 - @egre55
▪ Just echo the encoded text and run certutil -decode
certutil
https://gist.github.com/mattifestation/47f9e8a431f96a266522
▪ NORMAL = decoding actual .pem, .cer, or pfx cert files
▪ NOT NORMAL = writing malicious payloads (.exe, scripts, archives)
How to Detect Malicious Behavior
Look for “certutil” && “decode”
▪ May be launched from Office utilities, including:
○ Excel, Publisher, PowerPoint, Visio, Word, etc.
Download Files with certutil
Certutil can be used to get around application whitelisting controls. When
used in a malicious manner, it frequently has the -split option (used to
split the embedded ASN.1 element and save to disk).
Examples
certutil -urlcache -split -f [file URL]
▪ A Microsoft signed binary used to install and uninstall resources by
executing specific .NET binaries.
installutil
https://docs.microsoft.com/en-us/dotnet/framework/tools/installutil-exe-installer-tool
https://attack.mitre.org/techniques/T1118/
Application Whitelisting Bypass
▪ Execute the target .NET DLL or .EXE
Execute
▪ Execute the target .NET DLL or .EXE
installutil abuse
Casey Smith - @subtee
https://atomicredteam.io/
https://github.com/redcanaryco/atomic-red-team
▪ NORMAL = used with /u option
How to Detect Malicious Behavior
Check chain of execution &
Child Processes
▪ May be launched from Office utilities, including:
○ Excel, Publisher, PowerPoint, Visio, Word, etc.
What on earth!
Here’s an Interesting
Thing!
We found a weird macro that was doing weird stuff
OLEVBA
Paul Michaud (@burning_pm)
https://github.com/decalage2/oletools/blob/master/oletools/olevba.py
Environ
Paul Michaud (@burning_pm)
RootDSE
Paul Michaud (@burning_pm)
Active Directory Service Interface (ADSI)
FEEDBACK
Q & A

More Related Content

What's hot

Forensics perspective ERFA-møde marts 2017
 Forensics perspective ERFA-møde marts 2017 Forensics perspective ERFA-møde marts 2017
Forensics perspective ERFA-møde marts 2017
J Hartig
 
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
 
Dracos forensic flavor
Dracos forensic flavorDracos forensic flavor
Dracos forensic flavor
Satria Ady Pradana
 
Bz backtrack.usage
Bz backtrack.usageBz backtrack.usage
Bz backtrack.usage
djenoalbania
 
NSC #2 - Challenge Solution
NSC #2 - Challenge SolutionNSC #2 - Challenge Solution
NSC #2 - Challenge Solution
NoSuchCon
 
"Into the Fog The Return of ICEFOG APT" - Chi en (Ashley) Shen
"Into the Fog The Return of ICEFOG APT" - Chi en (Ashley) Shen"Into the Fog The Return of ICEFOG APT" - Chi en (Ashley) Shen
"Into the Fog The Return of ICEFOG APT" - Chi en (Ashley) Shen
PROIDEA
 
Egress-Assess and Owning Data Exfiltration
Egress-Assess and Owning Data ExfiltrationEgress-Assess and Owning Data Exfiltration
Egress-Assess and Owning Data Exfiltration
CTruncer
 
The day I ruled the world (RootedCON 2020)
The day I ruled the world (RootedCON 2020)The day I ruled the world (RootedCON 2020)
The day I ruled the world (RootedCON 2020)
Javier Junquera
 
Security Onion Conference - 2016
Security Onion Conference - 2016Security Onion Conference - 2016
Security Onion Conference - 2016
DefensiveDepth
 
Catching fileless attacks
Catching fileless attacksCatching fileless attacks
Catching fileless attacks
Balaji Rajasekaran
 

What's hot (10)

Forensics perspective ERFA-møde marts 2017
 Forensics perspective ERFA-møde marts 2017 Forensics perspective ERFA-møde marts 2017
Forensics perspective ERFA-møde marts 2017
 
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?"
 
Dracos forensic flavor
Dracos forensic flavorDracos forensic flavor
Dracos forensic flavor
 
Bz backtrack.usage
Bz backtrack.usageBz backtrack.usage
Bz backtrack.usage
 
NSC #2 - Challenge Solution
NSC #2 - Challenge SolutionNSC #2 - Challenge Solution
NSC #2 - Challenge Solution
 
"Into the Fog The Return of ICEFOG APT" - Chi en (Ashley) Shen
"Into the Fog The Return of ICEFOG APT" - Chi en (Ashley) Shen"Into the Fog The Return of ICEFOG APT" - Chi en (Ashley) Shen
"Into the Fog The Return of ICEFOG APT" - Chi en (Ashley) Shen
 
Egress-Assess and Owning Data Exfiltration
Egress-Assess and Owning Data ExfiltrationEgress-Assess and Owning Data Exfiltration
Egress-Assess and Owning Data Exfiltration
 
The day I ruled the world (RootedCON 2020)
The day I ruled the world (RootedCON 2020)The day I ruled the world (RootedCON 2020)
The day I ruled the world (RootedCON 2020)
 
Security Onion Conference - 2016
Security Onion Conference - 2016Security Onion Conference - 2016
Security Onion Conference - 2016
 
Catching fileless attacks
Catching fileless attacksCatching fileless attacks
Catching fileless attacks
 

Similar to Fun with Macros & Other Sneaky Tricks to Avoid Detection - SANS Manchester 2020

I got 99 trends and a # is all of them
I got 99 trends and a # is all of themI got 99 trends and a # is all of them
I got 99 trends and a # is all of them
Roberto Suggi Liverani
 
Try {stuff} Catch {hopefully not} - Evading Detection & Covering Tracks
Try {stuff} Catch {hopefully not} - Evading Detection & Covering TracksTry {stuff} Catch {hopefully not} - Evading Detection & Covering Tracks
Try {stuff} Catch {hopefully not} - Evading Detection & Covering Tracks
Yossi Sassi
 
InSecure Remote Operations - NullCon 2023 by Yossi Sassi
InSecure Remote Operations - NullCon 2023 by Yossi SassiInSecure Remote Operations - NullCon 2023 by Yossi Sassi
InSecure Remote Operations - NullCon 2023 by Yossi Sassi
Yossi Sassi
 
Fantastic Red Team Attacks and How to Find Them
Fantastic Red Team Attacks and How to Find ThemFantastic Red Team Attacks and How to Find Them
Fantastic Red Team Attacks and How to Find Them
Ross Wolf
 
Super Easy Memory Forensics
Super Easy Memory ForensicsSuper Easy Memory Forensics
Super Easy Memory Forensics
IIJ
 
STIX Patterning: Viva la revolución!
STIX Patterning: Viva la revolución!STIX Patterning: Viva la revolución!
STIX Patterning: Viva la revolución!
treyka
 
Course_Presentation cyber --------------.pptx
Course_Presentation cyber --------------.pptxCourse_Presentation cyber --------------.pptx
Course_Presentation cyber --------------.pptx
ssuser020436
 
How We Analyzed 1000 Dumps in One Day - Dina Goldshtein, Brightsource - DevOp...
How We Analyzed 1000 Dumps in One Day - Dina Goldshtein, Brightsource - DevOp...How We Analyzed 1000 Dumps in One Day - Dina Goldshtein, Brightsource - DevOp...
How We Analyzed 1000 Dumps in One Day - Dina Goldshtein, Brightsource - DevOp...
DevOpsDays Tel Aviv
 
Thick Application Penetration Testing: Crash Course
Thick Application Penetration Testing: Crash CourseThick Application Penetration Testing: Crash Course
Thick Application Penetration Testing: Crash Course
Scott Sutherland
 
Enterprise Cloud Security
Enterprise Cloud SecurityEnterprise Cloud Security
Enterprise Cloud Security
MongoDB
 
2023 NCIT: Introduction to Intrusion Detection
2023 NCIT: Introduction to Intrusion Detection2023 NCIT: Introduction to Intrusion Detection
2023 NCIT: Introduction to Intrusion Detection
APNIC
 
Database Firewall with Snort
Database Firewall with SnortDatabase Firewall with Snort
Database Firewall with Snort
Narudom Roongsiriwong, CISSP
 
Real World Application Threat Modelling By Example
Real World Application Threat Modelling By ExampleReal World Application Threat Modelling By Example
Real World Application Threat Modelling By Example
NCC Group
 
How to Shot Web - Jason Haddix at DEFCON 23 - See it Live: Details in Descrip...
How to Shot Web - Jason Haddix at DEFCON 23 - See it Live: Details in Descrip...How to Shot Web - Jason Haddix at DEFCON 23 - See it Live: Details in Descrip...
How to Shot Web - Jason Haddix at DEFCON 23 - See it Live: Details in Descrip...
bugcrowd
 
Jaime Blasco - Fighting Advanced Persistent Threat (APT) with Open Source Too...
Jaime Blasco - Fighting Advanced Persistent Threat (APT) with Open Source Too...Jaime Blasco - Fighting Advanced Persistent Threat (APT) with Open Source Too...
Jaime Blasco - Fighting Advanced Persistent Threat (APT) with Open Source Too...
RootedCON
 
Thick Application Penetration Testing - A Crash Course
Thick Application Penetration Testing - A Crash CourseThick Application Penetration Testing - A Crash Course
Thick Application Penetration Testing - A Crash Course
NetSPI
 
OSSEC Holidaycon 2020.pdf
OSSEC Holidaycon 2020.pdfOSSEC Holidaycon 2020.pdf
OSSEC Holidaycon 2020.pdf
Mohamed Taoufik TEKAYA
 
Mitigating Java Deserialization attacks from within the JVM (improved version)
Mitigating Java Deserialization attacks from within the JVM (improved version)Mitigating Java Deserialization attacks from within the JVM (improved version)
Mitigating Java Deserialization attacks from within the JVM (improved version)
Apostolos Giannakidis
 
[HES2013] Virtually secure, analysis to remote root 0day on an industry leadi...
[HES2013] Virtually secure, analysis to remote root 0day on an industry leadi...[HES2013] Virtually secure, analysis to remote root 0day on an industry leadi...
[HES2013] Virtually secure, analysis to remote root 0day on an industry leadi...
Hackito Ergo Sum
 
Stop pulling the plug
Stop pulling the plugStop pulling the plug
Stop pulling the plug
Kamal Rathaur
 

Similar to Fun with Macros & Other Sneaky Tricks to Avoid Detection - SANS Manchester 2020 (20)

I got 99 trends and a # is all of them
I got 99 trends and a # is all of themI got 99 trends and a # is all of them
I got 99 trends and a # is all of them
 
Try {stuff} Catch {hopefully not} - Evading Detection & Covering Tracks
Try {stuff} Catch {hopefully not} - Evading Detection & Covering TracksTry {stuff} Catch {hopefully not} - Evading Detection & Covering Tracks
Try {stuff} Catch {hopefully not} - Evading Detection & Covering Tracks
 
InSecure Remote Operations - NullCon 2023 by Yossi Sassi
InSecure Remote Operations - NullCon 2023 by Yossi SassiInSecure Remote Operations - NullCon 2023 by Yossi Sassi
InSecure Remote Operations - NullCon 2023 by Yossi Sassi
 
Fantastic Red Team Attacks and How to Find Them
Fantastic Red Team Attacks and How to Find ThemFantastic Red Team Attacks and How to Find Them
Fantastic Red Team Attacks and How to Find Them
 
Super Easy Memory Forensics
Super Easy Memory ForensicsSuper Easy Memory Forensics
Super Easy Memory Forensics
 
STIX Patterning: Viva la revolución!
STIX Patterning: Viva la revolución!STIX Patterning: Viva la revolución!
STIX Patterning: Viva la revolución!
 
Course_Presentation cyber --------------.pptx
Course_Presentation cyber --------------.pptxCourse_Presentation cyber --------------.pptx
Course_Presentation cyber --------------.pptx
 
How We Analyzed 1000 Dumps in One Day - Dina Goldshtein, Brightsource - DevOp...
How We Analyzed 1000 Dumps in One Day - Dina Goldshtein, Brightsource - DevOp...How We Analyzed 1000 Dumps in One Day - Dina Goldshtein, Brightsource - DevOp...
How We Analyzed 1000 Dumps in One Day - Dina Goldshtein, Brightsource - DevOp...
 
Thick Application Penetration Testing: Crash Course
Thick Application Penetration Testing: Crash CourseThick Application Penetration Testing: Crash Course
Thick Application Penetration Testing: Crash Course
 
Enterprise Cloud Security
Enterprise Cloud SecurityEnterprise Cloud Security
Enterprise Cloud Security
 
2023 NCIT: Introduction to Intrusion Detection
2023 NCIT: Introduction to Intrusion Detection2023 NCIT: Introduction to Intrusion Detection
2023 NCIT: Introduction to Intrusion Detection
 
Database Firewall with Snort
Database Firewall with SnortDatabase Firewall with Snort
Database Firewall with Snort
 
Real World Application Threat Modelling By Example
Real World Application Threat Modelling By ExampleReal World Application Threat Modelling By Example
Real World Application Threat Modelling By Example
 
How to Shot Web - Jason Haddix at DEFCON 23 - See it Live: Details in Descrip...
How to Shot Web - Jason Haddix at DEFCON 23 - See it Live: Details in Descrip...How to Shot Web - Jason Haddix at DEFCON 23 - See it Live: Details in Descrip...
How to Shot Web - Jason Haddix at DEFCON 23 - See it Live: Details in Descrip...
 
Jaime Blasco - Fighting Advanced Persistent Threat (APT) with Open Source Too...
Jaime Blasco - Fighting Advanced Persistent Threat (APT) with Open Source Too...Jaime Blasco - Fighting Advanced Persistent Threat (APT) with Open Source Too...
Jaime Blasco - Fighting Advanced Persistent Threat (APT) with Open Source Too...
 
Thick Application Penetration Testing - A Crash Course
Thick Application Penetration Testing - A Crash CourseThick Application Penetration Testing - A Crash Course
Thick Application Penetration Testing - A Crash Course
 
OSSEC Holidaycon 2020.pdf
OSSEC Holidaycon 2020.pdfOSSEC Holidaycon 2020.pdf
OSSEC Holidaycon 2020.pdf
 
Mitigating Java Deserialization attacks from within the JVM (improved version)
Mitigating Java Deserialization attacks from within the JVM (improved version)Mitigating Java Deserialization attacks from within the JVM (improved version)
Mitigating Java Deserialization attacks from within the JVM (improved version)
 
[HES2013] Virtually secure, analysis to remote root 0day on an industry leadi...
[HES2013] Virtually secure, analysis to remote root 0day on an industry leadi...[HES2013] Virtually secure, analysis to remote root 0day on an industry leadi...
[HES2013] Virtually secure, analysis to remote root 0day on an industry leadi...
 
Stop pulling the plug
Stop pulling the plugStop pulling the plug
Stop pulling the plug
 

Recently uploaded

Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
Claudio Di Ciccio
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
Rohit Gautam
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
ThomasParaiso2
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 

Recently uploaded (20)

Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 

Fun with Macros & Other Sneaky Tricks to Avoid Detection - SANS Manchester 2020

  • 1. Fun with Macros! And other sneaky tricks to avoid detection...
  • 2. ▪ SEC560 SANS Instructor ▪ Director, Incident Handling, Red Canary ▪ Nice guy ▪ Former radio broadcaster Greg Bailey Director, Incident Handling RED CANARY @GRBail Presenter
  • 3. What the heck is Endpoint Detection & Response (EDR)? What telemetry is collected? How do I bypass it? Sneaky Macros! Overview
  • 6. Endpoint Detection Response (EDR) Vendors THERE ARE LIKE 30 MORE BUT I STOPPED AT TEN
  • 10. WHAT DOES EDR COLLECT? Telemetry
  • 11. ▪ Process Telemetry (host, user, domain, proc, parent proc) ▪ Network Telemetry (port, IP, protocol, bytes transferred) ▪ File Modifications (action, path, name, hash, type) ▪ Module Loads (time, name, path, hash) ▪ Registry Data (time, action path, value) Windows Telemetry
  • 12. ▪ Process Telemetry (host, user, proc, parent proc) ▪ Network Telemetry (protocol, port, IP, bytes transferred) ▪ File Modifications (action, time, path, name, SHA, type) ▪ Module Loads (time, name, path, SHA) ▪ Binary Metadata (signature, version) Linux Telemetry A LOT of noise!
  • 13. ▪ Process Telemetry (host, user, hash, proc, parent proc) ▪ Network Telemetry (IP, port, protocol, bytes transferred) ▪ File Modifications (action, path, name, hash, type) ▪ Binary Metadata (digital signature, file version metadata) MacOS Telemetry Not a lot of detection capabilities!
  • 14. THEY CAN SEE EVERYTHING! What’s a Red Team to do?
  • 16.
  • 17. If an EDR platform can’t see it, did it actually happen? Evasion Techniques
  • 20. ▪ Be a Microsoft-signed file, either native to the OS or downloaded from Microsoft. ▪ Have extra "unexpected" functionality. It is not interesting to document intended use cases. ▪ Exceptions are application whitelisting bypasses ▪ Have functionality that would be useful to an APT or red team LOLBins/LOLScripts - Criteria https://github.com/LOLBAS-Project/LOLBAS
  • 21. Executing Code ▪ Arbitrary code execution ▪ Pass-through execution of other programs (unsigned) or scripts (via a LOLBin) Compiling Code File Operations ▪ Downloading ▪ Upload ▪ Copy Persistence ▪ Pass-through persistence utilizing existing LOLBin ▪ Persistence (e.g. hide data in ADS, execute at logon) LOLBin - functionality
  • 22. UAC bypass Credential theft Dumping process memory Surveillance (e.g. keylogger, network trace) Log evasion/modification DLL side-loading/hijacking without being relocated elsewhere in the filesystem. LOLBin - functionality
  • 23. Bitsadmin ▪ download/upload jobs and monitor progress ▪ Pass-through execution of other programs (unsigned) or scripts (via a LOLBin) certutil installutil csc LOLBin - Examples
  • 24. If an EDR platform generates data in the woods, do we see it? Evasion Techniques
  • 25. ▪ Bitsadmin is a LOLBin ▪ Certutil is a LOLBin ▪ InstallUtil is another LOLBin Let’s Look at a few Techniques
  • 26. ▪ create download or upload jobs and monitor their progress bitsadmin https://docs.microsoft.com/en-us/windows/win32/bits/background-intelligent-transfer-service-portal
  • 27. Alternate Data Streams ▪ Defense evasion or persistence ▪ Execute specific file in ADS Download ▪ Download file from the internet Copy ▪ Copy file Execute ▪ Defense evasion ▪ Execute specified binary bitsadmin abuse Rob Fuller - @mubix Chris Gates - @carnal0wnage Oddvar Moe - @oddvarmoe
  • 28.
  • 29.
  • 30.
  • 32.
  • 33.
  • 34. How to Detect Malicious Behavior Additional flags, processes used for obfuscation Look for /AddFile flag Scheduled tasks for persistence
  • 35. ▪ A Microsoft signed binary, used to obtain Certificate Authority information and configure Certificate Services certutil https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/certutil
  • 36. Download ▪ Download file from the Internet Alternate Data Streams ▪ Download file from the internet and save it in NTFS Alternate Data Stream Encode ▪ Encode a file to evade defensive measures Decode ▪ Decode files to evade defensive measures certutil abuse Matt Graeber - @mattifestation Moriarty - @Moriarty_Meng egre55 - @egre55
  • 37.
  • 38. ▪ Just echo the encoded text and run certutil -decode certutil https://gist.github.com/mattifestation/47f9e8a431f96a266522
  • 39.
  • 40. ▪ NORMAL = decoding actual .pem, .cer, or pfx cert files ▪ NOT NORMAL = writing malicious payloads (.exe, scripts, archives) How to Detect Malicious Behavior Look for “certutil” && “decode” ▪ May be launched from Office utilities, including: ○ Excel, Publisher, PowerPoint, Visio, Word, etc.
  • 41.
  • 42. Download Files with certutil Certutil can be used to get around application whitelisting controls. When used in a malicious manner, it frequently has the -split option (used to split the embedded ASN.1 element and save to disk). Examples certutil -urlcache -split -f [file URL]
  • 43.
  • 44. ▪ A Microsoft signed binary used to install and uninstall resources by executing specific .NET binaries. installutil https://docs.microsoft.com/en-us/dotnet/framework/tools/installutil-exe-installer-tool https://attack.mitre.org/techniques/T1118/
  • 45. Application Whitelisting Bypass ▪ Execute the target .NET DLL or .EXE Execute ▪ Execute the target .NET DLL or .EXE installutil abuse Casey Smith - @subtee
  • 47.
  • 48.
  • 49.
  • 50. ▪ NORMAL = used with /u option How to Detect Malicious Behavior Check chain of execution & Child Processes ▪ May be launched from Office utilities, including: ○ Excel, Publisher, PowerPoint, Visio, Word, etc.
  • 51. What on earth! Here’s an Interesting Thing! We found a weird macro that was doing weird stuff
  • 54. RootDSE Paul Michaud (@burning_pm) Active Directory Service Interface (ADSI)