SlideShare a Scribd company logo
1 of 51
Download to read offline
Pentester++ 
From sysadmin to Veil developer
uid=0(@christruncer) 
● Team Lead for Veris Group’s Adaptive 
Threat Division 
● Veil-Framework Co-Developer 
● Security Researcher 
● Interested in research or pen testing? 
Talk to me after :)
What’s this talk about? 
● Why scripting/development is essential 
● Case study driven by examining scenarios 
and resulting scripts 
● Largely Python based, but easily 
transferrable
Why Learn a Language? 
Make a computer do exactly what you want 
http://cdn4.thetechjournal.net/wp-content/uploads/2012/03/Control-PC-With-intendiX-SOCI-600x337.png
What to start with? 
Plenty of great options:
My Development Tips 
● Start small 
○ Veil wasn’t built in a day ;) 
● Find tasks that you commonly perform or 
fix a problem you’ve encountered 
● Pick a language you’re interested in 
● Google and StackOverflow 
● Dive in!
My Development Philosophy 
● Create a POC that meets your goal 
● Clean up your code and comment it 
● Make it usable by everyone, not just you 
● Make it publicly available 
● Maintain it
My Development Philosophy
So where did I start?
CCDC 
● Volunteered to help red-team a practice 
event 
● @mubix helped provide pointers 
○ Get scripts ready to fire 
○ Suggested creating resource scripts 
○ Prep for common exploits 
● Started building scripts to assist in our 
red-team workflow
Cortana 
● Created by Raphael 
Mudge (developer of 
Armitage and Cobalt 
Strike) 
● Event driven language, 
quite similar to any 
scripts you may have 
written for use on IRC… 
:)
Helping the Red Team 
● Problem: Blue teamers change 
passwords often 
● Goal: A solution that automatically grabs 
hashes on a set interval 
● Solution: Cortana Script
Start Small 
● Figure out what the script needs to do... 
● Get System Privs 
● Dump hashes 
● Repeat actions on an interval 
● Draw from existing examples 
○ https://github.com/rsmudge/cortana-scripts
https://github.com/rsmudge/cortana-scripts/blob/master/autoDiscover/autoAddEstablishedSessionHosts.cna 
https://github.com/rsmudge/cortana-scripts/blob/master/idlewatch/idlewatch.cna
https://github.com/rsmudge/cortana-scripts/blob/master/login_autopwn/login_autopwn.cna 
https://github.com/rsmudge/cortana-scripts/blob/master/raven/install.cna
Fruits of my Labor 
● Got my feet wet in a new language 
● Met the goals originally outlined 
○ System Privs 
○ Dump hashes 
○ Do it every so often 
● Made life a little harder for CCDC blue 
teamers :)
Let’s Write from Scratch 
● Try to find a (minor) problem/task that 
needs help at your work 
● Outline exactly what you need 
● Pick your language of choice
Learn the basics (FNG phase) 
● Hello world! 
● Basic data types (strings, integers, etc.) 
● Math, concatenation, loops, user-defined 
functions, etc.
Python and Hasher 
● Problem: The fastest way to check 
hashes on our tests were to submit them 
online… #opsecfail 
● Goal: Create a script that generates 
hashes and can perform comparisons 
between hashes and plaintext strings 
● Solution: Hasher :)
Hasher Requirements 
● Capability to do this without submitting 
hashes online 
● Create hash from plaintext string 
● Compare plaintext string and hash 
● Support multiple hash types
https://docs.python.org/2/library/hashlib.html & http://stackoverflow.com/questions/5297448/how-to-get-md5-sum-of-a-string
Version 0.1 
● We figured out the basic functionality 
● Now, start making it usable by others 
○ Add a basic menu structure 
○ Add functions that would be used (generate 
and compare) 
● Prepare for users…. (Error check)
ugh… users… and usability.. 
● Error checking - half your code :) 
● Don’t want a user to be able to crash 
your program 
○ Lack of usability can be the death of a 
project 
● Command line arguments? 
○ great for ease of use 
○ also for scriptability/third party integration
https://docs.python.org/2.7/library/argparse.html
Wrap it up! 
● Added ability to take command line 
arguments 
● Supports multiple hash types 
● Added the ability to generate hashes, or 
compare hash with plaintext
Version Control? 
● Use anything you are comfortable with 
○ git 
○ svn 
○ cvs 
○ etc… 
● You will mess your code up 
● You will delete your scripts/tools 
● You will be thankful for checking your 
code in somewhere
complexity++ 
moving beyond basic scripts
EyeWitness 
Goal: Wanted a tool to screenshot URLs, 
show default creds, generate a report, not 
use PhantomJS, and wanted a challenge. 
Existing: PeepingTom (@lanmaster53) 
https://bitbucket.org/LaNMaSteR53/peepingtom/
Google!
StackOverflow! 
http://stackoverflow.com/questions/16344700/take-a-screenshot-from-a-website-from-commandline-or- 
with-python
Ghost!
Create the POC
Improvements 
● File input: 
○ text 
○ nmap 
○ Nessus 
● Basic port scanning 
● Report generation 
● “Signatures” for default credentials 
● User Agent Switching/Comparison
Report Generation 
● Simple - HTML table tags 
● Store server header and screenshot 
● Multi-page reports 
● Link structure required multiple loops to 
create 
○ Counters are my friend
Some EyeWitness Info/Stats 
● Originally: 409 lines 
● Currently: 1762 
exactly 
● Reasons? 
○ port scanning 
○ dir name specification 
○ login signatures 
○ etc. 
● Real reason? 
○ what’s your best guess
Find Your True Calling 
#avlol
The Veil-Framework 
● Problem: antivirus can’t catch malware 
but does catch pentesters 
● Goal: a way to get around antivirus as 
easily as professional malware 
● Solution: a Python-based framework for 
generating shellcode injectors and 
Meterpreter stagers
As always, ask the Google
Have a POC ...next? 
● Research obfuscation methods 
○ Look at existing malware 
○ Try encryption routines 
● Generate random files off of template 
○ Framework might help 
● Automate as much as possible 
○ I probably should do a framework..
Released Veil 1.0 
● Small, single file 
script 
● Limited 
payloads 
● It worked 
○ better than it 
should have :)
Next steps 
● Don’t use a single script 
○ Maintaining can be a pain 
○ Not easily extensible 
○ A framework would be nice… 
● Find a mentor 
○ Ability to bounce questions is invaluable 
○ Learning opportunities 
○ Collaboration opportunities
Team Up 
● Teamed up with @harmj0y (formerly 
@the_grayhound) & @themightyshiv 
● We had separate tools, so we combined 
our work 
● @harmj0y didn’t sleep, combined code 
bases into a framework 
○ Took this as an opportunity to learn python-based 
framework capabilities
Veil 2.0
Veil 2.0 
● Fully modular framework 
○ drag-and-drop payloads! 
● “Language agnostic” 
○ implement additional language families 
○ check out @harmj0y’s presentation later! 
● Easily extensible 
○ common library methods/crypters 
● Huge UI focus 
○ tab completion, command line flags, etc.
How/What did I learn? 
● Went back to learning from “existing” 
code (framework from @harmj0y) 
● Learned to develop as a team (splitting 
tasks, accountability) 
● Learned proper version control (git) 
○ Don’t delete branches
The Veil-Framework 
● We started coming up with additional 
tool ideas, resulting in the “Veil- 
Framework” 
○ “A toolset aiming to bridge the gap 
between pentesting and red teaming 
capabilities” 
● Veil was renamed to Veil-Evasion 
○ Veil-Catapult: initial payload delivery 
system, released at Shmooon ‘14 
○ Veil-PowerView: network situational
The State of Veil-Evasion 
● Still an actively maintained project 
● V-Day 
○ for victory over antivirus :) 
○ since 9/15/2013, we’ve release at least one 
new payload on the 15th of every month 
● Hoping for community involvement 
○ hint.. hint… :)
Fin 
● Find something you’re 
passionate/interested in 
● Start small, and finish it 
● Make it usable and stable! Lack of 
usability and stability is death to a 
project. 
● Maintain it, and enjoy doing it
Questions? 
● @ChrisTruncer 
● https://github.com/christruncer 
● chris@christophertruncer.com 
● https://www.veil-framework.com/

More Related Content

What's hot

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
 
The State of the Veil Framework
The State of the Veil FrameworkThe State of the Veil Framework
The State of the Veil FrameworkVeilFramework
 
The Art of AV Evasion - Or Lack Thereof
The Art of AV Evasion - Or Lack ThereofThe Art of AV Evasion - Or Lack Thereof
The Art of AV Evasion - Or Lack ThereofCTruncer
 
Bringing Down the House - How One Python Script Ruled Over AntiVirus
Bringing Down the House - How One Python Script Ruled Over AntiVirusBringing Down the House - How One Python Script Ruled Over AntiVirus
Bringing Down the House - How One Python Script Ruled Over AntiVirusCTruncer
 
An EyeWitness View into your Network
An EyeWitness View into your NetworkAn EyeWitness View into your Network
An EyeWitness View into your NetworkCTruncer
 
CheckPlease: Payload-Agnostic Targeted Malware
CheckPlease: Payload-Agnostic Targeted MalwareCheckPlease: Payload-Agnostic Targeted Malware
CheckPlease: Payload-Agnostic Targeted MalwareBrandon Arvanaghi
 
Patching Windows Executables with the Backdoor Factory | DerbyCon 2013
Patching Windows Executables with the Backdoor Factory | DerbyCon 2013Patching Windows Executables with the Backdoor Factory | DerbyCon 2013
Patching Windows Executables with the Backdoor Factory | DerbyCon 2013midnite_runr
 
Hacking - Breaking Into It
Hacking - Breaking Into ItHacking - Breaking Into It
Hacking - Breaking Into ItCTruncer
 
Passive Intelligence Gathering and Analytics - It's All Just Metadata!
Passive Intelligence Gathering and Analytics - It's All Just Metadata!Passive Intelligence Gathering and Analytics - It's All Just Metadata!
Passive Intelligence Gathering and Analytics - It's All Just Metadata!CTruncer
 
What Goes In Must Come Out: Egress-Assess and Data Exfiltration
What Goes In Must Come Out: Egress-Assess and Data ExfiltrationWhat Goes In Must Come Out: Egress-Assess and Data Exfiltration
What Goes In Must Come Out: Egress-Assess and Data ExfiltrationCTruncer
 
Exploitation and State Machines
Exploitation and State MachinesExploitation and State Machines
Exploitation and State MachinesMichael Scovetta
 
Csw2016 d antoine_automatic_exploitgeneration
Csw2016 d antoine_automatic_exploitgenerationCsw2016 d antoine_automatic_exploitgeneration
Csw2016 d antoine_automatic_exploitgenerationCanSecWest
 
Масштабируемый и эффективный фаззинг Google Chrome
Масштабируемый и эффективный фаззинг Google ChromeМасштабируемый и эффективный фаззинг Google Chrome
Масштабируемый и эффективный фаззинг Google ChromePositive Hack Days
 
Integrating web archiving in preservation workflows. Louise Fauduet, Clément ...
Integrating web archiving in preservation workflows. Louise Fauduet, Clément ...Integrating web archiving in preservation workflows. Louise Fauduet, Clément ...
Integrating web archiving in preservation workflows. Louise Fauduet, Clément ...Biblioteca Nacional de España
 
Introduction of ShinoBOT (Black Hat USA 2013 Arsenal)
Introduction of ShinoBOT (Black Hat USA 2013 Arsenal)Introduction of ShinoBOT (Black Hat USA 2013 Arsenal)
Introduction of ShinoBOT (Black Hat USA 2013 Arsenal)Shota Shinogi
 
Статический анализ кода в контексте SSDL
Статический анализ кода в контексте SSDLСтатический анализ кода в контексте SSDL
Статический анализ кода в контексте SSDLPositive Hack Days
 
Metasploit - The Exploit Learning Tree
Metasploit - The Exploit Learning TreeMetasploit - The Exploit Learning Tree
Metasploit - The Exploit Learning TreeE Hacking
 
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
 
Using Guided Missiles in Drive-bys: Automatic Browser Fingerprinting and Expl...
Using Guided Missiles in Drive-bys: Automatic Browser Fingerprinting and Expl...Using Guided Missiles in Drive-bys: Automatic Browser Fingerprinting and Expl...
Using Guided Missiles in Drive-bys: Automatic Browser Fingerprinting and Expl...egypt
 

What's hot (20)

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
 
The State of the Veil Framework
The State of the Veil FrameworkThe State of the Veil Framework
The State of the Veil Framework
 
The Art of AV Evasion - Or Lack Thereof
The Art of AV Evasion - Or Lack ThereofThe Art of AV Evasion - Or Lack Thereof
The Art of AV Evasion - Or Lack Thereof
 
Veil-Ordnance
Veil-OrdnanceVeil-Ordnance
Veil-Ordnance
 
Bringing Down the House - How One Python Script Ruled Over AntiVirus
Bringing Down the House - How One Python Script Ruled Over AntiVirusBringing Down the House - How One Python Script Ruled Over AntiVirus
Bringing Down the House - How One Python Script Ruled Over AntiVirus
 
An EyeWitness View into your Network
An EyeWitness View into your NetworkAn EyeWitness View into your Network
An EyeWitness View into your Network
 
CheckPlease: Payload-Agnostic Targeted Malware
CheckPlease: Payload-Agnostic Targeted MalwareCheckPlease: Payload-Agnostic Targeted Malware
CheckPlease: Payload-Agnostic Targeted Malware
 
Patching Windows Executables with the Backdoor Factory | DerbyCon 2013
Patching Windows Executables with the Backdoor Factory | DerbyCon 2013Patching Windows Executables with the Backdoor Factory | DerbyCon 2013
Patching Windows Executables with the Backdoor Factory | DerbyCon 2013
 
Hacking - Breaking Into It
Hacking - Breaking Into ItHacking - Breaking Into It
Hacking - Breaking Into It
 
Passive Intelligence Gathering and Analytics - It's All Just Metadata!
Passive Intelligence Gathering and Analytics - It's All Just Metadata!Passive Intelligence Gathering and Analytics - It's All Just Metadata!
Passive Intelligence Gathering and Analytics - It's All Just Metadata!
 
What Goes In Must Come Out: Egress-Assess and Data Exfiltration
What Goes In Must Come Out: Egress-Assess and Data ExfiltrationWhat Goes In Must Come Out: Egress-Assess and Data Exfiltration
What Goes In Must Come Out: Egress-Assess and Data Exfiltration
 
Exploitation and State Machines
Exploitation and State MachinesExploitation and State Machines
Exploitation and State Machines
 
Csw2016 d antoine_automatic_exploitgeneration
Csw2016 d antoine_automatic_exploitgenerationCsw2016 d antoine_automatic_exploitgeneration
Csw2016 d antoine_automatic_exploitgeneration
 
Масштабируемый и эффективный фаззинг Google Chrome
Масштабируемый и эффективный фаззинг Google ChromeМасштабируемый и эффективный фаззинг Google Chrome
Масштабируемый и эффективный фаззинг Google Chrome
 
Integrating web archiving in preservation workflows. Louise Fauduet, Clément ...
Integrating web archiving in preservation workflows. Louise Fauduet, Clément ...Integrating web archiving in preservation workflows. Louise Fauduet, Clément ...
Integrating web archiving in preservation workflows. Louise Fauduet, Clément ...
 
Introduction of ShinoBOT (Black Hat USA 2013 Arsenal)
Introduction of ShinoBOT (Black Hat USA 2013 Arsenal)Introduction of ShinoBOT (Black Hat USA 2013 Arsenal)
Introduction of ShinoBOT (Black Hat USA 2013 Arsenal)
 
Статический анализ кода в контексте SSDL
Статический анализ кода в контексте SSDLСтатический анализ кода в контексте SSDL
Статический анализ кода в контексте SSDL
 
Metasploit - The Exploit Learning Tree
Metasploit - The Exploit Learning TreeMetasploit - The Exploit Learning Tree
Metasploit - The Exploit Learning Tree
 
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?"
 
Using Guided Missiles in Drive-bys: Automatic Browser Fingerprinting and Expl...
Using Guided Missiles in Drive-bys: Automatic Browser Fingerprinting and Expl...Using Guided Missiles in Drive-bys: Automatic Browser Fingerprinting and Expl...
Using Guided Missiles in Drive-bys: Automatic Browser Fingerprinting and Expl...
 

Similar to Pentester++

Pen Testing Development
Pen Testing DevelopmentPen Testing Development
Pen Testing DevelopmentCTruncer
 
Services, tools & practices for a software house
Services, tools & practices for a software houseServices, tools & practices for a software house
Services, tools & practices for a software houseParis Apostolopoulos
 
Python in Industry
Python in IndustryPython in Industry
Python in IndustryDharmit Shah
 
Machine learning in cybersecutiry
Machine learning in cybersecutiryMachine learning in cybersecutiry
Machine learning in cybersecutiryVishwas N
 
Netflix Open Source: Building a Distributed and Automated Open Source Program
Netflix Open Source:  Building a Distributed and Automated Open Source ProgramNetflix Open Source:  Building a Distributed and Automated Open Source Program
Netflix Open Source: Building a Distributed and Automated Open Source Programaspyker
 
Building a Distributed & Automated Open Source Program at Netflix
Building a Distributed & Automated Open Source Program at NetflixBuilding a Distributed & Automated Open Source Program at Netflix
Building a Distributed & Automated Open Source Program at NetflixAll Things Open
 
Reproducibility in artificial intelligence
Reproducibility in artificial intelligenceReproducibility in artificial intelligence
Reproducibility in artificial intelligenceCarlos Toxtli
 
Continuous Integration In Php
Continuous Integration In PhpContinuous Integration In Php
Continuous Integration In PhpWilco Jansen
 
What is Python? An overview of Python for science.
What is Python? An overview of Python for science.What is Python? An overview of Python for science.
What is Python? An overview of Python for science.Nicholas Pringle
 
OSDC 2015: Kris Buytaert | From ConfigManagementSucks to ConfigManagementLove
OSDC 2015: Kris Buytaert | From ConfigManagementSucks to ConfigManagementLoveOSDC 2015: Kris Buytaert | From ConfigManagementSucks to ConfigManagementLove
OSDC 2015: Kris Buytaert | From ConfigManagementSucks to ConfigManagementLoveNETWAYS
 
Introduction to the intermediate Python - v1.1
Introduction to the intermediate Python - v1.1Introduction to the intermediate Python - v1.1
Introduction to the intermediate Python - v1.1Andrei KUCHARAVY
 
Understanding and implementing website security
Understanding and implementing website securityUnderstanding and implementing website security
Understanding and implementing website securityDrew Gorton
 
TDD in Python With Pytest
TDD in Python With PytestTDD in Python With Pytest
TDD in Python With PytestEddy Reyes
 
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
 
Becoming A Drupal Master Builder
Becoming A Drupal Master BuilderBecoming A Drupal Master Builder
Becoming A Drupal Master BuilderPhilip Norton
 
Ln monitoring repositories
Ln monitoring repositoriesLn monitoring repositories
Ln monitoring repositoriessnyff
 
How to get started with Site Reliability Engineering
How to get started with Site Reliability EngineeringHow to get started with Site Reliability Engineering
How to get started with Site Reliability EngineeringAndrew Kirkpatrick
 
Not Your Fathers C - C Application Development In 2016
Not Your Fathers C - C Application Development In 2016Not Your Fathers C - C Application Development In 2016
Not Your Fathers C - C Application Development In 2016maiktoepfer
 
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
 

Similar to Pentester++ (20)

Pen Testing Development
Pen Testing DevelopmentPen Testing Development
Pen Testing Development
 
Services, tools & practices for a software house
Services, tools & practices for a software houseServices, tools & practices for a software house
Services, tools & practices for a software house
 
Python in Industry
Python in IndustryPython in Industry
Python in Industry
 
Machine learning in cybersecutiry
Machine learning in cybersecutiryMachine learning in cybersecutiry
Machine learning in cybersecutiry
 
Netflix Open Source: Building a Distributed and Automated Open Source Program
Netflix Open Source:  Building a Distributed and Automated Open Source ProgramNetflix Open Source:  Building a Distributed and Automated Open Source Program
Netflix Open Source: Building a Distributed and Automated Open Source Program
 
Building a Distributed & Automated Open Source Program at Netflix
Building a Distributed & Automated Open Source Program at NetflixBuilding a Distributed & Automated Open Source Program at Netflix
Building a Distributed & Automated Open Source Program at Netflix
 
Reproducibility in artificial intelligence
Reproducibility in artificial intelligenceReproducibility in artificial intelligence
Reproducibility in artificial intelligence
 
Continuous Integration In Php
Continuous Integration In PhpContinuous Integration In Php
Continuous Integration In Php
 
What is Python? An overview of Python for science.
What is Python? An overview of Python for science.What is Python? An overview of Python for science.
What is Python? An overview of Python for science.
 
OSDC 2015: Kris Buytaert | From ConfigManagementSucks to ConfigManagementLove
OSDC 2015: Kris Buytaert | From ConfigManagementSucks to ConfigManagementLoveOSDC 2015: Kris Buytaert | From ConfigManagementSucks to ConfigManagementLove
OSDC 2015: Kris Buytaert | From ConfigManagementSucks to ConfigManagementLove
 
Introduction to the intermediate Python - v1.1
Introduction to the intermediate Python - v1.1Introduction to the intermediate Python - v1.1
Introduction to the intermediate Python - v1.1
 
Understanding and implementing website security
Understanding and implementing website securityUnderstanding and implementing website security
Understanding and implementing website security
 
TDD in Python With Pytest
TDD in Python With PytestTDD in Python With Pytest
TDD in Python With Pytest
 
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-...
 
Becoming A Drupal Master Builder
Becoming A Drupal Master BuilderBecoming A Drupal Master Builder
Becoming A Drupal Master Builder
 
Ln monitoring repositories
Ln monitoring repositoriesLn monitoring repositories
Ln monitoring repositories
 
Go at Skroutz
Go at SkroutzGo at Skroutz
Go at Skroutz
 
How to get started with Site Reliability Engineering
How to get started with Site Reliability EngineeringHow to get started with Site Reliability Engineering
How to get started with Site Reliability Engineering
 
Not Your Fathers C - C Application Development In 2016
Not Your Fathers C - C Application Development In 2016Not Your Fathers C - C Application Development In 2016
Not Your Fathers C - C Application Development In 2016
 
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
 

Recently uploaded

"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 

Recently uploaded (20)

"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 

Pentester++

  • 1. Pentester++ From sysadmin to Veil developer
  • 2. uid=0(@christruncer) ● Team Lead for Veris Group’s Adaptive Threat Division ● Veil-Framework Co-Developer ● Security Researcher ● Interested in research or pen testing? Talk to me after :)
  • 3. What’s this talk about? ● Why scripting/development is essential ● Case study driven by examining scenarios and resulting scripts ● Largely Python based, but easily transferrable
  • 4. Why Learn a Language? Make a computer do exactly what you want http://cdn4.thetechjournal.net/wp-content/uploads/2012/03/Control-PC-With-intendiX-SOCI-600x337.png
  • 5. What to start with? Plenty of great options:
  • 6. My Development Tips ● Start small ○ Veil wasn’t built in a day ;) ● Find tasks that you commonly perform or fix a problem you’ve encountered ● Pick a language you’re interested in ● Google and StackOverflow ● Dive in!
  • 7. My Development Philosophy ● Create a POC that meets your goal ● Clean up your code and comment it ● Make it usable by everyone, not just you ● Make it publicly available ● Maintain it
  • 9. So where did I start?
  • 10. CCDC ● Volunteered to help red-team a practice event ● @mubix helped provide pointers ○ Get scripts ready to fire ○ Suggested creating resource scripts ○ Prep for common exploits ● Started building scripts to assist in our red-team workflow
  • 11. Cortana ● Created by Raphael Mudge (developer of Armitage and Cobalt Strike) ● Event driven language, quite similar to any scripts you may have written for use on IRC… :)
  • 12. Helping the Red Team ● Problem: Blue teamers change passwords often ● Goal: A solution that automatically grabs hashes on a set interval ● Solution: Cortana Script
  • 13. Start Small ● Figure out what the script needs to do... ● Get System Privs ● Dump hashes ● Repeat actions on an interval ● Draw from existing examples ○ https://github.com/rsmudge/cortana-scripts
  • 16.
  • 17. Fruits of my Labor ● Got my feet wet in a new language ● Met the goals originally outlined ○ System Privs ○ Dump hashes ○ Do it every so often ● Made life a little harder for CCDC blue teamers :)
  • 18. Let’s Write from Scratch ● Try to find a (minor) problem/task that needs help at your work ● Outline exactly what you need ● Pick your language of choice
  • 19. Learn the basics (FNG phase) ● Hello world! ● Basic data types (strings, integers, etc.) ● Math, concatenation, loops, user-defined functions, etc.
  • 20. Python and Hasher ● Problem: The fastest way to check hashes on our tests were to submit them online… #opsecfail ● Goal: Create a script that generates hashes and can perform comparisons between hashes and plaintext strings ● Solution: Hasher :)
  • 21. Hasher Requirements ● Capability to do this without submitting hashes online ● Create hash from plaintext string ● Compare plaintext string and hash ● Support multiple hash types
  • 23. Version 0.1 ● We figured out the basic functionality ● Now, start making it usable by others ○ Add a basic menu structure ○ Add functions that would be used (generate and compare) ● Prepare for users…. (Error check)
  • 24.
  • 25. ugh… users… and usability.. ● Error checking - half your code :) ● Don’t want a user to be able to crash your program ○ Lack of usability can be the death of a project ● Command line arguments? ○ great for ease of use ○ also for scriptability/third party integration
  • 27. Wrap it up! ● Added ability to take command line arguments ● Supports multiple hash types ● Added the ability to generate hashes, or compare hash with plaintext
  • 28. Version Control? ● Use anything you are comfortable with ○ git ○ svn ○ cvs ○ etc… ● You will mess your code up ● You will delete your scripts/tools ● You will be thankful for checking your code in somewhere
  • 29. complexity++ moving beyond basic scripts
  • 30. EyeWitness Goal: Wanted a tool to screenshot URLs, show default creds, generate a report, not use PhantomJS, and wanted a challenge. Existing: PeepingTom (@lanmaster53) https://bitbucket.org/LaNMaSteR53/peepingtom/
  • 35. Improvements ● File input: ○ text ○ nmap ○ Nessus ● Basic port scanning ● Report generation ● “Signatures” for default credentials ● User Agent Switching/Comparison
  • 36. Report Generation ● Simple - HTML table tags ● Store server header and screenshot ● Multi-page reports ● Link structure required multiple loops to create ○ Counters are my friend
  • 37. Some EyeWitness Info/Stats ● Originally: 409 lines ● Currently: 1762 exactly ● Reasons? ○ port scanning ○ dir name specification ○ login signatures ○ etc. ● Real reason? ○ what’s your best guess
  • 38. Find Your True Calling #avlol
  • 39. The Veil-Framework ● Problem: antivirus can’t catch malware but does catch pentesters ● Goal: a way to get around antivirus as easily as professional malware ● Solution: a Python-based framework for generating shellcode injectors and Meterpreter stagers
  • 40. As always, ask the Google
  • 41. Have a POC ...next? ● Research obfuscation methods ○ Look at existing malware ○ Try encryption routines ● Generate random files off of template ○ Framework might help ● Automate as much as possible ○ I probably should do a framework..
  • 42. Released Veil 1.0 ● Small, single file script ● Limited payloads ● It worked ○ better than it should have :)
  • 43. Next steps ● Don’t use a single script ○ Maintaining can be a pain ○ Not easily extensible ○ A framework would be nice… ● Find a mentor ○ Ability to bounce questions is invaluable ○ Learning opportunities ○ Collaboration opportunities
  • 44. Team Up ● Teamed up with @harmj0y (formerly @the_grayhound) & @themightyshiv ● We had separate tools, so we combined our work ● @harmj0y didn’t sleep, combined code bases into a framework ○ Took this as an opportunity to learn python-based framework capabilities
  • 46. Veil 2.0 ● Fully modular framework ○ drag-and-drop payloads! ● “Language agnostic” ○ implement additional language families ○ check out @harmj0y’s presentation later! ● Easily extensible ○ common library methods/crypters ● Huge UI focus ○ tab completion, command line flags, etc.
  • 47. How/What did I learn? ● Went back to learning from “existing” code (framework from @harmj0y) ● Learned to develop as a team (splitting tasks, accountability) ● Learned proper version control (git) ○ Don’t delete branches
  • 48. The Veil-Framework ● We started coming up with additional tool ideas, resulting in the “Veil- Framework” ○ “A toolset aiming to bridge the gap between pentesting and red teaming capabilities” ● Veil was renamed to Veil-Evasion ○ Veil-Catapult: initial payload delivery system, released at Shmooon ‘14 ○ Veil-PowerView: network situational
  • 49. The State of Veil-Evasion ● Still an actively maintained project ● V-Day ○ for victory over antivirus :) ○ since 9/15/2013, we’ve release at least one new payload on the 15th of every month ● Hoping for community involvement ○ hint.. hint… :)
  • 50. Fin ● Find something you’re passionate/interested in ● Start small, and finish it ● Make it usable and stable! Lack of usability and stability is death to a project. ● Maintain it, and enjoy doing it
  • 51. Questions? ● @ChrisTruncer ● https://github.com/christruncer ● chris@christophertruncer.com ● https://www.veil-framework.com/