SlideShare a Scribd company logo
fox-it.com
Dirk-jan Mollema
@_dirkjan
Aclpwn.py – Active Directory ACL
exploitation with BloodHound
fox-it.com
- Lives in The Netherlands
- Hacker / Red Teamer / Researcher @ Fox-IT since 2016
- Previously freelance webdeveloper
- Author of several Active Directory tools:
- mitm6
- ldapdomaindump
- BloodHound.py
- Co-author of ntlmrelayx
- Blogs on dirkjanm.io
- Tweets stuff on @_dirkjan
Whoami
fox-it.com
• What are ACLs
• Common ACL abuse paths
• aclpwn.py concepts
• Using aclpwn.py
Contents
fox-it.com
• https://github.com/ANSSI-FR/AD-control-paths
(Emmanuel Gras and Lucas Bouillot from ANSSI – 2014)
• “An ACE up the Sleeve” – BH USA 2017
(by @_wald0 and @harmj0y)
• BloodHound
(@_wald0, @harmj0y and @CptJesus)
Abusing ACLs – prior work
fox-it.com
What are ACLs – the short version
fox-it.com
• In Active Directory, an ACL defines who can do what on an object
• Objects:
• Users
• Groups
• Computers
• Domain(s)
What are ACLs – the short version
fox-it.com
• Access Control List
• SACL – used for auditing access
• DACL – used for defining who has what access on an object
• DACL exists of ACEs
• Access Control Entries
What are ACLs - Terminology
fox-it.com
ACLs are hard
???
fox-it.com
ACLs are hard (2)
??? ?????
fox-it.com
ACLs are hard (3)
???
!!!
fox-it.com
• Even some default ACLs are too complex for the UI to display
• We can’t realistically expect sysadmins to keep track of ACLs or to
fully understand their impact
• Especially not if they are inherited or nested
• Tooling is needed!
ACLs are hard!
fox-it.com
• BloodHound 1.3 introduced the ACL update
• Makes it easy to identify ACLs
• Identify them with SharpHound.exe -c ACL
• Not yet supported in BloodHound.py (but work in progress)
Mapping ACLs with BloodHound
Source: https://wald0.com/?p=112
fox-it.com
ACL abuse – case studies
fox-it.com
• By default “Exchange Windows Permissions” has wide-reaching
privileges in the domain
• Including WriteDacl on the Domain object
• Allows any Exchange Server to grant DCSync privileges
• Effectively: local admin on Exchange Server = Domain Admin
Bad ACLs – Case study 1: Exchange
Sources:
- https://www.specterops.io/assets/resources/an_ace_up_the_sleeve.pdf
- https://github.com/gdedrouas/Exchange-AD-Privesc
- https://blog.fox-it.com/2018/04/26/escalating-privileges-with-acls-in-active-directory/
fox-it.com
Bad ACLs – Case study 1: Exchange
fox-it.com
• No need to run anything on the Exchange server
• Just dump hashes of machine account and feed them to aclpwn.py
• Aclpwn.py will pass-the-hash and gain privileges
• DCSync with secretsdump.py (impacket)
Bad ACLs – Case study 1: Exchange
fox-it.com
• ADPREP in Server 2016 introduces an “Enterprise Key Admins”
group
• This group has full control over the Domain object (before v1709)
• Allows Account Operators to obtain DCSync privileges
Bad ACLs – Case study 2: Enterprise key admins
Sources:
- https://secureidentity.se/adprep-bug-in-windows-server-2016/
- My lab ☺
fox-it.com
Bad ACLs – Case study 2: Enterprise key admins
fox-it.com
WriteDacl on Domain object => DCSync privileges
fox-it.com
Exploiting ACLs
fox-it.com
• PowerSploit (https://github.com/PowerShellMafia/PowerSploit)
• Manual exploitation only
• Can be confusing if there are multiple steps in the chain
• Complex to use with machine accounts or pass-the-hash
• Invoke-AclPwn (https://github.com/fox-it/Invoke-ACLPwn)
• Automated pathfinding
• Parses SharpHound output on host (slow)
• Limited scenario’s
• Complex to use with machine accounts or pass-the-hash
Existing ACL exploitation tools and their limitations
fox-it.com
• Direct integration with BloodHound and the Neo4j graph database
• Supports any reversible ACL based attack chain
• Advanced pathfinding to find the most efficient paths
• Support for exploitation with NTLM hashes (pass-the-hash)
• Saves restore state, easy rollback of changes
• Can be run via a SOCKS tunnel
• Written in Python (2.7 and 3.5+), so OS independent
aclpwn.py
fox-it.com
• Find an exploitation path
• Start at a user/computer
• End at a group or domain
• aclpwn.py finds the most efficient path
• Objects are modified to obtain the required access
• After action on objectives is achieved, path is walked in reverse
and privileges are restored
aclpwn.py - the concept
fox-it.com
Pathfinding difficulties
fox-it.com
• Shortest path is not always the most efficient path
• Neo4j counts path length based on number of nodes
• If we have the following scenario:
• User “test” is member of group A
• Group A is member of group B
• Group B is member of group C
• Group C is member of Domain Admins
• AND user “test” has AddMember on Domain Admins
• Neo4j will see the path (Test)-[AddMember]->(Domain Admins) as shortest.
• Even if user A is effectively already a domain admin
Pathfinding with Neo4j
fox-it.com
Solution: weighed paths
Weight: 0
Weight: 1
fox-it.com
• Either calculated manually (faster but less accurate, may miss
paths)
• Or discovered using the Dijkstra algorithm (slower, but more
accurate)
• Different weights for different modification parameters
Weighed paths
fox-it.com
• Shortest only:
• Dijkstra:
Pathfinding methods
fox-it.com
Path is found and validated
fox-it.com
Example: escalating from account operators
fox-it.com
Example: escalating from account operators
fox-it.com
• ForceChangePassword:
• We have the right to change the user’s password
• Not easily possible to restore afterwards (only with dcshadow or
setntlm)
• Not supported for now
• Solution: split the path, perform password reset manually
• WriteOwner:
• Seems to be limited to set the owner to your own user
• Not possible to restore right now
• Needs more investigation
Non-supported edges and limitations
fox-it.com
• Aclpwn will remember state during exploitation
• Possible to restore all operations using --restore option
• Different restore strategies
Restore operation
fox-it.com
Restore example
fox-it.com
Defenses
fox-it.com
• Audit your ACLs!
• Use BloodHound
• Remove dangerous ACLs (for example Exchange)
• Restrict permission delegation
• Admin on Exchange Server => Domain Admin
• Admin on Azure AD connect host => Domain Admin
• Resetting password of high privilege users => Domain Admin
• Managing groups with high privileges => Domain Admin
Defending against ACL attacks
fox-it.com
• Monitor for ACL changes
• Use SACLs to generate events for important object modifications
• Use event logging to monitor DACL changes
• See: https://blog.fox-it.com/2018/04/26/escalating-privileges-with-
acls-in-active-directory/
Defending against ACL attacks
fox-it.com
Conclusions
fox-it.com
• ACL attacks are still relatively unknown
• But present in almost every Active Directory
• You don’t need a Domain Admin session to pwn the domain
• More tooling will (hopefully) raise awareness for this issue
Conclusions
fox-it.com
• Online at https://github.com/fox-it/aclpwn.py
• Follow me on Twitter to keep up-to-date with my work (@_dirkjan)
• I’ll be demo-ing aclpwn.py this afternoon tomorrow morning
• Feel free to drop by for any questions! ☺
Get the tools
fox-it.com
Dirk-jan Mollema
Aclpwn.py – Active Directory ACL
exploitation with BloodHound

More Related Content

What's hot

DerbyCon 2019 - Kerberoasting Revisited
DerbyCon 2019 - Kerberoasting RevisitedDerbyCon 2019 - Kerberoasting Revisited
DerbyCon 2019 - Kerberoasting Revisited
Will Schroeder
 
Abusing Microsoft Kerberos - Sorry you guys don't get it
Abusing Microsoft Kerberos - Sorry you guys don't get itAbusing Microsoft Kerberos - Sorry you guys don't get it
Abusing Microsoft Kerberos - Sorry you guys don't get it
Benjamin Delpy
 
(Ab)Using GPOs for Active Directory Pwnage
(Ab)Using GPOs for Active Directory Pwnage(Ab)Using GPOs for Active Directory Pwnage
(Ab)Using GPOs for Active Directory Pwnage
Petros Koutroumpis
 
Evading Microsoft ATA for Active Directory Domination
Evading Microsoft ATA for Active Directory DominationEvading Microsoft ATA for Active Directory Domination
Evading Microsoft ATA for Active Directory Domination
Nikhil Mittal
 
PSConfEU - Offensive Active Directory (With PowerShell!)
PSConfEU - Offensive Active Directory (With PowerShell!)PSConfEU - Offensive Active Directory (With PowerShell!)
PSConfEU - Offensive Active Directory (With PowerShell!)
Will Schroeder
 
Troopers 19 - I am AD FS and So Can You
Troopers 19 - I am AD FS and So Can YouTroopers 19 - I am AD FS and So Can You
Troopers 19 - I am AD FS and So Can You
Douglas Bienstock
 
0wn-premises: Bypassing Microsoft Defender for Identity
0wn-premises: Bypassing Microsoft Defender for Identity0wn-premises: Bypassing Microsoft Defender for Identity
0wn-premises: Bypassing Microsoft Defender for Identity
Nikhil Mittal
 
Carlos García - Pentesting Active Directory Forests [rooted2019]
Carlos García - Pentesting Active Directory Forests [rooted2019]Carlos García - Pentesting Active Directory Forests [rooted2019]
Carlos García - Pentesting Active Directory Forests [rooted2019]
RootedCON
 
I hunt sys admins 2.0
I hunt sys admins 2.0I hunt sys admins 2.0
I hunt sys admins 2.0
Will Schroeder
 
The Unintended Risks of Trusting Active Directory
The Unintended Risks of Trusting Active DirectoryThe Unintended Risks of Trusting Active Directory
The Unintended Risks of Trusting Active Directory
Will Schroeder
 
SpecterOps Webinar Week - Kerberoasting Revisisted
SpecterOps Webinar Week - Kerberoasting RevisistedSpecterOps Webinar Week - Kerberoasting Revisisted
SpecterOps Webinar Week - Kerberoasting Revisisted
Will Schroeder
 
Ready player 2 Multiplayer Red Teaming Against macOS
Ready player 2  Multiplayer Red Teaming Against macOSReady player 2  Multiplayer Red Teaming Against macOS
Ready player 2 Multiplayer Red Teaming Against macOS
Cody Thomas
 
An ACE in the Hole - Stealthy Host Persistence via Security Descriptors
An ACE in the Hole - Stealthy Host Persistence via Security DescriptorsAn ACE in the Hole - Stealthy Host Persistence via Security Descriptors
An ACE in the Hole - Stealthy Host Persistence via Security Descriptors
Will Schroeder
 
How fun of privilege escalation Red Pill2017
How fun of privilege escalation  Red Pill2017How fun of privilege escalation  Red Pill2017
How fun of privilege escalation Red Pill2017
Ammarit Thongthua ,CISSP CISM GXPN CSSLP CCNP
 
Red Team Methodology - A Naked Look
Red Team Methodology - A Naked LookRed Team Methodology - A Naked Look
Red Team Methodology - A Naked Look
Jason Lang
 
Defending Your "Gold"
Defending Your "Gold"Defending Your "Gold"
Defending Your "Gold"
Will Schroeder
 
Windows Privilege Escalation
Windows Privilege EscalationWindows Privilege Escalation
Windows Privilege Escalation
Riyaz Walikar
 
Derbycon - Passing the Torch
Derbycon - Passing the TorchDerbycon - Passing the Torch
Derbycon - Passing the Torch
Will Schroeder
 
AMSI: How Windows 10 Plans to Stop Script-Based Attacks and How Well It Does It
AMSI: How Windows 10 Plans to Stop Script-Based Attacks and How Well It Does ItAMSI: How Windows 10 Plans to Stop Script-Based Attacks and How Well It Does It
AMSI: How Windows 10 Plans to Stop Script-Based Attacks and How Well It Does It
Nikhil Mittal
 
No Easy Breach DerbyCon 2016
No Easy Breach DerbyCon 2016No Easy Breach DerbyCon 2016
No Easy Breach DerbyCon 2016
Matthew Dunwoody
 

What's hot (20)

DerbyCon 2019 - Kerberoasting Revisited
DerbyCon 2019 - Kerberoasting RevisitedDerbyCon 2019 - Kerberoasting Revisited
DerbyCon 2019 - Kerberoasting Revisited
 
Abusing Microsoft Kerberos - Sorry you guys don't get it
Abusing Microsoft Kerberos - Sorry you guys don't get itAbusing Microsoft Kerberos - Sorry you guys don't get it
Abusing Microsoft Kerberos - Sorry you guys don't get it
 
(Ab)Using GPOs for Active Directory Pwnage
(Ab)Using GPOs for Active Directory Pwnage(Ab)Using GPOs for Active Directory Pwnage
(Ab)Using GPOs for Active Directory Pwnage
 
Evading Microsoft ATA for Active Directory Domination
Evading Microsoft ATA for Active Directory DominationEvading Microsoft ATA for Active Directory Domination
Evading Microsoft ATA for Active Directory Domination
 
PSConfEU - Offensive Active Directory (With PowerShell!)
PSConfEU - Offensive Active Directory (With PowerShell!)PSConfEU - Offensive Active Directory (With PowerShell!)
PSConfEU - Offensive Active Directory (With PowerShell!)
 
Troopers 19 - I am AD FS and So Can You
Troopers 19 - I am AD FS and So Can YouTroopers 19 - I am AD FS and So Can You
Troopers 19 - I am AD FS and So Can You
 
0wn-premises: Bypassing Microsoft Defender for Identity
0wn-premises: Bypassing Microsoft Defender for Identity0wn-premises: Bypassing Microsoft Defender for Identity
0wn-premises: Bypassing Microsoft Defender for Identity
 
Carlos García - Pentesting Active Directory Forests [rooted2019]
Carlos García - Pentesting Active Directory Forests [rooted2019]Carlos García - Pentesting Active Directory Forests [rooted2019]
Carlos García - Pentesting Active Directory Forests [rooted2019]
 
I hunt sys admins 2.0
I hunt sys admins 2.0I hunt sys admins 2.0
I hunt sys admins 2.0
 
The Unintended Risks of Trusting Active Directory
The Unintended Risks of Trusting Active DirectoryThe Unintended Risks of Trusting Active Directory
The Unintended Risks of Trusting Active Directory
 
SpecterOps Webinar Week - Kerberoasting Revisisted
SpecterOps Webinar Week - Kerberoasting RevisistedSpecterOps Webinar Week - Kerberoasting Revisisted
SpecterOps Webinar Week - Kerberoasting Revisisted
 
Ready player 2 Multiplayer Red Teaming Against macOS
Ready player 2  Multiplayer Red Teaming Against macOSReady player 2  Multiplayer Red Teaming Against macOS
Ready player 2 Multiplayer Red Teaming Against macOS
 
An ACE in the Hole - Stealthy Host Persistence via Security Descriptors
An ACE in the Hole - Stealthy Host Persistence via Security DescriptorsAn ACE in the Hole - Stealthy Host Persistence via Security Descriptors
An ACE in the Hole - Stealthy Host Persistence via Security Descriptors
 
How fun of privilege escalation Red Pill2017
How fun of privilege escalation  Red Pill2017How fun of privilege escalation  Red Pill2017
How fun of privilege escalation Red Pill2017
 
Red Team Methodology - A Naked Look
Red Team Methodology - A Naked LookRed Team Methodology - A Naked Look
Red Team Methodology - A Naked Look
 
Defending Your "Gold"
Defending Your "Gold"Defending Your "Gold"
Defending Your "Gold"
 
Windows Privilege Escalation
Windows Privilege EscalationWindows Privilege Escalation
Windows Privilege Escalation
 
Derbycon - Passing the Torch
Derbycon - Passing the TorchDerbycon - Passing the Torch
Derbycon - Passing the Torch
 
AMSI: How Windows 10 Plans to Stop Script-Based Attacks and How Well It Does It
AMSI: How Windows 10 Plans to Stop Script-Based Attacks and How Well It Does ItAMSI: How Windows 10 Plans to Stop Script-Based Attacks and How Well It Does It
AMSI: How Windows 10 Plans to Stop Script-Based Attacks and How Well It Does It
 
No Easy Breach DerbyCon 2016
No Easy Breach DerbyCon 2016No Easy Breach DerbyCon 2016
No Easy Breach DerbyCon 2016
 

Similar to aclpwn - Active Directory ACL exploitation with BloodHound

Top school in noida
Top school in noidaTop school in noida
Top school in noida
Edhole.com
 
OSMC 2016 - Monitor your infrastructure with Elastic Beats by Monica Sarbu
OSMC 2016 - Monitor your infrastructure with Elastic Beats by Monica SarbuOSMC 2016 - Monitor your infrastructure with Elastic Beats by Monica Sarbu
OSMC 2016 - Monitor your infrastructure with Elastic Beats by Monica Sarbu
NETWAYS
 
OSMC 2016 | Monitor your Infrastructure with Elastic Beats by Monica Sarbu
OSMC 2016 | Monitor your Infrastructure with Elastic Beats by Monica SarbuOSMC 2016 | Monitor your Infrastructure with Elastic Beats by Monica Sarbu
OSMC 2016 | Monitor your Infrastructure with Elastic Beats by Monica Sarbu
NETWAYS
 
BSides SG Practical Red Teaming Workshop
BSides SG Practical Red Teaming WorkshopBSides SG Practical Red Teaming Workshop
BSides SG Practical Red Teaming Workshop
Ajay Choudhary
 
Data Publication and Discovery with Globus
Data Publication and Discovery with GlobusData Publication and Discovery with Globus
Data Publication and Discovery with Globus
Globus
 
Apache Performance Tuning: Scaling Up
Apache Performance Tuning: Scaling UpApache Performance Tuning: Scaling Up
Apache Performance Tuning: Scaling Up
Sander Temme
 
Introduction to Laravel Framework (5.2)
Introduction to Laravel Framework (5.2)Introduction to Laravel Framework (5.2)
Introduction to Laravel Framework (5.2)
Viral Solani
 
REST Api Tips and Tricks
REST Api Tips and TricksREST Api Tips and Tricks
REST Api Tips and Tricks
Maksym Bruner
 
Power on, Powershell
Power on, PowershellPower on, Powershell
Power on, PowershellRoo7break
 
airflow web UI and CLI.pptx
airflow web UI and CLI.pptxairflow web UI and CLI.pptx
airflow web UI and CLI.pptx
VIJAYAPRABAP
 
airflowpresentation1-180717183432.pptx
airflowpresentation1-180717183432.pptxairflowpresentation1-180717183432.pptx
airflowpresentation1-180717183432.pptx
VIJAYAPRABAP
 
Introduction to the Globus PaaS (GlobusWorld Tour - STFC)
Introduction to the Globus PaaS (GlobusWorld Tour - STFC)Introduction to the Globus PaaS (GlobusWorld Tour - STFC)
Introduction to the Globus PaaS (GlobusWorld Tour - STFC)
Globus
 
Leveraging the Globus Platform (GlobusWorld Tour - UCSD)
Leveraging the Globus Platform (GlobusWorld Tour - UCSD)Leveraging the Globus Platform (GlobusWorld Tour - UCSD)
Leveraging the Globus Platform (GlobusWorld Tour - UCSD)
Globus
 
Topic 3-1_More_Linux_Commands.pptx
Topic 3-1_More_Linux_Commands.pptxTopic 3-1_More_Linux_Commands.pptx
Topic 3-1_More_Linux_Commands.pptx
dulala3
 
Airflow presentation
Airflow presentationAirflow presentation
Airflow presentation
Ilias Okacha
 
The Google Chubby lock service for loosely-coupled distributed systems
The Google Chubby lock service for loosely-coupled distributed systemsThe Google Chubby lock service for loosely-coupled distributed systems
The Google Chubby lock service for loosely-coupled distributed systems
Romain Jacotin
 
Leveraging the Globus Platform (GlobusWorld Tour - Columbia University)
Leveraging the Globus Platform (GlobusWorld Tour - Columbia University)Leveraging the Globus Platform (GlobusWorld Tour - Columbia University)
Leveraging the Globus Platform (GlobusWorld Tour - Columbia University)
Globus
 
Solr Recipes
Solr RecipesSolr Recipes
Solr Recipes
Erik Hatcher
 
Introduction to Globus: Research Data Management Software at the ALCF
Introduction to Globus: Research Data Management Software at the ALCFIntroduction to Globus: Research Data Management Software at the ALCF
Introduction to Globus: Research Data Management Software at the ALCF
Globus
 
Jupyter + Globus: The Foundation for Interactive Data Science
Jupyter + Globus: The Foundation for Interactive Data ScienceJupyter + Globus: The Foundation for Interactive Data Science
Jupyter + Globus: The Foundation for Interactive Data Science
Globus
 

Similar to aclpwn - Active Directory ACL exploitation with BloodHound (20)

Top school in noida
Top school in noidaTop school in noida
Top school in noida
 
OSMC 2016 - Monitor your infrastructure with Elastic Beats by Monica Sarbu
OSMC 2016 - Monitor your infrastructure with Elastic Beats by Monica SarbuOSMC 2016 - Monitor your infrastructure with Elastic Beats by Monica Sarbu
OSMC 2016 - Monitor your infrastructure with Elastic Beats by Monica Sarbu
 
OSMC 2016 | Monitor your Infrastructure with Elastic Beats by Monica Sarbu
OSMC 2016 | Monitor your Infrastructure with Elastic Beats by Monica SarbuOSMC 2016 | Monitor your Infrastructure with Elastic Beats by Monica Sarbu
OSMC 2016 | Monitor your Infrastructure with Elastic Beats by Monica Sarbu
 
BSides SG Practical Red Teaming Workshop
BSides SG Practical Red Teaming WorkshopBSides SG Practical Red Teaming Workshop
BSides SG Practical Red Teaming Workshop
 
Data Publication and Discovery with Globus
Data Publication and Discovery with GlobusData Publication and Discovery with Globus
Data Publication and Discovery with Globus
 
Apache Performance Tuning: Scaling Up
Apache Performance Tuning: Scaling UpApache Performance Tuning: Scaling Up
Apache Performance Tuning: Scaling Up
 
Introduction to Laravel Framework (5.2)
Introduction to Laravel Framework (5.2)Introduction to Laravel Framework (5.2)
Introduction to Laravel Framework (5.2)
 
REST Api Tips and Tricks
REST Api Tips and TricksREST Api Tips and Tricks
REST Api Tips and Tricks
 
Power on, Powershell
Power on, PowershellPower on, Powershell
Power on, Powershell
 
airflow web UI and CLI.pptx
airflow web UI and CLI.pptxairflow web UI and CLI.pptx
airflow web UI and CLI.pptx
 
airflowpresentation1-180717183432.pptx
airflowpresentation1-180717183432.pptxairflowpresentation1-180717183432.pptx
airflowpresentation1-180717183432.pptx
 
Introduction to the Globus PaaS (GlobusWorld Tour - STFC)
Introduction to the Globus PaaS (GlobusWorld Tour - STFC)Introduction to the Globus PaaS (GlobusWorld Tour - STFC)
Introduction to the Globus PaaS (GlobusWorld Tour - STFC)
 
Leveraging the Globus Platform (GlobusWorld Tour - UCSD)
Leveraging the Globus Platform (GlobusWorld Tour - UCSD)Leveraging the Globus Platform (GlobusWorld Tour - UCSD)
Leveraging the Globus Platform (GlobusWorld Tour - UCSD)
 
Topic 3-1_More_Linux_Commands.pptx
Topic 3-1_More_Linux_Commands.pptxTopic 3-1_More_Linux_Commands.pptx
Topic 3-1_More_Linux_Commands.pptx
 
Airflow presentation
Airflow presentationAirflow presentation
Airflow presentation
 
The Google Chubby lock service for loosely-coupled distributed systems
The Google Chubby lock service for loosely-coupled distributed systemsThe Google Chubby lock service for loosely-coupled distributed systems
The Google Chubby lock service for loosely-coupled distributed systems
 
Leveraging the Globus Platform (GlobusWorld Tour - Columbia University)
Leveraging the Globus Platform (GlobusWorld Tour - Columbia University)Leveraging the Globus Platform (GlobusWorld Tour - Columbia University)
Leveraging the Globus Platform (GlobusWorld Tour - Columbia University)
 
Solr Recipes
Solr RecipesSolr Recipes
Solr Recipes
 
Introduction to Globus: Research Data Management Software at the ALCF
Introduction to Globus: Research Data Management Software at the ALCFIntroduction to Globus: Research Data Management Software at the ALCF
Introduction to Globus: Research Data Management Software at the ALCF
 
Jupyter + Globus: The Foundation for Interactive Data Science
Jupyter + Globus: The Foundation for Interactive Data ScienceJupyter + Globus: The Foundation for Interactive Data Science
Jupyter + Globus: The Foundation for Interactive Data Science
 

Recently uploaded

How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
XfilesPro
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
takuyayamamoto1800
 
Software Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdfSoftware Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdf
MayankTawar1
 
Designing for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesDesigning for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web Services
KrzysztofKkol1
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Natan Silnitsky
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
Tier1 app
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
IES VE
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
Globus
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Globus
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Globus
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
Georgi Kodinov
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke
 
Why React Native as a Strategic Advantage for Startup Innovation.pdf
Why React Native as a Strategic Advantage for Startup Innovation.pdfWhy React Native as a Strategic Advantage for Startup Innovation.pdf
Why React Native as a Strategic Advantage for Startup Innovation.pdf
ayushiqss
 

Recently uploaded (20)

How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 
Software Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdfSoftware Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdf
 
Designing for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesDesigning for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web Services
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
Why React Native as a Strategic Advantage for Startup Innovation.pdf
Why React Native as a Strategic Advantage for Startup Innovation.pdfWhy React Native as a Strategic Advantage for Startup Innovation.pdf
Why React Native as a Strategic Advantage for Startup Innovation.pdf
 

aclpwn - Active Directory ACL exploitation with BloodHound

  • 1. fox-it.com Dirk-jan Mollema @_dirkjan Aclpwn.py – Active Directory ACL exploitation with BloodHound
  • 2. fox-it.com - Lives in The Netherlands - Hacker / Red Teamer / Researcher @ Fox-IT since 2016 - Previously freelance webdeveloper - Author of several Active Directory tools: - mitm6 - ldapdomaindump - BloodHound.py - Co-author of ntlmrelayx - Blogs on dirkjanm.io - Tweets stuff on @_dirkjan Whoami
  • 3. fox-it.com • What are ACLs • Common ACL abuse paths • aclpwn.py concepts • Using aclpwn.py Contents
  • 4. fox-it.com • https://github.com/ANSSI-FR/AD-control-paths (Emmanuel Gras and Lucas Bouillot from ANSSI – 2014) • “An ACE up the Sleeve” – BH USA 2017 (by @_wald0 and @harmj0y) • BloodHound (@_wald0, @harmj0y and @CptJesus) Abusing ACLs – prior work
  • 5. fox-it.com What are ACLs – the short version
  • 6. fox-it.com • In Active Directory, an ACL defines who can do what on an object • Objects: • Users • Groups • Computers • Domain(s) What are ACLs – the short version
  • 7. fox-it.com • Access Control List • SACL – used for auditing access • DACL – used for defining who has what access on an object • DACL exists of ACEs • Access Control Entries What are ACLs - Terminology
  • 9. fox-it.com ACLs are hard (2) ??? ?????
  • 11. fox-it.com • Even some default ACLs are too complex for the UI to display • We can’t realistically expect sysadmins to keep track of ACLs or to fully understand their impact • Especially not if they are inherited or nested • Tooling is needed! ACLs are hard!
  • 12. fox-it.com • BloodHound 1.3 introduced the ACL update • Makes it easy to identify ACLs • Identify them with SharpHound.exe -c ACL • Not yet supported in BloodHound.py (but work in progress) Mapping ACLs with BloodHound Source: https://wald0.com/?p=112
  • 13. fox-it.com ACL abuse – case studies
  • 14. fox-it.com • By default “Exchange Windows Permissions” has wide-reaching privileges in the domain • Including WriteDacl on the Domain object • Allows any Exchange Server to grant DCSync privileges • Effectively: local admin on Exchange Server = Domain Admin Bad ACLs – Case study 1: Exchange Sources: - https://www.specterops.io/assets/resources/an_ace_up_the_sleeve.pdf - https://github.com/gdedrouas/Exchange-AD-Privesc - https://blog.fox-it.com/2018/04/26/escalating-privileges-with-acls-in-active-directory/
  • 15. fox-it.com Bad ACLs – Case study 1: Exchange
  • 16. fox-it.com • No need to run anything on the Exchange server • Just dump hashes of machine account and feed them to aclpwn.py • Aclpwn.py will pass-the-hash and gain privileges • DCSync with secretsdump.py (impacket) Bad ACLs – Case study 1: Exchange
  • 17. fox-it.com • ADPREP in Server 2016 introduces an “Enterprise Key Admins” group • This group has full control over the Domain object (before v1709) • Allows Account Operators to obtain DCSync privileges Bad ACLs – Case study 2: Enterprise key admins Sources: - https://secureidentity.se/adprep-bug-in-windows-server-2016/ - My lab ☺
  • 18. fox-it.com Bad ACLs – Case study 2: Enterprise key admins
  • 19. fox-it.com WriteDacl on Domain object => DCSync privileges
  • 21. fox-it.com • PowerSploit (https://github.com/PowerShellMafia/PowerSploit) • Manual exploitation only • Can be confusing if there are multiple steps in the chain • Complex to use with machine accounts or pass-the-hash • Invoke-AclPwn (https://github.com/fox-it/Invoke-ACLPwn) • Automated pathfinding • Parses SharpHound output on host (slow) • Limited scenario’s • Complex to use with machine accounts or pass-the-hash Existing ACL exploitation tools and their limitations
  • 22. fox-it.com • Direct integration with BloodHound and the Neo4j graph database • Supports any reversible ACL based attack chain • Advanced pathfinding to find the most efficient paths • Support for exploitation with NTLM hashes (pass-the-hash) • Saves restore state, easy rollback of changes • Can be run via a SOCKS tunnel • Written in Python (2.7 and 3.5+), so OS independent aclpwn.py
  • 23. fox-it.com • Find an exploitation path • Start at a user/computer • End at a group or domain • aclpwn.py finds the most efficient path • Objects are modified to obtain the required access • After action on objectives is achieved, path is walked in reverse and privileges are restored aclpwn.py - the concept
  • 25. fox-it.com • Shortest path is not always the most efficient path • Neo4j counts path length based on number of nodes • If we have the following scenario: • User “test” is member of group A • Group A is member of group B • Group B is member of group C • Group C is member of Domain Admins • AND user “test” has AddMember on Domain Admins • Neo4j will see the path (Test)-[AddMember]->(Domain Admins) as shortest. • Even if user A is effectively already a domain admin Pathfinding with Neo4j
  • 27. fox-it.com • Either calculated manually (faster but less accurate, may miss paths) • Or discovered using the Dijkstra algorithm (slower, but more accurate) • Different weights for different modification parameters Weighed paths
  • 28. fox-it.com • Shortest only: • Dijkstra: Pathfinding methods
  • 29. fox-it.com Path is found and validated
  • 32. fox-it.com • ForceChangePassword: • We have the right to change the user’s password • Not easily possible to restore afterwards (only with dcshadow or setntlm) • Not supported for now • Solution: split the path, perform password reset manually • WriteOwner: • Seems to be limited to set the owner to your own user • Not possible to restore right now • Needs more investigation Non-supported edges and limitations
  • 33. fox-it.com • Aclpwn will remember state during exploitation • Possible to restore all operations using --restore option • Different restore strategies Restore operation
  • 36. fox-it.com • Audit your ACLs! • Use BloodHound • Remove dangerous ACLs (for example Exchange) • Restrict permission delegation • Admin on Exchange Server => Domain Admin • Admin on Azure AD connect host => Domain Admin • Resetting password of high privilege users => Domain Admin • Managing groups with high privileges => Domain Admin Defending against ACL attacks
  • 37. fox-it.com • Monitor for ACL changes • Use SACLs to generate events for important object modifications • Use event logging to monitor DACL changes • See: https://blog.fox-it.com/2018/04/26/escalating-privileges-with- acls-in-active-directory/ Defending against ACL attacks
  • 39. fox-it.com • ACL attacks are still relatively unknown • But present in almost every Active Directory • You don’t need a Domain Admin session to pwn the domain • More tooling will (hopefully) raise awareness for this issue Conclusions
  • 40. fox-it.com • Online at https://github.com/fox-it/aclpwn.py • Follow me on Twitter to keep up-to-date with my work (@_dirkjan) • I’ll be demo-ing aclpwn.py this afternoon tomorrow morning • Feel free to drop by for any questions! ☺ Get the tools
  • 41. fox-it.com Dirk-jan Mollema Aclpwn.py – Active Directory ACL exploitation with BloodHound