SlideShare a Scribd company logo
1 of 42
Go Hack Yourself
10 Pen Test Tactics for Blue Teamers
Jason Frank Brent Kennedy Will Schroeder
Introduction
● @jasonjfrank (Jason Frank)
o Manager of Veris Group’s Adaptive Threat Division
o Builds and executes penetration testing programs
o Black Hat Trainer: Adaptive Penetration Testing
● @bk_up (Brent Kennedy)
o Senior pentester at CERT/SEI/CMU
o Project lead supporting government customers
● @harmj0y (Will Schroeder)
o Security Researcher of Veris Group’s ATD
o Veil-Framework & PowerTools
● 12 years experience leading pen test engagements for
private and government customers
Why Go Hack Yourself?
● Customers want to learn
o How do I get started with pentesting?
o What tools do you use?
o How did you find that site on our network?
● Why don’t blue teamers have black hats?
o Lack of knowledge/training
o Different mindset. Think like an attacker.
o Bad connotation. Will break network.
Defending the Castle
● Common problems for defenders:
o Inventory
o Updating/Upgrading
o Consistency
o Special requests
o Costs
o Cannot verify (exploit) vulnerabilities
o Politics
Attacking the Castle
● What attackers want to discover:
o Live hosts/Domain structure
o Software/patch levels
o Exploitable conditions
o Crown jewels
● Attackers and defenders commonly want the
same information
● Attackers take the path of least resistance
Pros of Hacking Tools
● Smaller scripts, no messy installation
o Some run in memory
● Free is cheap
● Straightforward, easy to use
● Minimal network disruption
o Valid system calls, traffic
Why Focus on Windows?
● Most target organizations use Windows for their
userland network enclave
● Linux, DB, *, admins usually have Windows
endpoints and domain accounts
● Attack Path
o Spear Phish to client Windows endpoint
o Escalate in Windows domain
o Identify your prey (crown jewels)
o Use gained access to pivot
 Databases, servers, appliances, fileshares
 Admin workstations
PowerShell
● Microsoft’s “post-exploitation language”
o Lets you stay off of disk, access Windows
APIs, access anything in .NET, and is installed
by default on Windows 7+
o Makes a phenomenal platform to write
hacking tools
● Note: many people think that execution policy
restricts attackers from running unsigned
scripts
o but you can just turn off execution policy on
launch with: powershell.exe -exec bypass
Our Arsenal
● All free, all open source, and a lot PowerShell
focused:
o Nmap: still the best port-scanner, with lots of
extensible scripts now implemented
o EyeWitness: easy web service screenshotting
o PowerSploit: the first open-source offensive
PowerShell toolkit
o PowerUp: check for Windows privesc in
seconds
o PowerView: dsquery/situational awareness
on steroids
o Egress-Assess: allows for the controlled
simulation of the egress of sensitive data
Our Approach
1. Asset discovery (on the cheap)
2. Base image analysis
3. Open fileshares
4. Who are your admins?
5. Where are your admins?
6. How old are their passwords?
7. Do you trust your trusts?
8. Who can admin your DCs?
9. Group Policy Preferences
10.Border egress protections
Tactic 1: Asset Discovery
● Mapping a network for targets can be a daunting
task in large environments
● Nmap
o Cron Job - every 25 hours
o Scripted alerts for detected deltas
o Utilize latency/timeout features for large networks
● Eyewitness
o https://github.com/ChrisTruncer/EyeWitness
o Rapid screen grabbing of web sites
o Parses Nmap output for web ports
o Categorizing sites (High value targets, printers, etc.)
o Easy way to discover misconfigured/default installations
of web applications
Tactic 1: Asset Discovery
● Run Nmap to discover live hosts on the network
o nmap -Pn -n -sS -p 21-
23,25,53,111,137,139,445,80,443,3389,5900,8080,8443 --min-
rtt-timeout --max-retries 1 --max-scan-delay 0 -oA discovery-
scan -vvv --open -iL <Host List>
o Get host list: cat discovery-scan.gnmap | grep “open” | cut -d “
“ -f 2 > discovery_ips.txt
● Run Nmap on live hosts with more port checks
o nmap -Pn -n --min-rtt-timeout --max-retries 1 --max-scan-delay
0 -oA top1000-scan -vvv --open -iL disovery_ips.txt
o Get host list
● Feed Nmap results to EyeWitness
o ./EyeWitness.py -f top1000-scan.xml --headless
● Open EyeWitness results in web browser
Tactic 2: Base Image Analysis
● The first thing an attacker will do after
achieving user access is try to escalate
privileges
● Many people think that if their system is
patched, there’s no way to privesc
o Many privilege escalation vectors are based
on custom software and misconfigurations
● Examine your base/SOE image for the same
common vectors that attackers are going to
look for!
Tactic 2: Base Image Analysis
● PowerUp contains checks (and
weaponizations) for the most common public
Windows privesc vectors
o The Invoke-AllChecks function will run
through all current checks, highlighting
anything that stands out
● PS C:> Import-Module PowerUp.ps1
● PS C:> Invoke-AllChecks
Tactic 2: Base Image Analysis
Tactic 3: Open Fileshares
● Almost every organization has improperly
secured Windows file shares
o Common to find password lists, engineering
plans, network diagrams, PII, etc.
● It may be possible for users to create shares on
their machines with little to no insight from IT
● Audit these on a regular basis and from a variety
of user contexts
o i.e. basic no-domain-groups users, as well as
users in a variety of common groups
Tactic 3: Open Fileshares
● Running PowerView’s Invoke-ShareFinder will
enumerate all domain machines and check for
open file shares
o the -CheckShareAccess flag checks if the
current user can access the share
o even finds hidden shares!
● PS C:> Import-Module powerview.ps1
● PS C:> Invoke-ShareFinder -CheckShareAccess
Tactic 3: Open Fileshares
Tactic 4: Who are your Admins?
● If you have a complex Active Directory setup
with lots of delegation, users can sometimes
slip through the cracks
● With highly nested groups, users might
effectively have highly elevated rights without
appearing so
o Think something like “Domain Admins” →
“Server Admins” → “SubGroup2”
Tactic 4: Who are your Admins?
● PowerView’s group commands accept
wildcards, meaning you can enumerate all
users in a group’s membership
o It can also resolve all sub groups recursively
down to actual members (i.e. nested
groups)
● PS C:> Import-Module powerview.ps1
● PS C:> Get-NetGroups *admin* | Get-
NetGroup -Recurse
Tactic 4: Who are your Admins?
Tactic 5: Where are your Admins?
● On almost every engagement, we “hunt” for
where specific users are logged in
o And again, attackers can pull lots of this
information from a non-elevated user context!
● Almost all organizations have “non-essential use
of elevated access”
o Translation: they have domain admins/other
high value accounts logged in to lots of places
they should not be
Tactic 5: Where are your Admins?
● PowerView’s UserHunter modules can track
down where specific groups or users are located
o This information can be matched up against
the group membership information from
Tactic 4
● PS C:> Import-Module powerview.ps1
● PS C:> Invoke-UserHunter -ShowAll
Tactic 5: Where are your Admins?
Tactic 6: Stale User Passwords
● Users should be changing their passwords to
prevent password compromise/reuse
● Group Policy can enforce it, but users don’t
always
● It pays to audit your Active Directory setup
o Still a bit of a manual process for most people
● Another quick check is for enabled accounts with
passwords older than a certain age
Tactic 6: Stale User Passwords
● PowerView has your back:
● PS C:> Import-Module powerview.ps1
● PS C:> Get-NetUser | ? {$_.whenchanged -lt
(Get-Date).AddMonths(-12)} | %
{$_.samaccountname}
Tactic 6: Stale User Passwords
Tactic 7: Do You Trust Your Trusts?
● Domain trusts are usually foreign to people
without an AD administrator or a formalized red
team background
● If you’re admining a network with multiple
domains, you should be aware of how they
interact!
Tactic 7: Do You Trust Your Trusts?
● PowerView can recursively crawl all reachable
domain trust relationships and output to a .csv
o yEd (also free) can be used to visualize this data
● PS C:> Import-Module powerview.ps1
● PS C:> Invoke-MapDomainTrusts | Export-CSV -
NoTypeInformation trusts.csv
● *visualize in yEd*
Tactic 8: Who Can Admin Your DCs?
● Who has local administrative access on your
domain controllers (and other high-value
servers)?
● Note: this is different than the domain admins
group!
o we’re talking about the BUILTIN
Administrators group
Tactic 8: Who Can Admin Your DCs?
● PowerView’s Get-NetLocalGroup can enumerate
this information on remote systems, from an
unprivileged user account!
● We can pair this with the function that
enumerates all domain controllers
● PS C:> Import-Module powerview.ps1
● PS C:> Get-NetDomainControllers | Get-
NetLocalGroup
Tactic 8: Who Can Admin Your DCs?
Tactic 9: Group Policy Preferences
● Group Policy Preferences is a mechanism used by
some organizations to administer domain
machines
● Unfortunately, the key for the “encrypted
passwords” in GPP is static, and was published
online by Microsoft
● This means that any user can pull and decrypt
these passwords, if they are there
Tactic 9: Group Policy Preferences
● PowerSploit has a module which will search
domain controllers for the appropriate policy
.xmls, extract any found passwords, and
automatically decrypt them
● PS C:> Import-Module PowerSploit.ps1
● PS C:> Get-GPPPassword
Tactic 9: Group Policy Preferences
Tactic 10: Border Egress Protections
● Attackers often will move pilfered data to a single
internal server and exfil in one swoop
o Seeing massive exfil is often the first sign an
organization sees that they’ve been owned
● Many companies believe vendor claims that their
border appliances will detect this behavior
o But few bother (or know how) to test this
● Blind spots often exist
Tactic 10: Border Egress Protections
● Server Syntax (Internet Border Host)
o In Linux: ./Egress-Assess.py --server http
● Client Syntax
o On Windows Powershell once imported: Invoke-
EgressAssess -client http -ip SERVER_IP -datatype
Go Hack Yourself! (Conclusion)
● “Hacker” tools can be used to efficiently perform
sysadmin and defender tasks
● Tactics are repeatable actions that cause minimal
network interference
o Run them while drinking your coffee!
● Finding misconfigurations with AD and other
network resources can limit attack vectors
● Free solutions that let blue teamers demonstrate
immediate impact
o Gain the political capital to spend money :)
Questions?
• Contact Us:
– Jason Frank - @jasonjfrank – jfrank@verisgroup.com
– Brent Kennedy - @bk_up – bkennedy@cert.org
– Will Schroeder - @harmj0y – will@harmj0y.net
• Read More:
– http://www.verisgroup.com/category/adaptive-threat-division/
– http://blog.harmj0y.net
• Get The Tools:
– http://www.verisgroup.com/adaptive-threat-division/resources/
– https://github.com/mattifestation/PowerSploit
– https://nmap.org

More Related Content

What's hot

Threat hunting on the wire
Threat hunting on the wireThreat hunting on the wire
Threat hunting on the wireInfoSec Addicts
 
My Keynote from BSidesTampa 2015 (video in description)
My Keynote from BSidesTampa 2015 (video in description)My Keynote from BSidesTampa 2015 (video in description)
My Keynote from BSidesTampa 2015 (video in description)Andrew Case
 
Threat Hunting Procedures and Measurement Matrice
Threat Hunting Procedures and Measurement MatriceThreat Hunting Procedures and Measurement Matrice
Threat Hunting Procedures and Measurement MatriceVishal Kumar
 
BSidesLV 2016 - Powershell - Hunting on the Endpoint - Gerritz
BSidesLV 2016 - Powershell - Hunting on the Endpoint - GerritzBSidesLV 2016 - Powershell - Hunting on the Endpoint - Gerritz
BSidesLV 2016 - Powershell - Hunting on the Endpoint - GerritzChristopher Gerritz
 
Bsides 2019 - Intelligent Threat Hunting
Bsides 2019 - Intelligent Threat HuntingBsides 2019 - Intelligent Threat Hunting
Bsides 2019 - Intelligent Threat HuntingDhruv Majumdar
 
How to Hunt for Lateral Movement on Your Network
How to Hunt for Lateral Movement on Your NetworkHow to Hunt for Lateral Movement on Your Network
How to Hunt for Lateral Movement on Your NetworkSqrrl
 
What is Threat Hunting? - Panda Security
What is Threat Hunting? - Panda SecurityWhat is Threat Hunting? - Panda Security
What is Threat Hunting? - Panda SecurityPanda Security
 
IDSECCONF 2020 : A Tale Story of Building and Maturing Threat Hunting Program
IDSECCONF 2020 :  A Tale Story of Building and Maturing Threat Hunting ProgramIDSECCONF 2020 :  A Tale Story of Building and Maturing Threat Hunting Program
IDSECCONF 2020 : A Tale Story of Building and Maturing Threat Hunting ProgramDigit Oktavianto
 
(Training) Malware - To the Realm of Malicious Code
(Training) Malware - To the Realm of Malicious Code(Training) Malware - To the Realm of Malicious Code
(Training) Malware - To the Realm of Malicious CodeSatria Ady Pradana
 
Threat hunting in cyber world
Threat hunting in cyber worldThreat hunting in cyber world
Threat hunting in cyber worldAkash Sarode
 
Cyber Threat hunting workshop
Cyber Threat hunting workshopCyber Threat hunting workshop
Cyber Threat hunting workshopArpan Raval
 
Cyber Threat Hunting with Phirelight
Cyber Threat Hunting with PhirelightCyber Threat Hunting with Phirelight
Cyber Threat Hunting with PhirelightHostway|HOSTING
 
Malware analysis, threat intelligence and reverse engineering
Malware analysis, threat intelligence and reverse engineeringMalware analysis, threat intelligence and reverse engineering
Malware analysis, threat intelligence and reverse engineeringbartblaze
 
NETWORK PENETRATION TESTING
NETWORK PENETRATION TESTINGNETWORK PENETRATION TESTING
NETWORK PENETRATION TESTINGEr Vivek Rana
 
Threat Hunting 101: Intro to Threat Detection and Incident Response
Threat Hunting 101: Intro to Threat Detection and Incident ResponseThreat Hunting 101: Intro to Threat Detection and Incident Response
Threat Hunting 101: Intro to Threat Detection and Incident ResponseInfocyte
 
Deploying a Shadow Threat Intel Capability at CaralinaCon on March 6, 2016
Deploying a Shadow Threat Intel Capability at CaralinaCon on March 6, 2016Deploying a Shadow Threat Intel Capability at CaralinaCon on March 6, 2016
Deploying a Shadow Threat Intel Capability at CaralinaCon on March 6, 2016grecsl
 
Building a Successful Threat Hunting Program
Building a Successful Threat Hunting ProgramBuilding a Successful Threat Hunting Program
Building a Successful Threat Hunting ProgramCarl C. Manion
 

What's hot (20)

Threat hunting on the wire
Threat hunting on the wireThreat hunting on the wire
Threat hunting on the wire
 
My Keynote from BSidesTampa 2015 (video in description)
My Keynote from BSidesTampa 2015 (video in description)My Keynote from BSidesTampa 2015 (video in description)
My Keynote from BSidesTampa 2015 (video in description)
 
Threat Hunting Procedures and Measurement Matrice
Threat Hunting Procedures and Measurement MatriceThreat Hunting Procedures and Measurement Matrice
Threat Hunting Procedures and Measurement Matrice
 
BSidesLV 2016 - Powershell - Hunting on the Endpoint - Gerritz
BSidesLV 2016 - Powershell - Hunting on the Endpoint - GerritzBSidesLV 2016 - Powershell - Hunting on the Endpoint - Gerritz
BSidesLV 2016 - Powershell - Hunting on the Endpoint - Gerritz
 
Bsides 2019 - Intelligent Threat Hunting
Bsides 2019 - Intelligent Threat HuntingBsides 2019 - Intelligent Threat Hunting
Bsides 2019 - Intelligent Threat Hunting
 
How to Hunt for Lateral Movement on Your Network
How to Hunt for Lateral Movement on Your NetworkHow to Hunt for Lateral Movement on Your Network
How to Hunt for Lateral Movement on Your Network
 
What is Threat Hunting? - Panda Security
What is Threat Hunting? - Panda SecurityWhat is Threat Hunting? - Panda Security
What is Threat Hunting? - Panda Security
 
Another Side of Hacking
Another Side of HackingAnother Side of Hacking
Another Side of Hacking
 
IDSECCONF 2020 : A Tale Story of Building and Maturing Threat Hunting Program
IDSECCONF 2020 :  A Tale Story of Building and Maturing Threat Hunting ProgramIDSECCONF 2020 :  A Tale Story of Building and Maturing Threat Hunting Program
IDSECCONF 2020 : A Tale Story of Building and Maturing Threat Hunting Program
 
(Training) Malware - To the Realm of Malicious Code
(Training) Malware - To the Realm of Malicious Code(Training) Malware - To the Realm of Malicious Code
(Training) Malware - To the Realm of Malicious Code
 
Threat hunting in cyber world
Threat hunting in cyber worldThreat hunting in cyber world
Threat hunting in cyber world
 
Cyber Threat hunting workshop
Cyber Threat hunting workshopCyber Threat hunting workshop
Cyber Threat hunting workshop
 
Purple team is awesome
Purple team is awesomePurple team is awesome
Purple team is awesome
 
Cyber Threat Hunting with Phirelight
Cyber Threat Hunting with PhirelightCyber Threat Hunting with Phirelight
Cyber Threat Hunting with Phirelight
 
Malware analysis, threat intelligence and reverse engineering
Malware analysis, threat intelligence and reverse engineeringMalware analysis, threat intelligence and reverse engineering
Malware analysis, threat intelligence and reverse engineering
 
Malware for Red Team
Malware for Red TeamMalware for Red Team
Malware for Red Team
 
NETWORK PENETRATION TESTING
NETWORK PENETRATION TESTINGNETWORK PENETRATION TESTING
NETWORK PENETRATION TESTING
 
Threat Hunting 101: Intro to Threat Detection and Incident Response
Threat Hunting 101: Intro to Threat Detection and Incident ResponseThreat Hunting 101: Intro to Threat Detection and Incident Response
Threat Hunting 101: Intro to Threat Detection and Incident Response
 
Deploying a Shadow Threat Intel Capability at CaralinaCon on March 6, 2016
Deploying a Shadow Threat Intel Capability at CaralinaCon on March 6, 2016Deploying a Shadow Threat Intel Capability at CaralinaCon on March 6, 2016
Deploying a Shadow Threat Intel Capability at CaralinaCon on March 6, 2016
 
Building a Successful Threat Hunting Program
Building a Successful Threat Hunting ProgramBuilding a Successful Threat Hunting Program
Building a Successful Threat Hunting Program
 

Viewers also liked

Big Bang Theory: The Evolution of Pentesting High Security Environments
Big Bang Theory: The Evolution of Pentesting High Security EnvironmentsBig Bang Theory: The Evolution of Pentesting High Security Environments
Big Bang Theory: The Evolution of Pentesting High Security EnvironmentsJoe McCray
 
Real Life Information Security
Real Life Information SecurityReal Life Information Security
Real Life Information SecurityPawel Krawczyk
 
Łukasz Lenart "How secure your web framework is? Based on Apache Struts 2"
Łukasz Lenart "How secure your web framework is? Based on Apache Struts 2"Łukasz Lenart "How secure your web framework is? Based on Apache Struts 2"
Łukasz Lenart "How secure your web framework is? Based on Apache Struts 2"Pawel Krawczyk
 
Maximizing your coaxial (cable tv) v2
Maximizing your coaxial (cable tv) v2Maximizing your coaxial (cable tv) v2
Maximizing your coaxial (cable tv) v2Broto Santoso
 
Securing Your .NET Application
Securing Your .NET ApplicationSecuring Your .NET Application
Securing Your .NET ApplicationIron Speed
 
RootedCON 2015 - Deep inside the Java framework Apache Struts
RootedCON 2015 - Deep inside the Java framework Apache StrutsRootedCON 2015 - Deep inside the Java framework Apache Struts
RootedCON 2015 - Deep inside the Java framework Apache Strutstestpurposes
 
Building an InfoSec RedTeam
Building an InfoSec RedTeamBuilding an InfoSec RedTeam
Building an InfoSec RedTeamDan Vasile
 
Queue Size Trade Off with Modulation in 802.15.4 for Wireless Sensor Networks
Queue Size Trade Off with Modulation in 802.15.4 for Wireless Sensor NetworksQueue Size Trade Off with Modulation in 802.15.4 for Wireless Sensor Networks
Queue Size Trade Off with Modulation in 802.15.4 for Wireless Sensor NetworksCSCJournals
 
.Net Hijacking to Defend PowerShell BSidesSF2017
.Net Hijacking to Defend PowerShell BSidesSF2017 .Net Hijacking to Defend PowerShell BSidesSF2017
.Net Hijacking to Defend PowerShell BSidesSF2017 Amanda Rousseau
 
SETTING METHOD IN CONSIDERATION OF THE PCI/DSS
SETTING METHOD IN CONSIDERATION OF THE PCI/DSSSETTING METHOD IN CONSIDERATION OF THE PCI/DSS
SETTING METHOD IN CONSIDERATION OF THE PCI/DSShogehuga
 
Passive infrastructure of FTTH networks: an overview
Passive infrastructure of FTTH networks: an overviewPassive infrastructure of FTTH networks: an overview
Passive infrastructure of FTTH networks: an overviewLuc De Heyn
 
A very quick introduction to HFC, DOCSIS 3.0 and 3.1
A very quick introduction to HFC, DOCSIS 3.0 and 3.1A very quick introduction to HFC, DOCSIS 3.0 and 3.1
A very quick introduction to HFC, DOCSIS 3.0 and 3.1Erik Vloothuis
 
ColdFusion for Penetration Testers
ColdFusion for Penetration TestersColdFusion for Penetration Testers
ColdFusion for Penetration TestersChris Gates
 
Purple teaming Cyber Kill Chain
Purple teaming Cyber Kill ChainPurple teaming Cyber Kill Chain
Purple teaming Cyber Kill ChainHaydn Johnson
 
State of the Internet: Mirai, IOT and History of Botnets
State of the Internet: Mirai, IOT and History of BotnetsState of the Internet: Mirai, IOT and History of Botnets
State of the Internet: Mirai, IOT and History of BotnetsRahul Neel Mani
 
Building a Successful Internal Adversarial Simulation Team - Chris Gates & Ch...
Building a Successful Internal Adversarial Simulation Team - Chris Gates & Ch...Building a Successful Internal Adversarial Simulation Team - Chris Gates & Ch...
Building a Successful Internal Adversarial Simulation Team - Chris Gates & Ch...Chris Gates
 
Home Arcade setup (NoVA Hackers)
Home Arcade setup (NoVA Hackers)Home Arcade setup (NoVA Hackers)
Home Arcade setup (NoVA Hackers)Chris Gates
 
Security Operation Center - Design & Build
Security Operation Center - Design & BuildSecurity Operation Center - Design & Build
Security Operation Center - Design & BuildSameer Paradia
 
DevOOPS: Attacks and Defenses for DevOps Toolchains
DevOOPS: Attacks and Defenses for DevOps ToolchainsDevOOPS: Attacks and Defenses for DevOps Toolchains
DevOOPS: Attacks and Defenses for DevOps ToolchainsChris Gates
 
How to Be Awesome on Slideshare
How to Be Awesome on SlideshareHow to Be Awesome on Slideshare
How to Be Awesome on Slideshare24Slides
 

Viewers also liked (20)

Big Bang Theory: The Evolution of Pentesting High Security Environments
Big Bang Theory: The Evolution of Pentesting High Security EnvironmentsBig Bang Theory: The Evolution of Pentesting High Security Environments
Big Bang Theory: The Evolution of Pentesting High Security Environments
 
Real Life Information Security
Real Life Information SecurityReal Life Information Security
Real Life Information Security
 
Łukasz Lenart "How secure your web framework is? Based on Apache Struts 2"
Łukasz Lenart "How secure your web framework is? Based on Apache Struts 2"Łukasz Lenart "How secure your web framework is? Based on Apache Struts 2"
Łukasz Lenart "How secure your web framework is? Based on Apache Struts 2"
 
Maximizing your coaxial (cable tv) v2
Maximizing your coaxial (cable tv) v2Maximizing your coaxial (cable tv) v2
Maximizing your coaxial (cable tv) v2
 
Securing Your .NET Application
Securing Your .NET ApplicationSecuring Your .NET Application
Securing Your .NET Application
 
RootedCON 2015 - Deep inside the Java framework Apache Struts
RootedCON 2015 - Deep inside the Java framework Apache StrutsRootedCON 2015 - Deep inside the Java framework Apache Struts
RootedCON 2015 - Deep inside the Java framework Apache Struts
 
Building an InfoSec RedTeam
Building an InfoSec RedTeamBuilding an InfoSec RedTeam
Building an InfoSec RedTeam
 
Queue Size Trade Off with Modulation in 802.15.4 for Wireless Sensor Networks
Queue Size Trade Off with Modulation in 802.15.4 for Wireless Sensor NetworksQueue Size Trade Off with Modulation in 802.15.4 for Wireless Sensor Networks
Queue Size Trade Off with Modulation in 802.15.4 for Wireless Sensor Networks
 
.Net Hijacking to Defend PowerShell BSidesSF2017
.Net Hijacking to Defend PowerShell BSidesSF2017 .Net Hijacking to Defend PowerShell BSidesSF2017
.Net Hijacking to Defend PowerShell BSidesSF2017
 
SETTING METHOD IN CONSIDERATION OF THE PCI/DSS
SETTING METHOD IN CONSIDERATION OF THE PCI/DSSSETTING METHOD IN CONSIDERATION OF THE PCI/DSS
SETTING METHOD IN CONSIDERATION OF THE PCI/DSS
 
Passive infrastructure of FTTH networks: an overview
Passive infrastructure of FTTH networks: an overviewPassive infrastructure of FTTH networks: an overview
Passive infrastructure of FTTH networks: an overview
 
A very quick introduction to HFC, DOCSIS 3.0 and 3.1
A very quick introduction to HFC, DOCSIS 3.0 and 3.1A very quick introduction to HFC, DOCSIS 3.0 and 3.1
A very quick introduction to HFC, DOCSIS 3.0 and 3.1
 
ColdFusion for Penetration Testers
ColdFusion for Penetration TestersColdFusion for Penetration Testers
ColdFusion for Penetration Testers
 
Purple teaming Cyber Kill Chain
Purple teaming Cyber Kill ChainPurple teaming Cyber Kill Chain
Purple teaming Cyber Kill Chain
 
State of the Internet: Mirai, IOT and History of Botnets
State of the Internet: Mirai, IOT and History of BotnetsState of the Internet: Mirai, IOT and History of Botnets
State of the Internet: Mirai, IOT and History of Botnets
 
Building a Successful Internal Adversarial Simulation Team - Chris Gates & Ch...
Building a Successful Internal Adversarial Simulation Team - Chris Gates & Ch...Building a Successful Internal Adversarial Simulation Team - Chris Gates & Ch...
Building a Successful Internal Adversarial Simulation Team - Chris Gates & Ch...
 
Home Arcade setup (NoVA Hackers)
Home Arcade setup (NoVA Hackers)Home Arcade setup (NoVA Hackers)
Home Arcade setup (NoVA Hackers)
 
Security Operation Center - Design & Build
Security Operation Center - Design & BuildSecurity Operation Center - Design & Build
Security Operation Center - Design & Build
 
DevOOPS: Attacks and Defenses for DevOps Toolchains
DevOOPS: Attacks and Defenses for DevOps ToolchainsDevOOPS: Attacks and Defenses for DevOps Toolchains
DevOOPS: Attacks and Defenses for DevOps Toolchains
 
How to Be Awesome on Slideshare
How to Be Awesome on SlideshareHow to Be Awesome on Slideshare
How to Be Awesome on Slideshare
 

Similar to Go Hack Yourself - 10 Pen Test Tactics for Blue Teamers

Derbycon - Passing the Torch
Derbycon - Passing the TorchDerbycon - Passing the Torch
Derbycon - Passing the TorchWill Schroeder
 
The State of the Veil Framework
The State of the Veil FrameworkThe State of the Veil Framework
The State of the Veil FrameworkVeilFramework
 
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
 
Bridging the Gap: Lessons in Adversarial Tradecraft
Bridging the Gap: Lessons in Adversarial TradecraftBridging the Gap: Lessons in Adversarial Tradecraft
Bridging the Gap: Lessons in Adversarial Tradecraftenigma0x3
 
XP Days 2019: First secret delivery for modern cloud-native applications
XP Days 2019: First secret delivery for modern cloud-native applicationsXP Days 2019: First secret delivery for modern cloud-native applications
XP Days 2019: First secret delivery for modern cloud-native applicationsVlad Fedosov
 
Veil-PowerView - NovaHackers
Veil-PowerView - NovaHackersVeil-PowerView - NovaHackers
Veil-PowerView - NovaHackersVeilFramework
 
Trusts You Might Have Missed
Trusts You Might Have MissedTrusts You Might Have Missed
Trusts You Might Have MissedWill Schroeder
 
I got 99 trends and a # is all of them
I got 99 trends and a # is all of themI got 99 trends and a # is all of them
I got 99 trends and a # is all of themRoberto Suggi Liverani
 
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
 
Ceh v8 labs module 05 system hacking
Ceh v8 labs module 05 system hackingCeh v8 labs module 05 system hacking
Ceh v8 labs module 05 system hackingAsep Sopyan
 
Crikeycon 2019 Velociraptor Workshop
Crikeycon 2019 Velociraptor WorkshopCrikeycon 2019 Velociraptor Workshop
Crikeycon 2019 Velociraptor WorkshopVelocidex Enterprises
 
PowerShell - Be A Cool Blue Kid
PowerShell - Be A Cool Blue KidPowerShell - Be A Cool Blue Kid
PowerShell - Be A Cool Blue KidMatthew Johnson
 
Opendaylight SDN Controller
Opendaylight SDN ControllerOpendaylight SDN Controller
Opendaylight SDN ControllerSumit Arora
 
Hacked? Pray that the Attacker used PowerShell
Hacked? Pray that the Attacker used PowerShellHacked? Pray that the Attacker used PowerShell
Hacked? Pray that the Attacker used PowerShellNikhil Mittal
 
OSCP Preparation Guide @ Infosectrain
OSCP Preparation Guide @ InfosectrainOSCP Preparation Guide @ Infosectrain
OSCP Preparation Guide @ InfosectrainInfosecTrain
 
Metasploit: Pwnage and Ponies
Metasploit: Pwnage and PoniesMetasploit: Pwnage and Ponies
Metasploit: Pwnage and PoniesTrowalts
 

Similar to Go Hack Yourself - 10 Pen Test Tactics for Blue Teamers (20)

Derbycon - Passing the Torch
Derbycon - Passing the TorchDerbycon - Passing the Torch
Derbycon - Passing the Torch
 
I Hunt Sys Admins
I Hunt Sys AdminsI Hunt Sys Admins
I Hunt Sys Admins
 
I hunt sys admins 2.0
I hunt sys admins 2.0I hunt sys admins 2.0
I hunt sys admins 2.0
 
The State of the Veil Framework
The State of the Veil FrameworkThe State of the Veil Framework
The State of the Veil Framework
 
Bridging the Gap
Bridging the GapBridging the Gap
Bridging the Gap
 
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
 
Bridging the Gap: Lessons in Adversarial Tradecraft
Bridging the Gap: Lessons in Adversarial TradecraftBridging the Gap: Lessons in Adversarial Tradecraft
Bridging the Gap: Lessons in Adversarial Tradecraft
 
XP Days 2019: First secret delivery for modern cloud-native applications
XP Days 2019: First secret delivery for modern cloud-native applicationsXP Days 2019: First secret delivery for modern cloud-native applications
XP Days 2019: First secret delivery for modern cloud-native applications
 
Veil-PowerView - NovaHackers
Veil-PowerView - NovaHackersVeil-PowerView - NovaHackers
Veil-PowerView - NovaHackers
 
Trusts You Might Have Missed
Trusts You Might Have MissedTrusts You Might Have Missed
Trusts You Might Have Missed
 
I got 99 trends and a # is all of them
I got 99 trends and a # is all of themI got 99 trends and a # is all of them
I got 99 trends and a # is all of them
 
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
 
Ceh v8 labs module 05 system hacking
Ceh v8 labs module 05 system hackingCeh v8 labs module 05 system hacking
Ceh v8 labs module 05 system hacking
 
Crikeycon 2019 Velociraptor Workshop
Crikeycon 2019 Velociraptor WorkshopCrikeycon 2019 Velociraptor Workshop
Crikeycon 2019 Velociraptor Workshop
 
PowerShell - Be A Cool Blue Kid
PowerShell - Be A Cool Blue KidPowerShell - Be A Cool Blue Kid
PowerShell - Be A Cool Blue Kid
 
Opendaylight SDN Controller
Opendaylight SDN ControllerOpendaylight SDN Controller
Opendaylight SDN Controller
 
Bsides final
Bsides finalBsides final
Bsides final
 
Hacked? Pray that the Attacker used PowerShell
Hacked? Pray that the Attacker used PowerShellHacked? Pray that the Attacker used PowerShell
Hacked? Pray that the Attacker used PowerShell
 
OSCP Preparation Guide @ Infosectrain
OSCP Preparation Guide @ InfosectrainOSCP Preparation Guide @ Infosectrain
OSCP Preparation Guide @ Infosectrain
 
Metasploit: Pwnage and Ponies
Metasploit: Pwnage and PoniesMetasploit: Pwnage and Ponies
Metasploit: Pwnage and Ponies
 

Recently uploaded

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 

Recently uploaded (20)

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 

Go Hack Yourself - 10 Pen Test Tactics for Blue Teamers

  • 1. Go Hack Yourself 10 Pen Test Tactics for Blue Teamers Jason Frank Brent Kennedy Will Schroeder
  • 2. Introduction ● @jasonjfrank (Jason Frank) o Manager of Veris Group’s Adaptive Threat Division o Builds and executes penetration testing programs o Black Hat Trainer: Adaptive Penetration Testing ● @bk_up (Brent Kennedy) o Senior pentester at CERT/SEI/CMU o Project lead supporting government customers ● @harmj0y (Will Schroeder) o Security Researcher of Veris Group’s ATD o Veil-Framework & PowerTools ● 12 years experience leading pen test engagements for private and government customers
  • 3. Why Go Hack Yourself? ● Customers want to learn o How do I get started with pentesting? o What tools do you use? o How did you find that site on our network? ● Why don’t blue teamers have black hats? o Lack of knowledge/training o Different mindset. Think like an attacker. o Bad connotation. Will break network.
  • 4. Defending the Castle ● Common problems for defenders: o Inventory o Updating/Upgrading o Consistency o Special requests o Costs o Cannot verify (exploit) vulnerabilities o Politics
  • 5. Attacking the Castle ● What attackers want to discover: o Live hosts/Domain structure o Software/patch levels o Exploitable conditions o Crown jewels ● Attackers and defenders commonly want the same information ● Attackers take the path of least resistance
  • 6. Pros of Hacking Tools ● Smaller scripts, no messy installation o Some run in memory ● Free is cheap ● Straightforward, easy to use ● Minimal network disruption o Valid system calls, traffic
  • 7. Why Focus on Windows? ● Most target organizations use Windows for their userland network enclave ● Linux, DB, *, admins usually have Windows endpoints and domain accounts ● Attack Path o Spear Phish to client Windows endpoint o Escalate in Windows domain o Identify your prey (crown jewels) o Use gained access to pivot  Databases, servers, appliances, fileshares  Admin workstations
  • 8. PowerShell ● Microsoft’s “post-exploitation language” o Lets you stay off of disk, access Windows APIs, access anything in .NET, and is installed by default on Windows 7+ o Makes a phenomenal platform to write hacking tools ● Note: many people think that execution policy restricts attackers from running unsigned scripts o but you can just turn off execution policy on launch with: powershell.exe -exec bypass
  • 9. Our Arsenal ● All free, all open source, and a lot PowerShell focused: o Nmap: still the best port-scanner, with lots of extensible scripts now implemented o EyeWitness: easy web service screenshotting o PowerSploit: the first open-source offensive PowerShell toolkit o PowerUp: check for Windows privesc in seconds o PowerView: dsquery/situational awareness on steroids o Egress-Assess: allows for the controlled simulation of the egress of sensitive data
  • 10. Our Approach 1. Asset discovery (on the cheap) 2. Base image analysis 3. Open fileshares 4. Who are your admins? 5. Where are your admins? 6. How old are their passwords? 7. Do you trust your trusts? 8. Who can admin your DCs? 9. Group Policy Preferences 10.Border egress protections
  • 11. Tactic 1: Asset Discovery ● Mapping a network for targets can be a daunting task in large environments ● Nmap o Cron Job - every 25 hours o Scripted alerts for detected deltas o Utilize latency/timeout features for large networks ● Eyewitness o https://github.com/ChrisTruncer/EyeWitness o Rapid screen grabbing of web sites o Parses Nmap output for web ports o Categorizing sites (High value targets, printers, etc.) o Easy way to discover misconfigured/default installations of web applications
  • 12. Tactic 1: Asset Discovery ● Run Nmap to discover live hosts on the network o nmap -Pn -n -sS -p 21- 23,25,53,111,137,139,445,80,443,3389,5900,8080,8443 --min- rtt-timeout --max-retries 1 --max-scan-delay 0 -oA discovery- scan -vvv --open -iL <Host List> o Get host list: cat discovery-scan.gnmap | grep “open” | cut -d “ “ -f 2 > discovery_ips.txt ● Run Nmap on live hosts with more port checks o nmap -Pn -n --min-rtt-timeout --max-retries 1 --max-scan-delay 0 -oA top1000-scan -vvv --open -iL disovery_ips.txt o Get host list ● Feed Nmap results to EyeWitness o ./EyeWitness.py -f top1000-scan.xml --headless ● Open EyeWitness results in web browser
  • 13.
  • 14. Tactic 2: Base Image Analysis ● The first thing an attacker will do after achieving user access is try to escalate privileges ● Many people think that if their system is patched, there’s no way to privesc o Many privilege escalation vectors are based on custom software and misconfigurations ● Examine your base/SOE image for the same common vectors that attackers are going to look for!
  • 15. Tactic 2: Base Image Analysis ● PowerUp contains checks (and weaponizations) for the most common public Windows privesc vectors o The Invoke-AllChecks function will run through all current checks, highlighting anything that stands out ● PS C:> Import-Module PowerUp.ps1 ● PS C:> Invoke-AllChecks
  • 16. Tactic 2: Base Image Analysis
  • 17. Tactic 3: Open Fileshares ● Almost every organization has improperly secured Windows file shares o Common to find password lists, engineering plans, network diagrams, PII, etc. ● It may be possible for users to create shares on their machines with little to no insight from IT ● Audit these on a regular basis and from a variety of user contexts o i.e. basic no-domain-groups users, as well as users in a variety of common groups
  • 18. Tactic 3: Open Fileshares ● Running PowerView’s Invoke-ShareFinder will enumerate all domain machines and check for open file shares o the -CheckShareAccess flag checks if the current user can access the share o even finds hidden shares! ● PS C:> Import-Module powerview.ps1 ● PS C:> Invoke-ShareFinder -CheckShareAccess
  • 19. Tactic 3: Open Fileshares
  • 20. Tactic 4: Who are your Admins? ● If you have a complex Active Directory setup with lots of delegation, users can sometimes slip through the cracks ● With highly nested groups, users might effectively have highly elevated rights without appearing so o Think something like “Domain Admins” → “Server Admins” → “SubGroup2”
  • 21. Tactic 4: Who are your Admins? ● PowerView’s group commands accept wildcards, meaning you can enumerate all users in a group’s membership o It can also resolve all sub groups recursively down to actual members (i.e. nested groups) ● PS C:> Import-Module powerview.ps1 ● PS C:> Get-NetGroups *admin* | Get- NetGroup -Recurse
  • 22. Tactic 4: Who are your Admins?
  • 23. Tactic 5: Where are your Admins? ● On almost every engagement, we “hunt” for where specific users are logged in o And again, attackers can pull lots of this information from a non-elevated user context! ● Almost all organizations have “non-essential use of elevated access” o Translation: they have domain admins/other high value accounts logged in to lots of places they should not be
  • 24. Tactic 5: Where are your Admins? ● PowerView’s UserHunter modules can track down where specific groups or users are located o This information can be matched up against the group membership information from Tactic 4 ● PS C:> Import-Module powerview.ps1 ● PS C:> Invoke-UserHunter -ShowAll
  • 25. Tactic 5: Where are your Admins?
  • 26. Tactic 6: Stale User Passwords ● Users should be changing their passwords to prevent password compromise/reuse ● Group Policy can enforce it, but users don’t always ● It pays to audit your Active Directory setup o Still a bit of a manual process for most people ● Another quick check is for enabled accounts with passwords older than a certain age
  • 27. Tactic 6: Stale User Passwords ● PowerView has your back: ● PS C:> Import-Module powerview.ps1 ● PS C:> Get-NetUser | ? {$_.whenchanged -lt (Get-Date).AddMonths(-12)} | % {$_.samaccountname}
  • 28. Tactic 6: Stale User Passwords
  • 29. Tactic 7: Do You Trust Your Trusts? ● Domain trusts are usually foreign to people without an AD administrator or a formalized red team background ● If you’re admining a network with multiple domains, you should be aware of how they interact!
  • 30. Tactic 7: Do You Trust Your Trusts? ● PowerView can recursively crawl all reachable domain trust relationships and output to a .csv o yEd (also free) can be used to visualize this data ● PS C:> Import-Module powerview.ps1 ● PS C:> Invoke-MapDomainTrusts | Export-CSV - NoTypeInformation trusts.csv ● *visualize in yEd*
  • 31.
  • 32. Tactic 8: Who Can Admin Your DCs? ● Who has local administrative access on your domain controllers (and other high-value servers)? ● Note: this is different than the domain admins group! o we’re talking about the BUILTIN Administrators group
  • 33. Tactic 8: Who Can Admin Your DCs? ● PowerView’s Get-NetLocalGroup can enumerate this information on remote systems, from an unprivileged user account! ● We can pair this with the function that enumerates all domain controllers ● PS C:> Import-Module powerview.ps1 ● PS C:> Get-NetDomainControllers | Get- NetLocalGroup
  • 34. Tactic 8: Who Can Admin Your DCs?
  • 35. Tactic 9: Group Policy Preferences ● Group Policy Preferences is a mechanism used by some organizations to administer domain machines ● Unfortunately, the key for the “encrypted passwords” in GPP is static, and was published online by Microsoft ● This means that any user can pull and decrypt these passwords, if they are there
  • 36. Tactic 9: Group Policy Preferences ● PowerSploit has a module which will search domain controllers for the appropriate policy .xmls, extract any found passwords, and automatically decrypt them ● PS C:> Import-Module PowerSploit.ps1 ● PS C:> Get-GPPPassword
  • 37. Tactic 9: Group Policy Preferences
  • 38. Tactic 10: Border Egress Protections ● Attackers often will move pilfered data to a single internal server and exfil in one swoop o Seeing massive exfil is often the first sign an organization sees that they’ve been owned ● Many companies believe vendor claims that their border appliances will detect this behavior o But few bother (or know how) to test this ● Blind spots often exist
  • 39. Tactic 10: Border Egress Protections ● Server Syntax (Internet Border Host) o In Linux: ./Egress-Assess.py --server http ● Client Syntax o On Windows Powershell once imported: Invoke- EgressAssess -client http -ip SERVER_IP -datatype
  • 40.
  • 41. Go Hack Yourself! (Conclusion) ● “Hacker” tools can be used to efficiently perform sysadmin and defender tasks ● Tactics are repeatable actions that cause minimal network interference o Run them while drinking your coffee! ● Finding misconfigurations with AD and other network resources can limit attack vectors ● Free solutions that let blue teamers demonstrate immediate impact o Gain the political capital to spend money :)
  • 42. Questions? • Contact Us: – Jason Frank - @jasonjfrank – jfrank@verisgroup.com – Brent Kennedy - @bk_up – bkennedy@cert.org – Will Schroeder - @harmj0y – will@harmj0y.net • Read More: – http://www.verisgroup.com/category/adaptive-threat-division/ – http://blog.harmj0y.net • Get The Tools: – http://www.verisgroup.com/adaptive-threat-division/resources/ – https://github.com/mattifestation/PowerSploit – https://nmap.org