Total E(A)gression
Evading IDS for stealthier Implants
Who am I ? Alvaro Folgado (@rebujacker)
● Product Security Engineer:
○ Software/Architecture Sec. Reviews …
○ Offensive AppSec,Bug Hunt,Research …
● Actual Projects:
○ Implant Framework:
■ Siesta Time C2 (Go)
■ Modular Bichito Implant (go,C++,...)
● Speaker:
Objective: Circumvent most of Network IDS
Last year I presented an Implant framework with different modules[1]:
● Network: https egress
● Gmail: Ability to transparently egress using gmail server
● [...]
“Give me a string to egress, and I shall hack the planet” – Rebujacker 2019
Feedback provided by a blue team engineer listening to my talk.
“Are you sure this is as stealthy? I think it is easy to detect your Implant by looking at client TLS”
There are relatively easy ways to fingerprint Client-Server software by just looking to some
handshake bytes of a encrypted flow.
This triggered my attention to be able to design a skeleton of a network module, that if shown
effective, could be used alongside different SaaS to egress without being detected.
[1] https://www.slideshare.net/AlvaroFolgadoRueda1/siestatime-defcon27-red-team-village
IDS Overview - DPI vs Non-DPI
Different ways to detect a malicious Implant by crawling the Corp
Network outbound packages
Deep Packet Inspection:
● You are able to scrutinize every package (Proxy TLS)
● Complex to deploy and use, need of fine grained rules
Non Deep Packet Inspection:
● Endpoint Information (IP Blocks,Domains,[...])
● Client/Server Software Fingerprint (OS Sock,Certificates,[...])
IDS Plan - Non DPI common IoC’s
IDS Plan - TLS Fingerprint
Deep Dive into TLS Fingerprinting
Before the encrypted connection happens (TLS) and the target application protocol is wrapped, client
and server provide a piece of information that is “unique” per client-Server software.
● You are able to detect with certain accuracy the client software engaging in a TLS connection
(ssh,putty,slack [....])
● You are able to detect with certain accuracy the server software that the previous client is
connecting to (ISS,apache,metasploit,cobalt strike[...])
● Matching both results (opt-in to apply some AI, etc...), you can extract a IoC (Indicator of
Compromise)
Analyzing plain-text TLS headers and extract a “hash” to compare against a public-shared DB. This
is similar to the “traditional” AV detection techniques but applied within network analysis field.
● The equivalent of “virustotal” for TLS hashes : https://ja3er.com/
[1] https://engineering.salesforce.com/tls-fingerprinting-with-ja3-and-ja3s-247362855967
[1] https://github.com/salesforce/ja3/blob/master/python/ja3.py#L218
Total E(A)gression   defcon
Objective: Mimic a rightful client TLS signature
● Idea A : Just configure your designed http client TLS configurations
○ Most of http client libraries (java, go, C#, [...]) they let you to modify a lot of properties, but not
every possible “RFC6066-Friendly” TLS Extension byte
○ And let’s forget about wrapping bytes in the right order...
● Idea B: Copy the entire “Client Hello” bytes and send them within the TCP socket
○ TLS handshake breaks
● Idea C: Modify Go Source Code
○ Complex changes, and framework can break [??]
○ Will not cover every situation [ongoing]
● Idea D: Modify OS Native libraries like openSSL [...]
[...]
[1] https://github.com/rebujacker/SiestaTime/blob/master/src/bichito/modules/network/gmail_Mimic.go#L148
[2] https://github.com/rebujacker/Rebugo/blob/master/tls/handshake_messages.go#L140
Objective: Wrap-Up Google Go gmail Library
● Once the go TLS libraries accept new configurations, these changes need to be
wrapped up within Golang Gmail Libraries:
○ Use gmail “Go Quickstart” credentials to request an access token. This will
need to be performed with the “new TLS” option
○ Query Gmail with the access token
[1] https://github.com/rebujacker/SiestaTime/blob/master/src/bichito/biComs.go#L106
[2] https://github.com/rebujacker/SiestaTime/blob/master/src/bichito/modules/network/gmail_Mimic.go#L158
[3] https://github.com/rebujacker/SiestaTime/blob/master/src/bichito/modules/network/gmail_Mimic.go#L173
What about Deep Packet Inspection?
● Let’s imagine they have a TLS Software Proxy (EG. PolarProxy), and certificates
deployed in every corp. Laptop:
○ Using String greps to generate “IoC” based on content
○ Use Cryptography (easy with a lot of already built native libraries)
● What about Human Eyes (threat Hunters):
○ Use techniques like Steganography
○ Some native libraries already created for this purpose [1]
[1] https://github.com/auyer/steganography
Total E(A)gression   defcon
Demo
Using Siesta Time Framework to Generate 2
Implants :
● Implant1, Using Normal Gmail Module with
Golang Fingerprint and get detected by
Suricata
● Implant2, Using “TLS Fingerprint Mimic”
and Gmail, bypass Suricata-JA3C
extensions rules
Total E(A)gression   defcon
How to Improve Detection? - Helping Defender
● Is there a way to TLS Fingerprint analysis? Can we Improve tools like JA3?
○ Improve tools like JA3:
■ More Granularity within TLS bytes. This will make the developer work on
implants harder
■ Analyze more “non-padding” bytes before encryption arrives
○ Fined Grained DPI techniques targeting the set of Open source/Commercial
implants strings and other similar payloads to Egress (difficult with mal. profiles)
○ AI matching to generate better IoC’s
○ […]
Total E(A)gression   defcon
How to Improve Detection? - Helping Defender
Focus on HIDS (EDR’s). Detecting common
malware patterns on interaction from the Implant
and target foothold’s Operating System
resources:
● Process Injections
● Use of key OS/API libraries to attack
● Process parent Spoofing, strange process
childrens from obvious “trojanizable”
software like office (Macros, etc...)
● Calls/Invoke into interpreters like
cmd,java,python...
Total E(A)gression   defcon
Thanks - Q&A
● Questions ! → @rebujacker (twitter,github [...])
● Repository/Code:
https://github.com/rebujacker/SiestaTime
https://github.com/rebujacker/Rebugo
https://siestatime.readthedocs.io/en/latest/
Sources/Notes
https://github.com/salesforce/ja3
https://engineering.salesforce.com/tls-fingerprinting-with-ja3-and-ja3s-247362855967
Notes
A lot of the elements and features are still buggy or not working! In the same
way, a lot can change in the near future ☺

More Related Content

PPTX
SiestaTime - Defcon27 Red Team Village
PDF
Developer's Guide to JavaScript and Web Cryptography
PDF
Pentester++
PPTX
Toni de la Fuente - Automate or die! How to survive to an attack in the Cloud...
PDF
[UniteKorea2013] Protecting your Android content
PDF
Securing TodoMVC Using the Web Cryptography API
PDF
Higher Level Malware
PDF
Veil-PowerView - NovaHackers
SiestaTime - Defcon27 Red Team Village
Developer's Guide to JavaScript and Web Cryptography
Pentester++
Toni de la Fuente - Automate or die! How to survive to an attack in the Cloud...
[UniteKorea2013] Protecting your Android content
Securing TodoMVC Using the Web Cryptography API
Higher Level Malware
Veil-PowerView - NovaHackers

What's hot (20)

PPTX
CheckPlease - Payload-Agnostic Implant Security
PDF
A Battle Against the Industry - Beating Antivirus for Meterpreter and More
PDF
AntiVirus Evasion Reconstructed - Veil 3.0
PDF
An Abusive Relationship with AngularJS by Mario Heiderich - CODE BLUE 2015
PDF
Snake bites : Python for Pentesters
PPTX
BlueHat 2014 - The Attacker's View of Windows Authentication and Post Exploit...
PPTX
The Veil-Framework
PDF
Bringing Down the House - How One Python Script Ruled Over AntiVirus
PDF
Jwt == insecurity?
PDF
SpecterOps Webinar Week - Kerberoasting Revisisted
PDF
The Art of AV Evasion - Or Lack Thereof
PDF
CheckPlease: Payload-Agnostic Targeted Malware
PDF
"Revenge of The Script Kiddies: Current Day Uses of Automated Scripts by Top ...
PDF
The Supporting Role of Antivirus Evasion while Persisting
PDF
Cryptography In The Browser Using JavaScript
PDF
Socially Acceptable Methods to Walk in the Front Door
PDF
Java script and web cryptography (cf.objective)
PPTX
Offensive Python for Pentesting
PPTX
Patching Windows Executables with the Backdoor Factory | DerbyCon 2013
PDF
XP Days 2019: First secret delivery for modern cloud-native applications
CheckPlease - Payload-Agnostic Implant Security
A Battle Against the Industry - Beating Antivirus for Meterpreter and More
AntiVirus Evasion Reconstructed - Veil 3.0
An Abusive Relationship with AngularJS by Mario Heiderich - CODE BLUE 2015
Snake bites : Python for Pentesters
BlueHat 2014 - The Attacker's View of Windows Authentication and Post Exploit...
The Veil-Framework
Bringing Down the House - How One Python Script Ruled Over AntiVirus
Jwt == insecurity?
SpecterOps Webinar Week - Kerberoasting Revisisted
The Art of AV Evasion - Or Lack Thereof
CheckPlease: Payload-Agnostic Targeted Malware
"Revenge of The Script Kiddies: Current Day Uses of Automated Scripts by Top ...
The Supporting Role of Antivirus Evasion while Persisting
Cryptography In The Browser Using JavaScript
Socially Acceptable Methods to Walk in the Front Door
Java script and web cryptography (cf.objective)
Offensive Python for Pentesting
Patching Windows Executables with the Backdoor Factory | DerbyCon 2013
XP Days 2019: First secret delivery for modern cloud-native applications
Ad

Similar to Total E(A)gression defcon (20)

PDF
tHE GENERATION AND USE OF TLS FINGERPRINGTS
PDF
[CLASS 2014] Palestra Técnica - Jonathan Knudsen
PDF
New Security Mechanisms for Network Time Synchronization Protocols
PDF
Telecom security from ss7 to all ip all-open-v3-zeronights
PDF
Philippe Langlois - 3G and LTE insecurity from the radio to the core network ...
PDF
DEF CON 27 - ORANGE TSAI and MEH CHANG - infiltrating corporate intranet like...
PDF
Understanding Wireguard, TLS and Workload Identity
PDF
Towards Universitas Indonesia Next Generation Firewall Service - Tonny | GNOM...
PDF
How we found a firewall vendor bug using Teleport as a bastion jump host
PDF
OSDC 2014: Christopher Kunz - Software defined networking in an open-source c...
PDF
Https interception
PPTX
Keynote - Closing the TLS Authentication Gap
PDF
How (un)secure is SSL/TLS?
DOCX
Deciphering Malware’s use of TLS (withoutDecryption)Blak.docx
PPTX
ION Sri Lanka - TLS for Network Operators
PDF
TLS Optimization
PDF
Tlsoptimizationprint 120224194603-phpapp02
PDF
Single Packet Authorization - Slides English
PDF
EMULATING TRUSTED PLATFORM MODULE 2.0 ON RASPBERRY PI 2
PDF
Emulating Trusted Platform Module 2.0 on Raspberry Pi 2
tHE GENERATION AND USE OF TLS FINGERPRINGTS
[CLASS 2014] Palestra Técnica - Jonathan Knudsen
New Security Mechanisms for Network Time Synchronization Protocols
Telecom security from ss7 to all ip all-open-v3-zeronights
Philippe Langlois - 3G and LTE insecurity from the radio to the core network ...
DEF CON 27 - ORANGE TSAI and MEH CHANG - infiltrating corporate intranet like...
Understanding Wireguard, TLS and Workload Identity
Towards Universitas Indonesia Next Generation Firewall Service - Tonny | GNOM...
How we found a firewall vendor bug using Teleport as a bastion jump host
OSDC 2014: Christopher Kunz - Software defined networking in an open-source c...
Https interception
Keynote - Closing the TLS Authentication Gap
How (un)secure is SSL/TLS?
Deciphering Malware’s use of TLS (withoutDecryption)Blak.docx
ION Sri Lanka - TLS for Network Operators
TLS Optimization
Tlsoptimizationprint 120224194603-phpapp02
Single Packet Authorization - Slides English
EMULATING TRUSTED PLATFORM MODULE 2.0 ON RASPBERRY PI 2
Emulating Trusted Platform Module 2.0 on Raspberry Pi 2
Ad

Recently uploaded (20)

PDF
The Dynamic Duo Transforming Financial Accounting Systems Through Modern Expe...
PDF
Topaz Photo AI Crack New Download (Latest 2025)
PPTX
Download Adobe Photoshop Crack 2025 Free
PDF
Microsoft Office 365 Crack Download Free
PPTX
4Seller: The All-in-One Multi-Channel E-Commerce Management Platform for Glob...
PDF
E-Commerce Website Development Companyin india
PDF
EaseUS PDF Editor Pro 6.2.0.2 Crack with License Key 2025
DOCX
How to Use SharePoint as an ISO-Compliant Document Management System
PDF
How Tridens DevSecOps Ensures Compliance, Security, and Agility
PDF
Multiverse AI Review 2025: Access All TOP AI Model-Versions!
PPTX
Computer Software - Technology and Livelihood Education
PDF
Ableton Live Suite for MacOS Crack Full Download (Latest 2025)
PDF
Top 10 Software Development Trends to Watch in 2025 🚀.pdf
PPTX
MLforCyber_MLDataSetsandFeatures_Presentation.pptx
PDF
iTop VPN Crack Latest Version Full Key 2025
DOCX
Modern SharePoint Intranet Templates That Boost Employee Engagement in 2025.docx
PDF
novaPDF Pro 11.9.482 Crack + License Key [Latest 2025]
PDF
Introduction to Ragic - #1 No Code Tool For Digitalizing Your Business Proces...
PPTX
Lecture 5 Software Requirement Engineering
PPTX
Matchmaking for JVMs: How to Pick the Perfect GC Partner
The Dynamic Duo Transforming Financial Accounting Systems Through Modern Expe...
Topaz Photo AI Crack New Download (Latest 2025)
Download Adobe Photoshop Crack 2025 Free
Microsoft Office 365 Crack Download Free
4Seller: The All-in-One Multi-Channel E-Commerce Management Platform for Glob...
E-Commerce Website Development Companyin india
EaseUS PDF Editor Pro 6.2.0.2 Crack with License Key 2025
How to Use SharePoint as an ISO-Compliant Document Management System
How Tridens DevSecOps Ensures Compliance, Security, and Agility
Multiverse AI Review 2025: Access All TOP AI Model-Versions!
Computer Software - Technology and Livelihood Education
Ableton Live Suite for MacOS Crack Full Download (Latest 2025)
Top 10 Software Development Trends to Watch in 2025 🚀.pdf
MLforCyber_MLDataSetsandFeatures_Presentation.pptx
iTop VPN Crack Latest Version Full Key 2025
Modern SharePoint Intranet Templates That Boost Employee Engagement in 2025.docx
novaPDF Pro 11.9.482 Crack + License Key [Latest 2025]
Introduction to Ragic - #1 No Code Tool For Digitalizing Your Business Proces...
Lecture 5 Software Requirement Engineering
Matchmaking for JVMs: How to Pick the Perfect GC Partner

Total E(A)gression defcon

  • 1. Total E(A)gression Evading IDS for stealthier Implants
  • 2. Who am I ? Alvaro Folgado (@rebujacker) ● Product Security Engineer: ○ Software/Architecture Sec. Reviews … ○ Offensive AppSec,Bug Hunt,Research … ● Actual Projects: ○ Implant Framework: ■ Siesta Time C2 (Go) ■ Modular Bichito Implant (go,C++,...) ● Speaker:
  • 3. Objective: Circumvent most of Network IDS Last year I presented an Implant framework with different modules[1]: ● Network: https egress ● Gmail: Ability to transparently egress using gmail server ● [...] “Give me a string to egress, and I shall hack the planet” – Rebujacker 2019 Feedback provided by a blue team engineer listening to my talk. “Are you sure this is as stealthy? I think it is easy to detect your Implant by looking at client TLS” There are relatively easy ways to fingerprint Client-Server software by just looking to some handshake bytes of a encrypted flow. This triggered my attention to be able to design a skeleton of a network module, that if shown effective, could be used alongside different SaaS to egress without being detected. [1] https://www.slideshare.net/AlvaroFolgadoRueda1/siestatime-defcon27-red-team-village
  • 4. IDS Overview - DPI vs Non-DPI Different ways to detect a malicious Implant by crawling the Corp Network outbound packages Deep Packet Inspection: ● You are able to scrutinize every package (Proxy TLS) ● Complex to deploy and use, need of fine grained rules Non Deep Packet Inspection: ● Endpoint Information (IP Blocks,Domains,[...]) ● Client/Server Software Fingerprint (OS Sock,Certificates,[...])
  • 5. IDS Plan - Non DPI common IoC’s
  • 6. IDS Plan - TLS Fingerprint
  • 7. Deep Dive into TLS Fingerprinting Before the encrypted connection happens (TLS) and the target application protocol is wrapped, client and server provide a piece of information that is “unique” per client-Server software. ● You are able to detect with certain accuracy the client software engaging in a TLS connection (ssh,putty,slack [....]) ● You are able to detect with certain accuracy the server software that the previous client is connecting to (ISS,apache,metasploit,cobalt strike[...]) ● Matching both results (opt-in to apply some AI, etc...), you can extract a IoC (Indicator of Compromise) Analyzing plain-text TLS headers and extract a “hash” to compare against a public-shared DB. This is similar to the “traditional” AV detection techniques but applied within network analysis field. ● The equivalent of “virustotal” for TLS hashes : https://ja3er.com/ [1] https://engineering.salesforce.com/tls-fingerprinting-with-ja3-and-ja3s-247362855967
  • 10. Objective: Mimic a rightful client TLS signature ● Idea A : Just configure your designed http client TLS configurations ○ Most of http client libraries (java, go, C#, [...]) they let you to modify a lot of properties, but not every possible “RFC6066-Friendly” TLS Extension byte ○ And let’s forget about wrapping bytes in the right order... ● Idea B: Copy the entire “Client Hello” bytes and send them within the TCP socket ○ TLS handshake breaks ● Idea C: Modify Go Source Code ○ Complex changes, and framework can break [??] ○ Will not cover every situation [ongoing] ● Idea D: Modify OS Native libraries like openSSL [...] [...]
  • 12. Objective: Wrap-Up Google Go gmail Library ● Once the go TLS libraries accept new configurations, these changes need to be wrapped up within Golang Gmail Libraries: ○ Use gmail “Go Quickstart” credentials to request an access token. This will need to be performed with the “new TLS” option ○ Query Gmail with the access token
  • 14. What about Deep Packet Inspection? ● Let’s imagine they have a TLS Software Proxy (EG. PolarProxy), and certificates deployed in every corp. Laptop: ○ Using String greps to generate “IoC” based on content ○ Use Cryptography (easy with a lot of already built native libraries) ● What about Human Eyes (threat Hunters): ○ Use techniques like Steganography ○ Some native libraries already created for this purpose [1] [1] https://github.com/auyer/steganography
  • 16. Demo Using Siesta Time Framework to Generate 2 Implants : ● Implant1, Using Normal Gmail Module with Golang Fingerprint and get detected by Suricata ● Implant2, Using “TLS Fingerprint Mimic” and Gmail, bypass Suricata-JA3C extensions rules
  • 18. How to Improve Detection? - Helping Defender ● Is there a way to TLS Fingerprint analysis? Can we Improve tools like JA3? ○ Improve tools like JA3: ■ More Granularity within TLS bytes. This will make the developer work on implants harder ■ Analyze more “non-padding” bytes before encryption arrives ○ Fined Grained DPI techniques targeting the set of Open source/Commercial implants strings and other similar payloads to Egress (difficult with mal. profiles) ○ AI matching to generate better IoC’s ○ […]
  • 20. How to Improve Detection? - Helping Defender Focus on HIDS (EDR’s). Detecting common malware patterns on interaction from the Implant and target foothold’s Operating System resources: ● Process Injections ● Use of key OS/API libraries to attack ● Process parent Spoofing, strange process childrens from obvious “trojanizable” software like office (Macros, etc...) ● Calls/Invoke into interpreters like cmd,java,python...
  • 22. Thanks - Q&A ● Questions ! → @rebujacker (twitter,github [...]) ● Repository/Code: https://github.com/rebujacker/SiestaTime https://github.com/rebujacker/Rebugo https://siestatime.readthedocs.io/en/latest/