SlideShare a Scribd company logo
1 of 72
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...
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.
EyeWitness Stats
● Originally: 409 Lines
● Now: 3402 Lines
● Reasons:
○ Login Signatures
○ Multi-Threading
● Guess for the real
reason?
#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… :)
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
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
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

What's hot

Understanding and implementing website security
Understanding and implementing website securityUnderstanding and implementing website security
Understanding and implementing website securityDrew Gorton
 
Unit testing in PHP
Unit testing in PHPUnit testing in PHP
Unit testing in PHPLee Boynton
 
earning by s/doing/h4ck1ng/ - Our experience learning application security th...
earning by s/doing/h4ck1ng/ - Our experience learning application security th...earning by s/doing/h4ck1ng/ - Our experience learning application security th...
earning by s/doing/h4ck1ng/ - Our experience learning application security th...NECST Lab @ Politecnico di Milano
 
Evil testers guide to technical testing
Evil testers guide to technical testingEvil testers guide to technical testing
Evil testers guide to technical testingAlan Richardson
 
Confessions of an Accidental Security Tester
Confessions of an Accidental Security TesterConfessions of an Accidental Security Tester
Confessions of an Accidental Security TesterAlan Richardson
 
Code Camp NYC 2017 - How to deal with everything... | Chris Ozog - Codesushi
Code Camp NYC 2017 - How to deal with everything... | Chris Ozog - Codesushi Code Camp NYC 2017 - How to deal with everything... | Chris Ozog - Codesushi
Code Camp NYC 2017 - How to deal with everything... | Chris Ozog - Codesushi Krzysztof (Chris) Ozog
 
Distributed deep rl on spark strata singapore
Distributed deep rl on spark   strata singaporeDistributed deep rl on spark   strata singapore
Distributed deep rl on spark strata singaporeAdam Gibson
 
Purple Team Exercise Framework Workshop #PTEF
Purple Team Exercise Framework Workshop #PTEFPurple Team Exercise Framework Workshop #PTEF
Purple Team Exercise Framework Workshop #PTEFJorge Orchilles
 
The Evil tester's Guide to Web Testing
The Evil tester's Guide to Web TestingThe Evil tester's Guide to Web Testing
The Evil tester's Guide to Web TestingAlan Richardson
 
DEFCON Safe Mode - Red Team Village - Emulating Evil Corp and WastedLocker
DEFCON Safe Mode - Red Team Village - Emulating Evil Corp and WastedLockerDEFCON Safe Mode - Red Team Village - Emulating Evil Corp and WastedLocker
DEFCON Safe Mode - Red Team Village - Emulating Evil Corp and WastedLockerJorge Orchilles
 

What's hot (11)

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

Similar to Pen Testing Development

Pentester++
Pentester++Pentester++
Pentester++CTruncer
 
An EyeWitness View into your Network
An EyeWitness View into your NetworkAn EyeWitness View into your Network
An EyeWitness View into your NetworkCTruncer
 
May The Data Stay with U! Network Data Exfiltration Techniques - Brucon 2017.
May The Data Stay with U! Network Data Exfiltration Techniques - Brucon 2017.May The Data Stay with U! Network Data Exfiltration Techniques - Brucon 2017.
May The Data Stay with U! Network Data Exfiltration Techniques - Brucon 2017.Leszek Mi?
 
Egress-Assess and Owning Data Exfiltration
Egress-Assess and Owning Data ExfiltrationEgress-Assess and Owning Data Exfiltration
Egress-Assess and Owning Data ExfiltrationCTruncer
 
Higher Level Malware
Higher Level MalwareHigher Level Malware
Higher Level MalwareCTruncer
 
Ever Present Persistence - Established Footholds Seen in the Wild
Ever Present Persistence - Established Footholds Seen in the WildEver Present Persistence - Established Footholds Seen in the Wild
Ever Present Persistence - Established Footholds Seen in the WildCTruncer
 
Secure Developer Access at Decisiv
Secure Developer Access at DecisivSecure Developer Access at Decisiv
Secure Developer Access at DecisivTeleport
 
Mp26 : Tachyon, sloppiness is bliss
Mp26 : Tachyon, sloppiness is blissMp26 : Tachyon, sloppiness is bliss
Mp26 : Tachyon, sloppiness is blissMontreal Python
 
The Supporting Role of Antivirus Evasion while Persisting
The Supporting Role of Antivirus Evasion while PersistingThe Supporting Role of Antivirus Evasion while Persisting
The Supporting Role of Antivirus Evasion while PersistingCTruncer
 
Monitoring Big Data Systems - "The Simple Way"
Monitoring Big Data Systems - "The Simple Way"Monitoring Big Data Systems - "The Simple Way"
Monitoring Big Data Systems - "The Simple Way"Demi Ben-Ari
 
Hacker vs company, Cloud Cyber Security Automated with Kubernetes - Demi Ben-...
Hacker vs company, Cloud Cyber Security Automated with Kubernetes - Demi Ben-...Hacker vs company, Cloud Cyber Security Automated with Kubernetes - Demi Ben-...
Hacker vs company, Cloud Cyber Security Automated with Kubernetes - Demi Ben-...Demi Ben-Ari
 
Thinking DevOps in the Era of the Cloud - Demi Ben-Ari
Thinking DevOps in the Era of the Cloud - Demi Ben-AriThinking DevOps in the Era of the Cloud - Demi Ben-Ari
Thinking DevOps in the Era of the Cloud - Demi Ben-AriDemi Ben-Ari
 
Ple18 web-security-david-busby
Ple18 web-security-david-busbyPle18 web-security-david-busby
Ple18 web-security-david-busbyDavid Busby, CISSP
 
Security and why you need to review yours.
Security and why you need to review yours.Security and why you need to review yours.
Security and why you need to review yours.David Busby, CISSP
 
Crikeycon 2019 Velociraptor Workshop
Crikeycon 2019 Velociraptor WorkshopCrikeycon 2019 Velociraptor Workshop
Crikeycon 2019 Velociraptor WorkshopVelocidex Enterprises
 
DevOops & How I hacked you DevopsDays DC June 2015
DevOops & How I hacked you DevopsDays DC June 2015DevOops & How I hacked you DevopsDays DC June 2015
DevOops & How I hacked you DevopsDays DC June 2015Chris Gates
 
OpenSearch.pdf
OpenSearch.pdfOpenSearch.pdf
OpenSearch.pdfAbhi Jain
 
Course_Presentation cyber --------------.pptx
Course_Presentation cyber --------------.pptxCourse_Presentation cyber --------------.pptx
Course_Presentation cyber --------------.pptxssuser020436
 
Hacking Vulnerable Websites to Bypass Firewalls
Hacking Vulnerable Websites to Bypass FirewallsHacking Vulnerable Websites to Bypass Firewalls
Hacking Vulnerable Websites to Bypass FirewallsNetsparker
 

Similar to Pen Testing Development (20)

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

More from CTruncer

BlackHat USA 2019 - WMImplant: An Offensive Use Case of WMI
BlackHat USA 2019 - WMImplant: An Offensive Use Case of WMIBlackHat USA 2019 - WMImplant: An Offensive Use Case of WMI
BlackHat USA 2019 - WMImplant: An Offensive Use Case of WMICTruncer
 
Aggressive Autonomous Actions - Operating with Automation
Aggressive Autonomous Actions - Operating with AutomationAggressive Autonomous Actions - Operating with Automation
Aggressive Autonomous Actions - Operating with AutomationCTruncer
 
Windows 10 - Endpoint Security Improvements and the Implant Since Windows 2000
Windows 10 - Endpoint Security Improvements and the Implant Since Windows 2000Windows 10 - Endpoint Security Improvements and the Implant Since Windows 2000
Windows 10 - Endpoint Security Improvements and the Implant Since Windows 2000CTruncer
 
AntiVirus Evasion Reconstructed - Veil 3.0
AntiVirus Evasion Reconstructed - Veil 3.0AntiVirus Evasion Reconstructed - Veil 3.0
AntiVirus Evasion Reconstructed - Veil 3.0CTruncer
 
A Battle Against the Industry - Beating Antivirus for Meterpreter and More
A Battle Against the Industry - Beating Antivirus for Meterpreter and MoreA Battle Against the Industry - Beating Antivirus for Meterpreter and More
A Battle Against the Industry - Beating Antivirus for Meterpreter and MoreCTruncer
 
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
 
Hacking - Breaking Into It
Hacking - Breaking Into ItHacking - Breaking Into It
Hacking - Breaking Into ItCTruncer
 
EyeWitness - A Web Application Triage Tool
EyeWitness - A Web Application Triage ToolEyeWitness - A Web Application Triage Tool
EyeWitness - A Web Application Triage ToolCTruncer
 

More from CTruncer (8)

BlackHat USA 2019 - WMImplant: An Offensive Use Case of WMI
BlackHat USA 2019 - WMImplant: An Offensive Use Case of WMIBlackHat USA 2019 - WMImplant: An Offensive Use Case of WMI
BlackHat USA 2019 - WMImplant: An Offensive Use Case of WMI
 
Aggressive Autonomous Actions - Operating with Automation
Aggressive Autonomous Actions - Operating with AutomationAggressive Autonomous Actions - Operating with Automation
Aggressive Autonomous Actions - Operating with Automation
 
Windows 10 - Endpoint Security Improvements and the Implant Since Windows 2000
Windows 10 - Endpoint Security Improvements and the Implant Since Windows 2000Windows 10 - Endpoint Security Improvements and the Implant Since Windows 2000
Windows 10 - Endpoint Security Improvements and the Implant Since Windows 2000
 
AntiVirus Evasion Reconstructed - Veil 3.0
AntiVirus Evasion Reconstructed - Veil 3.0AntiVirus Evasion Reconstructed - Veil 3.0
AntiVirus Evasion Reconstructed - Veil 3.0
 
A Battle Against the Industry - Beating Antivirus for Meterpreter and More
A Battle Against the Industry - Beating Antivirus for Meterpreter and MoreA Battle Against the Industry - Beating Antivirus for Meterpreter and More
A Battle Against the Industry - Beating Antivirus for Meterpreter and More
 
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!
 
Hacking - Breaking Into It
Hacking - Breaking Into ItHacking - Breaking Into It
Hacking - Breaking Into It
 
EyeWitness - A Web Application Triage Tool
EyeWitness - A Web Application Triage ToolEyeWitness - A Web Application Triage Tool
EyeWitness - A Web Application Triage Tool
 

Recently uploaded

Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Excelmac1
 
PHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationPHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationLinaWolf1
 
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一z xss
 
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一Fs
 
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Sonam Pathan
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITMgdsc13
 
Film cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasaFilm cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasa494f574xmv
 
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja VipCall Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja VipCall Girls Lucknow
 
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Dana Luther
 
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书zdzoqco
 
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)Christopher H Felton
 
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一Fs
 
Magic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMagic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMartaLoveguard
 
Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Paul Calvano
 
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作ys8omjxb
 
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012rehmti665
 

Recently uploaded (20)

Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...
 
PHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationPHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 Documentation
 
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
 
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
 
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
 
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
 
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
 
Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
 
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITM
 
Film cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasaFilm cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasa
 
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja VipCall Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
 
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
 
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
 
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
 
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
 
Magic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMagic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptx
 
Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24
 
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
 
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
 

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
  • 7.
  • 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.
  • 18.
  • 19. EyeWitness Stats ● Originally: 409 Lines ● Now: 3402 Lines ● Reasons: ○ Login Signatures ○ Multi-Threading ● Guess for the real reason?
  • 20.
  • 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… :)
  • 32.
  • 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
  • 40.
  • 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..
  • 66.
  • 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