SlideShare a Scribd company logo
Pen Testing
Devevelopment
Christopher Truncer
uid=0(@ChrisTruncer)
● Christopher Truncer (@ChrisTruncer)
β—‹ Open Source Software Developer, Veil Framework
Developer, Florida State Seminole
● Red Teamer, Pen Tester, and Security
Researcher for Mandiant
What’s this talk about?
● How I got started
● Security through Offense
β—‹ EyeWitness
β—‹ #avlol
β—‹ Own the Exfil
β—‹ Misconfigurations
● What (I think) makes successful hackers
β—‹ Your drive
β—‹ Scripting/Programming
● Tempt the demo gods throughout
How I Started
● College
β—‹ College computer security class
β—‹ Hack my roommate
β–  β€œWow, hacking is real”
● Tech background before Security
β—‹ Windows Admin
β—‹ Linux Admin - to learn
● Started the plunge into security
β—‹ No development experience
First Steps with Development
● Start small
β—‹ Veil wasn’t built in day :)
● Fix problems/tasks you always see
● Google and Stack Overflow
● Just try it...
● Nearly all upcoming case studies involve writing
some code
When Coding...
Pen Testing Development
Developing for
Offensive Operations
My Development Philosophy
● Develop a POC that does what you want
● Clean up your code, and add comments!
● Make it usable by everyone, not just you
● Contribute back and make it public
● Maintain your project
Version Control
● Use anything you’re comfortable with, but use it
β—‹ git - my choice (look at Github, it’s free)
β—‹ svn
β—‹ cvs
β—‹ etc…
● You will mess your code up
● You will delete your tools/scripts
● You will be thankful for checking in your code
EyeWitness
EyeWitness
● Problem: When dropped in large network
segments, we can see hundreds, if not
thousands of web applications. How do we know
which to attack?
EyeWitness
● Solution: Automate everything I would manually
have to do
● Mandatory:
β—‹ Screenshot web applications
β—‹ Check for default credentials
β—‹ Generate a usable report
● Optional:
β—‹ Make report β€œsections”
β—‹ Grab server headers
Google!
StackOverflow
Proof of Concept
Make it Usable
● File Input
β—‹ File, NMap, Nessus
● Web Timeouts
● Default Credential Checks
● Report Generation
β—‹ Create Sections
β–  High Value Targets
β–  Error Section
β–  etc.
Pen Testing Development
EyeWitness Stats
● Originally: 409 Lines
● Now: 3402 Lines
● Reasons:
β—‹ Login Signatures
β—‹ Multi-Threading
● Guess for the real
reason?
Pen Testing Development
#avlol
The Veil-Framework
● Problem: Antivirus can’t catch malware, but it
catches pentesters
● Goal: Bypass antivirus as easily as professional
malware developers
● Solution: A python-based framework for
generating shellcode and meterpreter injectors
As Always, Ask the Google
Have a POC… Next?
● Research obfuscation methods
β—‹ Look at existing malware
β—‹ Try encryption routines
● Generate random files from a template
β—‹ Framework might help
● Automate as much as possible
β—‹ I probably should make a framework...
Veil 1.0 - Released
● Small, single file
script
● Limited payloads
● It worked… better
than it really should
Next Steps...
● Don’t use a single script
β—‹ Maintenance can be a pain
β—‹ Not easily extensible
β—‹ A framework would be nice...
● Find a mentor
β—‹ Ability to ask questions is invaluable
β—‹ Learning & Collaboration opportunities
Teamed Up
● Teamed up with Will Schroeder (@harmj0y) and
Mike Wright (@themightyshiv)
● We had separate tools, so we combined code
bases
● @Harmj0y didn’t sleep and combined the code
β—‹ Took this as an opportunity to learn
framework development
Veil 2.0
Veil 2.0
● Fully modular framework
β—‹ Drag and drop payloads
● β€œLanguage agnostic”
β—‹ implement additional languages
● Easily Extensible
β—‹ common libraries/methods available
● Huge UI focus
β—‹ Tab completion, command line flags, etc.
The Veil-Framework
● We continued to come up with additional tools
which resulted in The Veil-Framework
β—‹ β€œA toolset aiming to bridge the gap between
pen testing and red team toolsets.”
● Veil renamed to Veil-Evasion
β—‹ Veil-Catapult - Initial payload delivery tool
β—‹ Veil-Pillage - Post-Exploitation and payload
delivery
State of The Veil-Framework
● Still an actively maintained project
● V-Day
β—‹ Victory over antivirus :)
β—‹ Since 9/15/2013 we’ve released at least one
new payload on the 15th of every month
● Hoping for community involvement
β—‹ hint hint… :)
Pen Testing Development
Egress-Assess
Attackers don’t just target this...
http://2we26u4fam7n16rz3a44uhbe1bq2.wpengine.netdna-cdn.com/wp-
content/uploads/041514_1356_MurderingDe30.png
What’s the point?
● End Goal - Money/Data
β—‹ Data - grab it, get it out
β—‹ !disrupt
β—‹ !deny
β—‹ !degrade,
β—‹ !destroy (maybe deceive)
β—‹ Not just shells anymore
...they target
this
Attacker C2 Comms
Tradecraft Evolution
● Pen Tests traditionally exploit vulnerabilities
β—‹ Find and exploit vulnerabilities
β—‹ Assess the security as a point in time
● Why not add in some exfiltration testing as
well?
β—‹ Attackers DO this, why not help prep our customers?
β—‹ Let’s emulate our threats
Our Solution
Pen Testing Development
What does it do?
● Standard client/server model
● Simulates data exfiltration
β—‹ Faux social security numbers or credit cards
β—‹ And now real files :)
● Exfil data over multiple protocols
Project Goals
● Fast to set up for use
● Minimal (if any)
configurations
required to work
● Lightweight and no
excessive
dependencies
● Exfiltrate data over
different protocols
● Modular framework
that allows easy
expansion of
capabilities
Project Goals
● Store all data/files transferred for proof of
transfer
β—‹ Stored in a specific directory
β—‹ Time and date stamped for correlation with blue team
logs
● Demonstrate different options for data
exfiltration and educate the blue team
Tunneling Protocols
Supported Tunneling Protocols
● Protocols merged into Egress-Assess
● ICMP
● SMB
● DNS
● DNS_Resolved
● HTTP
● HTTPS
● FTP
● SFTP
FTP and SFTP
● Generates faux data and writes it to disk, or
transfers a file specified by user
● Creates FTP or SFTP connection to server and
transfers the file to the server
● If faux data is used, it deletes the file
FTP Transfer
ICMP
● Takes advantage of ICMP type 8 (echo)
β—‹ Protocol allows you to specify the data used in
the echo request
● Splits data in 1100 byte chunks
● Base64 encodes data
● Uses encoded data for the echo
ICMP Transfer
DNS (Direct)
● Uses DNS TXT records
β—‹ Max 255 bytes
● Split data into chunks, base64 encode each chunk,
send packets directly to Egress-Assess server
● Multiple limitations when working with DNS
β—‹ Size restrictions, UDP, etc.
β–  We’d say a joke, but you might not get it :)
DNS (Direct) Transfer
DNS Info
● Other protocol modules work well, but fail when a
proxy is used
● Other tools have shown that DNS can be used as a
communications channel
β—‹ Cobalt Strike’s Beacon, dns tunnelling projects
(dnscat), etc.
β—‹ Began researching different methods to exfil data via
DNS
Why Use DNS
● β€œBut we don’t allow port 53 out!”
● Locked down environments can have proxies
● How many people inspect DNS?
β—‹ How many people only resolve certain domains?
β—‹ Can you block protocol compliant C2 comms or data
exfiltration attempts?
● Customer’s own DNS server FTW!
DNS (Resolved)
● Resolves local system’s nameserver
● Send request to system/network nameserver
β—‹ <base64encodeddata>.subdomain.domain.com
● Server listens for incoming DNS A record request
β—‹ Grabs record being requested, decodes it, and writes
data to disk
http://blog.cobaltstrike.com/2013/06/20/thatll-never-work-we-dont-allow-port-53-out/
DNS Resolved Setup
● Create DNS A record for your final destination
● Create NS Record for subdomain, point to A
record
https://www.christophertruncer.com/exfiltrate-data-via-dns-with-egress-
assess/
DNS (Direct) Transfer
More DNS Woes
https://docs.google.com/presentation/d/1HfXVJyXElzBshZ9SYNjBwJf_4MBaho6UcATTFwApfXw/preview?sle=true&slide=id.g2d0184395_097
https://docs.google.com/presentation/d/1HfXVJyXElzBshZ9SYNjBwJf_4MBaho6UcATTFwApfXw/preview?sle=true&slide=id.g34d85052a_
00
https://docs.google.com/presentation/d/1HfXVJyXElzBshZ9SYNjBwJf_4MBaho6UcATTFwApfXw/preview?sle=true&slide=id.g34d85052a_00
DNS Woes
● Leads to problems when transferring files
β—‹ Faux data, don’t need to preserve order, or 100%
integrity
β—‹ Binary files, this is a problem
● Currently working on essentially TCP over UDP
DNS transfers
Powershell all the things
● Same client modules as python client
● Simulate attackers from Windows systems
● Domain proxy support
● Deployable through Beacon, Meterpreter, etc..
Get-Help
HTTP Snort Capture
Pen Testing Development
What I Wish I Knew
What I wish I knew
● Programming/Scripting
β—‹ Start doing this
β—‹ You can literally control a computer, and
make it do exactly what you want
What I wish I knew
● Programming
β—‹ Get the theme? :)
● Mentor
β—‹ You’re always one step in front and one step
behind someone
● Build a lab and play with it
β—‹ You can’t break anything that costs money!
What I wish I knew
● Be prepared to be uncomfortable at times
β—‹ Always in a new environment with new β€œstuff”
and you’re expected to break it
β—‹ Perk of the job too :)
● Build your process
β—‹ Learn how you best approach networks, web
apps, etc.
β—‹ Use this to face what you don’t know
The difference between a new and
experienced hacker is the experienced hacker
can count on their problem solving ability to
navigate an unknown environment.
?
● Chris Truncer
β—‹ @ChrisTruncer
β—‹ CTruncer@christophertruncer.com
β—‹ https://www.christophertruncer.com
β—‹ https://github.com/ChrisTruncer

More Related Content

PPTX
Pen Testing, Red Teaming, and More
PDF
What Goes In Must Come Out: Egress-Assess and Data Exfiltration
PDF
Bringing Down the House - How One Python Script Ruled Over AntiVirus
PDF
The Art of AV Evasion - Or Lack Thereof
PDF
WordCamp Milwaukee 2012 - Aaron Saray - Secure Wordpress Coding
PDF
TestIstanbul May 2013 Keynote Experiences With Exploratory Testing
PDF
Open source tools - Test Management Summit - 2009
PDF
1.1. course introduction
Pen Testing, Red Teaming, and More
What Goes In Must Come Out: Egress-Assess and Data Exfiltration
Bringing Down the House - How One Python Script Ruled Over AntiVirus
The Art of AV Evasion - Or Lack Thereof
WordCamp Milwaukee 2012 - Aaron Saray - Secure Wordpress Coding
TestIstanbul May 2013 Keynote Experiences With Exploratory Testing
Open source tools - Test Management Summit - 2009
1.1. course introduction

What's hot (11)

PDF
Understanding and implementing website security
PDF
Unit testing in PHP
PDF
earning by s/doing/h4ck1ng/ - Our experience learning application security th...
PDF
Evil testers guide to technical testing
PDF
Confessions of an Accidental Security Tester
PDF
Code Camp NYC 2017 - How to deal with everything... | Chris Ozog - Codesushi
PPTX
Entering the matrix
PDF
Distributed deep rl on spark strata singapore
PDF
Purple Team Exercise Framework Workshop #PTEF
PDF
The Evil tester's Guide to Web Testing
PDF
DEFCON Safe Mode - Red Team Village - Emulating Evil Corp and WastedLocker
Understanding and implementing website security
Unit testing in PHP
earning by s/doing/h4ck1ng/ - Our experience learning application security th...
Evil testers guide to technical testing
Confessions of an Accidental Security Tester
Code Camp NYC 2017 - How to deal with everything... | Chris Ozog - Codesushi
Entering the matrix
Distributed deep rl on spark strata singapore
Purple Team Exercise Framework Workshop #PTEF
The Evil tester's Guide to Web Testing
DEFCON Safe Mode - Red Team Village - Emulating Evil Corp and WastedLocker
Ad

Similar to Pen Testing Development (20)

PDF
Pentester++
PDF
An EyeWitness View into your Network
PDF
May The Data Stay with U! Network Data Exfiltration Techniques - Brucon 2017.
PDF
Egress-Assess and Owning Data Exfiltration
PDF
Higher Level Malware
PDF
Ever Present Persistence - Established Footholds Seen in the Wild
PDF
Secure Developer Access at Decisiv
PDF
Mp26 : Tachyon, sloppiness is bliss
PDF
The Supporting Role of Antivirus Evasion while Persisting
PDF
Introduction to Exploitation
PDF
Monitoring Big Data Systems - "The Simple Way"
PPTX
Hacker vs company, Cloud Cyber Security Automated with Kubernetes - Demi Ben-...
PDF
Thinking DevOps in the Era of the Cloud - Demi Ben-Ari
PPTX
Ple18 web-security-david-busby
ODP
Security and why you need to review yours.
PDF
Crikeycon 2019 Velociraptor Workshop
PDF
DevOops & How I hacked you DevopsDays DC June 2015
PDF
OpenSearch.pdf
PPTX
Course_Presentation cyber --------------.pptx
PDF
Hacking Vulnerable Websites to Bypass Firewalls
Pentester++
An EyeWitness View into your Network
May The Data Stay with U! Network Data Exfiltration Techniques - Brucon 2017.
Egress-Assess and Owning Data Exfiltration
Higher Level Malware
Ever Present Persistence - Established Footholds Seen in the Wild
Secure Developer Access at Decisiv
Mp26 : Tachyon, sloppiness is bliss
The Supporting Role of Antivirus Evasion while Persisting
Introduction to Exploitation
Monitoring Big Data Systems - "The Simple Way"
Hacker vs company, Cloud Cyber Security Automated with Kubernetes - Demi Ben-...
Thinking DevOps in the Era of the Cloud - Demi Ben-Ari
Ple18 web-security-david-busby
Security and why you need to review yours.
Crikeycon 2019 Velociraptor Workshop
DevOops & How I hacked you DevopsDays DC June 2015
OpenSearch.pdf
Course_Presentation cyber --------------.pptx
Hacking Vulnerable Websites to Bypass Firewalls
Ad

More from CTruncer (8)

PDF
BlackHat USA 2019 - WMImplant: An Offensive Use Case of WMI
PDF
Aggressive Autonomous Actions - Operating with Automation
PDF
Windows 10 - Endpoint Security Improvements and the Implant Since Windows 2000
PDF
AntiVirus Evasion Reconstructed - Veil 3.0
PDF
A Battle Against the Industry - Beating Antivirus for Meterpreter and More
PDF
Passive Intelligence Gathering and Analytics - It's All Just Metadata!
PPTX
Hacking - Breaking Into It
PDF
EyeWitness - A Web Application Triage Tool
BlackHat USA 2019 - WMImplant: An Offensive Use Case of WMI
Aggressive Autonomous Actions - Operating with Automation
Windows 10 - Endpoint Security Improvements and the Implant Since Windows 2000
AntiVirus Evasion Reconstructed - Veil 3.0
A Battle Against the Industry - Beating Antivirus for Meterpreter and More
Passive Intelligence Gathering and Analytics - It's All Just Metadata!
Hacking - Breaking Into It
EyeWitness - A Web Application Triage Tool

Recently uploaded (20)

PDF
Slides PDF The World Game (s) Eco Economic Epochs.pdf
PPT
tcp ip networks nd ip layering assotred slides
PDF
Unit-1 introduction to cyber security discuss about how to secure a system
PPTX
presentation_pfe-universite-molay-seltan.pptx
PPTX
INTERNET------BASICS-------UPDATED PPT PRESENTATION
PPTX
introduction about ICD -10 & ICD-11 ppt.pptx
PDF
Automated vs Manual WooCommerce to Shopify Migration_ Pros & Cons.pdf
PDF
πŸ’° π”πŠπ“πˆ πŠπ„πŒπ„ππ€ππ†π€π πŠπˆππ„π‘πŸ’πƒ π‡π€π‘πˆ 𝐈𝐍𝐈 πŸπŸŽπŸπŸ“ πŸ’°
Β 
PDF
Vigrab.top – Online Tool for Downloading and Converting Social Media Videos a...
PDF
Testing WebRTC applications at scale.pdf
PPTX
Introduction to Information and Communication Technology
PPTX
PptxGenJS_Demo_Chart_20250317130215833.pptx
PPTX
Internet___Basics___Styled_ presentation
PPTX
Introuction about ICD -10 and ICD-11 PPT.pptx
PPTX
artificial intelligence overview of it and more
PDF
RPKI Status Update, presented by Makito Lay at IDNOG 10
Β 
PPTX
QR Codes Qr codecodecodecodecocodedecodecode
PPTX
Digital Literacy And Online Safety on internet
PDF
The Internet -By the Numbers, Sri Lanka Edition
Β 
PDF
Sims 4 Historia para lo sims 4 para jugar
Slides PDF The World Game (s) Eco Economic Epochs.pdf
tcp ip networks nd ip layering assotred slides
Unit-1 introduction to cyber security discuss about how to secure a system
presentation_pfe-universite-molay-seltan.pptx
INTERNET------BASICS-------UPDATED PPT PRESENTATION
introduction about ICD -10 & ICD-11 ppt.pptx
Automated vs Manual WooCommerce to Shopify Migration_ Pros & Cons.pdf
πŸ’° π”πŠπ“πˆ πŠπ„πŒπ„ππ€ππ†π€π πŠπˆππ„π‘πŸ’πƒ π‡π€π‘πˆ 𝐈𝐍𝐈 πŸπŸŽπŸπŸ“ πŸ’°
Β 
Vigrab.top – Online Tool for Downloading and Converting Social Media Videos a...
Testing WebRTC applications at scale.pdf
Introduction to Information and Communication Technology
PptxGenJS_Demo_Chart_20250317130215833.pptx
Internet___Basics___Styled_ presentation
Introuction about ICD -10 and ICD-11 PPT.pptx
artificial intelligence overview of it and more
RPKI Status Update, presented by Makito Lay at IDNOG 10
Β 
QR Codes Qr codecodecodecodecocodedecodecode
Digital Literacy And Online Safety on internet
The Internet -By the Numbers, Sri Lanka Edition
Β 
Sims 4 Historia para lo sims 4 para jugar

Pen Testing Development

  • 2. uid=0(@ChrisTruncer) ● Christopher Truncer (@ChrisTruncer) β—‹ Open Source Software Developer, Veil Framework Developer, Florida State Seminole ● Red Teamer, Pen Tester, and Security Researcher for Mandiant
  • 3. What’s this talk about? ● How I got started ● Security through Offense β—‹ EyeWitness β—‹ #avlol β—‹ Own the Exfil β—‹ Misconfigurations ● What (I think) makes successful hackers β—‹ Your drive β—‹ Scripting/Programming ● Tempt the demo gods throughout
  • 4. How I Started ● College β—‹ College computer security class β—‹ Hack my roommate β–  β€œWow, hacking is real” ● Tech background before Security β—‹ Windows Admin β—‹ Linux Admin - to learn ● Started the plunge into security β—‹ No development experience
  • 5. First Steps with Development ● Start small β—‹ Veil wasn’t built in day :) ● Fix problems/tasks you always see ● Google and Stack Overflow ● Just try it... ● Nearly all upcoming case studies involve writing some code
  • 9. My Development Philosophy ● Develop a POC that does what you want ● Clean up your code, and add comments! ● Make it usable by everyone, not just you ● Contribute back and make it public ● Maintain your project
  • 10. Version Control ● Use anything you’re comfortable with, but use it β—‹ git - my choice (look at Github, it’s free) β—‹ svn β—‹ cvs β—‹ etc… ● You will mess your code up ● You will delete your tools/scripts ● You will be thankful for checking in your code
  • 12. EyeWitness ● Problem: When dropped in large network segments, we can see hundreds, if not thousands of web applications. How do we know which to attack?
  • 13. EyeWitness ● Solution: Automate everything I would manually have to do ● Mandatory: β—‹ Screenshot web applications β—‹ Check for default credentials β—‹ Generate a usable report ● Optional: β—‹ Make report β€œsections” β—‹ Grab server headers
  • 17. Make it Usable ● File Input β—‹ File, NMap, Nessus ● Web Timeouts ● Default Credential Checks ● Report Generation β—‹ Create Sections β–  High Value Targets β–  Error Section β–  etc.
  • 19. EyeWitness Stats ● Originally: 409 Lines ● Now: 3402 Lines ● Reasons: β—‹ Login Signatures β—‹ Multi-Threading ● Guess for the real reason?
  • 22. The Veil-Framework ● Problem: Antivirus can’t catch malware, but it catches pentesters ● Goal: Bypass antivirus as easily as professional malware developers ● Solution: A python-based framework for generating shellcode and meterpreter injectors
  • 23. As Always, Ask the Google
  • 24. Have a POC… Next? ● Research obfuscation methods β—‹ Look at existing malware β—‹ Try encryption routines ● Generate random files from a template β—‹ Framework might help ● Automate as much as possible β—‹ I probably should make a framework...
  • 25. Veil 1.0 - Released ● Small, single file script ● Limited payloads ● It worked… better than it really should
  • 26. Next Steps... ● Don’t use a single script β—‹ Maintenance can be a pain β—‹ Not easily extensible β—‹ A framework would be nice... ● Find a mentor β—‹ Ability to ask questions is invaluable β—‹ Learning & Collaboration opportunities
  • 27. Teamed Up ● Teamed up with Will Schroeder (@harmj0y) and Mike Wright (@themightyshiv) ● We had separate tools, so we combined code bases ● @Harmj0y didn’t sleep and combined the code β—‹ Took this as an opportunity to learn framework development
  • 29. Veil 2.0 ● Fully modular framework β—‹ Drag and drop payloads ● β€œLanguage agnostic” β—‹ implement additional languages ● Easily Extensible β—‹ common libraries/methods available ● Huge UI focus β—‹ Tab completion, command line flags, etc.
  • 30. The Veil-Framework ● We continued to come up with additional tools which resulted in The Veil-Framework β—‹ β€œA toolset aiming to bridge the gap between pen testing and red team toolsets.” ● Veil renamed to Veil-Evasion β—‹ Veil-Catapult - Initial payload delivery tool β—‹ Veil-Pillage - Post-Exploitation and payload delivery
  • 31. State of The Veil-Framework ● Still an actively maintained project ● V-Day β—‹ Victory over antivirus :) β—‹ Since 9/15/2013 we’ve released at least one new payload on the 15th of every month ● Hoping for community involvement β—‹ hint hint… :)
  • 34. Attackers don’t just target this... http://2we26u4fam7n16rz3a44uhbe1bq2.wpengine.netdna-cdn.com/wp- content/uploads/041514_1356_MurderingDe30.png
  • 35. What’s the point? ● End Goal - Money/Data β—‹ Data - grab it, get it out β—‹ !disrupt β—‹ !deny β—‹ !degrade, β—‹ !destroy (maybe deceive) β—‹ Not just shells anymore
  • 38. Tradecraft Evolution ● Pen Tests traditionally exploit vulnerabilities β—‹ Find and exploit vulnerabilities β—‹ Assess the security as a point in time ● Why not add in some exfiltration testing as well? β—‹ Attackers DO this, why not help prep our customers? β—‹ Let’s emulate our threats
  • 41. What does it do? ● Standard client/server model ● Simulates data exfiltration β—‹ Faux social security numbers or credit cards β—‹ And now real files :) ● Exfil data over multiple protocols
  • 42. Project Goals ● Fast to set up for use ● Minimal (if any) configurations required to work ● Lightweight and no excessive dependencies ● Exfiltrate data over different protocols ● Modular framework that allows easy expansion of capabilities
  • 43. Project Goals ● Store all data/files transferred for proof of transfer β—‹ Stored in a specific directory β—‹ Time and date stamped for correlation with blue team logs ● Demonstrate different options for data exfiltration and educate the blue team
  • 45. Supported Tunneling Protocols ● Protocols merged into Egress-Assess ● ICMP ● SMB ● DNS ● DNS_Resolved ● HTTP ● HTTPS ● FTP ● SFTP
  • 46. FTP and SFTP ● Generates faux data and writes it to disk, or transfers a file specified by user ● Creates FTP or SFTP connection to server and transfers the file to the server ● If faux data is used, it deletes the file
  • 48. ICMP ● Takes advantage of ICMP type 8 (echo) β—‹ Protocol allows you to specify the data used in the echo request ● Splits data in 1100 byte chunks ● Base64 encodes data ● Uses encoded data for the echo
  • 50. DNS (Direct) ● Uses DNS TXT records β—‹ Max 255 bytes ● Split data into chunks, base64 encode each chunk, send packets directly to Egress-Assess server ● Multiple limitations when working with DNS β—‹ Size restrictions, UDP, etc. β–  We’d say a joke, but you might not get it :)
  • 52. DNS Info ● Other protocol modules work well, but fail when a proxy is used ● Other tools have shown that DNS can be used as a communications channel β—‹ Cobalt Strike’s Beacon, dns tunnelling projects (dnscat), etc. β—‹ Began researching different methods to exfil data via DNS
  • 53. Why Use DNS ● β€œBut we don’t allow port 53 out!” ● Locked down environments can have proxies ● How many people inspect DNS? β—‹ How many people only resolve certain domains? β—‹ Can you block protocol compliant C2 comms or data exfiltration attempts? ● Customer’s own DNS server FTW!
  • 54. DNS (Resolved) ● Resolves local system’s nameserver ● Send request to system/network nameserver β—‹ <base64encodeddata>.subdomain.domain.com ● Server listens for incoming DNS A record request β—‹ Grabs record being requested, decodes it, and writes data to disk
  • 56. DNS Resolved Setup ● Create DNS A record for your final destination ● Create NS Record for subdomain, point to A record https://www.christophertruncer.com/exfiltrate-data-via-dns-with-egress- assess/
  • 62. DNS Woes ● Leads to problems when transferring files β—‹ Faux data, don’t need to preserve order, or 100% integrity β—‹ Binary files, this is a problem ● Currently working on essentially TCP over UDP DNS transfers
  • 63. Powershell all the things ● Same client modules as python client ● Simulate attackers from Windows systems ● Domain proxy support ● Deployable through Beacon, Meterpreter, etc..
  • 67. What I Wish I Knew
  • 68. What I wish I knew ● Programming/Scripting β—‹ Start doing this β—‹ You can literally control a computer, and make it do exactly what you want
  • 69. What I wish I knew ● Programming β—‹ Get the theme? :) ● Mentor β—‹ You’re always one step in front and one step behind someone ● Build a lab and play with it β—‹ You can’t break anything that costs money!
  • 70. What I wish I knew ● Be prepared to be uncomfortable at times β—‹ Always in a new environment with new β€œstuff” and you’re expected to break it β—‹ Perk of the job too :) ● Build your process β—‹ Learn how you best approach networks, web apps, etc. β—‹ Use this to face what you don’t know
  • 71. The difference between a new and experienced hacker is the experienced hacker can count on their problem solving ability to navigate an unknown environment.
  • 72. ? ● Chris Truncer β—‹ @ChrisTruncer β—‹ CTruncer@christophertruncer.com β—‹ https://www.christophertruncer.com β—‹ https://github.com/ChrisTruncer