SlideShare a Scribd company logo
Offensive Active
Directory
Will Schroeder (@harmj0y)
With PowerShell!
Agenda
• Offensive Active Directory 101
• Hunting for Users
• Local Administrator Enumeration
• GPO Enumeration and Abuse
• Active Directory ACLs
• Domain Trusts
Offensive AD 101
• Red teams and ‘real’ bad guys have been
abusing AD for years, but not much
offensive AD information has existed
publicly (until recently)
• See http://adsecurity.org/
• A lot of what we do on a red team is
essentially just (authorized) domain
administration
• We find misconfigurations and chain
access/trust relationships to turn one
PowerView
• A pure PowerShell domain/network
situational awareness tool
• Version 2.0 compliant
• Fully self-contained and loadable in memory
• Now part of PowerSploit™ (not really
trademarked)
• Many modules are implemented in Empire
• Built to automate large components of the
tradecraft on our red team engagements
Sidenote
“The best tool these days
for understanding windows
networks is Powerview
[1].”
-Phineas Fisher
http://pastebin.com/raw/0SNSvyjJ
Hunting for Users
• On nearly every engagement, we end up
wanting to know where specific users are
logged in
• We break this down into:
• Pre-elevated access, where we have regular
domain user privileges. This is out “lateral
spread” phase
• Post-elevated access, where we have some type
of elevated (e.g. Domain Admin) access. This
is usually our ‘demonstrate impact’ phase
Win32 API Access
• Several techniques we rely on for user-
hunting depend on various Windows API
calls
• Specifically NetWkstaUserEnum and
NetSessionEnum
• There are several methods to access these
API calls through PowerShell
• C# Add-Type, straight reflection, PSReflect
• See Matt Graeber’s US PowerShell Summit
talk on Win32 API access for more details
• Windows allows any domain-authenticated
user to enumerate the members of a local
group on a remote machine
• Either through the NetLocalGroupGetMembers
Win32 API call or the WinNT service provider
• “Derivative Local Admin”
• Alice is (effectively) an admin on Bob’s
machine, and Bob is (effectively) an admin on
Eve’s machine
• Alice can derive Eve’s rights though
compromising and leveraging Bob’s credentials
Local Administrator Enumeration
• Machines obviously have to somehow
determine what users have administrative
rights
• Usually set through restricted groups or
group policy preferences
• These GPO policies are accessible by
anyone on the domain
• From of offensive perspective, we can
often query a domain controller, and
determine who has administrative rights
to what machines
GPO Enumeration and Abuse
• Very few organizations properly audit AD
ACLs or alert on their alteration
• Almost every organization has some kind
of misconfiguration SOMEWHERE in the
object access rights in their domain
structure
• This is also a great candidate place for
‘sneaky’ persistence!
Active Directory ACLs
• Trusts allow separate domains to form
inter-connected relationships
• Often utilized during acquisitions (i.e.
forest trusts or cross-link trusts)
• A trust just links up the authentication
systems of two domains and allows
authentication traffic to flow between
them
• Allows for the possibility of privileged
access between domains, but doesn’t guarantee
it*
Domain Trusts
• Mimikatz Golden Tickets now accept
SidHistories though the new /sids:<X>
argument
• If you compromise a DC in a child domain,
you can create a golden ticket with the
“Enterprise Admins” in the SID history
• This can let you compromise the parent
domain!
• The FOREST is the trust boundary, not the
domain!
Sidenote: The Mimikatz
Trustpocalypse
Summary
• There’s a lot of overlap between
offensive engagements and legitimate
domain administration
• You can find where users are logged in
WITHOUT elevated domain privileges
• You can enumerate the local users of a
remote machine WITHOUT elevated domain
privileges
• Domain trusts can easily be enumerated,
Questions?
• Will Schroeder (@harmj0y)
• http://blog.harmj0y.net | will [at]
harmj0y.net
• Security researcher and red teamer for
Veris Group‘s Adaptive Threat Division
• Offensive open-source developer:
• Veil-Evasion, Empire, PowerSploit
• Recent Microsoft CDM/PowerShell MVP
About_Author
• The Mimikatz Trustpocalypse brought to
you by:
• Benjamin Delpy (@gentilkiwi)
• Sean Metacalf (@pyrotek3) -
http://adsecurity.org
• My Active Directory background brought to
you by:
• Carlos Perez (@darkoperator)
• Sean Metcalf (@pyrotek3) -
http://adsecurity.org
• Get PowerView:
About_References

More Related Content

What's hot

Fantastic Red Team Attacks and How to Find Them
Fantastic Red Team Attacks and How to Find ThemFantastic Red Team Attacks and How to Find Them
Fantastic Red Team Attacks and How to Find Them
Ross Wolf
 
I'm in your cloud... reading everyone's email. Hacking Azure AD via Active Di...
I'm in your cloud... reading everyone's email. Hacking Azure AD via Active Di...I'm in your cloud... reading everyone's email. Hacking Azure AD via Active Di...
I'm in your cloud... reading everyone's email. Hacking Azure AD via Active Di...
DirkjanMollema
 

What's hot (20)

(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
 
I Hunt Sys Admins
I Hunt Sys AdminsI Hunt Sys Admins
I Hunt Sys Admins
 
DerbyCon 2019 - Kerberoasting Revisited
DerbyCon 2019 - Kerberoasting RevisitedDerbyCon 2019 - Kerberoasting Revisited
DerbyCon 2019 - Kerberoasting Revisited
 
Hunting for Credentials Dumping in Windows Environment
Hunting for Credentials Dumping in Windows EnvironmentHunting for Credentials Dumping in Windows Environment
Hunting for Credentials Dumping in Windows Environment
 
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
 
PowerShell for Practical Purple Teaming
PowerShell for Practical Purple TeamingPowerShell for Practical Purple Teaming
PowerShell for Practical Purple Teaming
 
Six Degrees of Domain Admin - BloodHound at DEF CON 24
Six Degrees of Domain Admin - BloodHound at DEF CON 24Six Degrees of Domain Admin - BloodHound at DEF CON 24
Six Degrees of Domain Admin - BloodHound at DEF CON 24
 
Pwning the Enterprise With PowerShell
Pwning the Enterprise With PowerShellPwning the Enterprise With PowerShell
Pwning the Enterprise With PowerShell
 
Fantastic Red Team Attacks and How to Find Them
Fantastic Red Team Attacks and How to Find ThemFantastic Red Team Attacks and How to Find Them
Fantastic Red Team Attacks and How to Find Them
 
PHDays 2018 Threat Hunting Hands-On Lab
PHDays 2018 Threat Hunting Hands-On LabPHDays 2018 Threat Hunting Hands-On Lab
PHDays 2018 Threat Hunting Hands-On Lab
 
SpecterOps Webinar Week - Kerberoasting Revisisted
SpecterOps Webinar Week - Kerberoasting RevisistedSpecterOps Webinar Week - Kerberoasting Revisisted
SpecterOps Webinar Week - Kerberoasting Revisisted
 
Defending Your "Gold"
Defending Your "Gold"Defending Your "Gold"
Defending Your "Gold"
 
I'm in your cloud... reading everyone's email. Hacking Azure AD via Active Di...
I'm in your cloud... reading everyone's email. Hacking Azure AD via Active Di...I'm in your cloud... reading everyone's email. Hacking Azure AD via Active Di...
I'm in your cloud... reading everyone's email. Hacking Azure AD via Active Di...
 
Windows attacks - AT is the new black
Windows attacks - AT is the new blackWindows attacks - AT is the new black
Windows attacks - AT is the new black
 
Building an Empire with PowerShell
Building an Empire with PowerShellBuilding an Empire with PowerShell
Building an Empire with PowerShell
 
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
 
PowerShell for Cyber Warriors - Bsides Knoxville 2016
PowerShell for Cyber Warriors - Bsides Knoxville 2016PowerShell for Cyber Warriors - Bsides Knoxville 2016
PowerShell for Cyber Warriors - Bsides Knoxville 2016
 
A Threat Hunter Himself
A Threat Hunter HimselfA Threat Hunter Himself
A Threat Hunter Himself
 
Windows privilege escalation by Dhruv Shah
Windows privilege escalation by Dhruv ShahWindows privilege escalation by Dhruv Shah
Windows privilege escalation by Dhruv Shah
 
Derbycon - Passing the Torch
Derbycon - Passing the TorchDerbycon - Passing the Torch
Derbycon - Passing the Torch
 

Viewers also liked

Viewers also liked (20)

The Travelling Pentester: Diaries of the Shortest Path to Compromise
The Travelling Pentester: Diaries of the Shortest Path to CompromiseThe Travelling Pentester: Diaries of the Shortest Path to Compromise
The Travelling Pentester: Diaries of the Shortest Path to Compromise
 
PowerUp - Automating Windows Privilege Escalation
PowerUp - Automating Windows Privilege EscalationPowerUp - Automating Windows Privilege Escalation
PowerUp - Automating Windows Privilege Escalation
 
I Have the Power(View)
I Have the Power(View)I Have the Power(View)
I Have the Power(View)
 
A Year in the Empire
A Year in the EmpireA Year in the Empire
A Year in the Empire
 
Bridging the Gap
Bridging the GapBridging the Gap
Bridging the Gap
 
PSConfEU - Building an Empire with PowerShell
PSConfEU - Building an Empire with PowerShellPSConfEU - Building an Empire with PowerShell
PSConfEU - Building an Empire with PowerShell
 
Building an EmPyre with Python
Building an EmPyre with PythonBuilding an EmPyre with Python
Building an EmPyre with Python
 
Trusts You Might Have Missed - 44con
Trusts You Might Have Missed - 44conTrusts You Might Have Missed - 44con
Trusts You Might Have Missed - 44con
 
PowerShell for Penetration Testers
PowerShell for Penetration TestersPowerShell for Penetration Testers
PowerShell for Penetration Testers
 
Drilling deeper with Veil's PowerTools
Drilling deeper with Veil's PowerToolsDrilling deeper with Veil's PowerTools
Drilling deeper with Veil's PowerTools
 
Client side attacks using PowerShell
Client side attacks using PowerShellClient side attacks using PowerShell
Client side attacks using PowerShell
 
Pwnstaller
PwnstallerPwnstaller
Pwnstaller
 
Adventures in Asymmetric Warfare
Adventures in Asymmetric WarfareAdventures in Asymmetric Warfare
Adventures in Asymmetric Warfare
 
Wielding a cortana
Wielding a cortanaWielding a cortana
Wielding a cortana
 
PowerShell from *nix user perspective
PowerShell from *nix user perspectivePowerShell from *nix user perspective
PowerShell from *nix user perspective
 
PowerShell 101
PowerShell 101PowerShell 101
PowerShell 101
 
Gray Hat PowerShell - ShowMeCon 2015
Gray Hat PowerShell - ShowMeCon 2015Gray Hat PowerShell - ShowMeCon 2015
Gray Hat PowerShell - ShowMeCon 2015
 
Managing VMware with PowerShell - VMworld 2008
Managing VMware with PowerShell - VMworld 2008Managing VMware with PowerShell - VMworld 2008
Managing VMware with PowerShell - VMworld 2008
 
Get-Help: An intro to PowerShell and how to Use it for Evil
Get-Help: An intro to PowerShell and how to Use it for EvilGet-Help: An intro to PowerShell and how to Use it for Evil
Get-Help: An intro to PowerShell and how to Use it for Evil
 
Pwning with powershell
Pwning with powershellPwning with powershell
Pwning with powershell
 

Similar to PSConfEU - Offensive Active Directory (With PowerShell!)

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
 
Openstack identity protocols unconference
Openstack identity protocols unconferenceOpenstack identity protocols unconference
Openstack identity protocols unconference
David Waite
 

Similar to PSConfEU - Offensive Active Directory (With PowerShell!) (20)

What Does a Full Featured Security Strategy Look Like?
What Does a Full Featured Security Strategy Look Like?What Does a Full Featured Security Strategy Look Like?
What Does a Full Featured Security Strategy Look Like?
 
Using GreyNoise to Quantify Response Time of Cloud Provider Abuse Teams
Using GreyNoise to Quantify Response Time of Cloud Provider Abuse TeamsUsing GreyNoise to Quantify Response Time of Cloud Provider Abuse Teams
Using GreyNoise to Quantify Response Time of Cloud Provider Abuse Teams
 
BSides SG Practical Red Teaming Workshop
BSides SG Practical Red Teaming WorkshopBSides SG Practical Red Teaming Workshop
BSides SG Practical Red Teaming Workshop
 
Oracle database threats - LAOUC Webinar
Oracle database threats - LAOUC WebinarOracle database threats - LAOUC Webinar
Oracle database threats - LAOUC Webinar
 
Lock it Down: Access Control for IBM i
Lock it Down: Access Control for IBM iLock it Down: Access Control for IBM i
Lock it Down: Access Control for IBM i
 
Red Team Apocalypse (RVAsec Edition)
Red Team Apocalypse (RVAsec Edition)Red Team Apocalypse (RVAsec Edition)
Red Team Apocalypse (RVAsec Edition)
 
Creating a fortress in your active directory environment
Creating a fortress in your active directory environmentCreating a fortress in your active directory environment
Creating a fortress in your active directory environment
 
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
 
IoT mobile app device cloud identity and security architecture
IoT mobile app device cloud identity and security architectureIoT mobile app device cloud identity and security architecture
IoT mobile app device cloud identity and security architecture
 
Compliance technical controls and you rva sec 2019
Compliance technical controls and you   rva sec 2019Compliance technical controls and you   rva sec 2019
Compliance technical controls and you rva sec 2019
 
Expand Your Control of Access to IBM i Systems and Data
Expand Your Control of Access to IBM i Systems and DataExpand Your Control of Access to IBM i Systems and Data
Expand Your Control of Access to IBM i Systems and Data
 
Controlling Access to IBM i Systems and Data
Controlling Access to IBM i Systems and DataControlling Access to IBM i Systems and Data
Controlling Access to IBM i Systems and Data
 
Anatomy of a Cloud Hack
Anatomy of a Cloud HackAnatomy of a Cloud Hack
Anatomy of a Cloud Hack
 
Identity and Security in the Cloud
Identity and Security in the CloudIdentity and Security in the Cloud
Identity and Security in the Cloud
 
Securing the Internet of Things
Securing the Internet of ThingsSecuring the Internet of Things
Securing the Internet of Things
 
Openstack identity protocols unconference
Openstack identity protocols unconferenceOpenstack identity protocols unconference
Openstack identity protocols unconference
 
Secure active directory in one day without spending a single dollar
Secure active directory in one day without spending a single dollarSecure active directory in one day without spending a single dollar
Secure active directory in one day without spending a single dollar
 
Vault 101
Vault 101Vault 101
Vault 101
 
Authentication Methods authauthauthauthauthautha
Authentication Methods authauthauthauthauthauthaAuthentication Methods authauthauthauthauthautha
Authentication Methods authauthauthauthauthautha
 
Заполучили права администратора домена? Игра еще не окончена
Заполучили права администратора домена? Игра еще не оконченаЗаполучили права администратора домена? Игра еще не окончена
Заполучили права администратора домена? Игра еще не окончена
 

More from Will Schroeder (6)

Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
 
Nemesis - SAINTCON.pdf
Nemesis - SAINTCON.pdfNemesis - SAINTCON.pdf
Nemesis - SAINTCON.pdf
 
Not a Security Boundary
Not a Security BoundaryNot a Security Boundary
Not a Security Boundary
 
Ace Up the Sleeve
Ace Up the SleeveAce Up the Sleeve
Ace Up the Sleeve
 
A Case Study in Attacking KeePass
A Case Study in Attacking KeePassA Case Study in Attacking KeePass
A Case Study in Attacking KeePass
 
Trusts You Might Have Missed
Trusts You Might Have MissedTrusts You Might Have Missed
Trusts You Might Have Missed
 

Recently uploaded

audience research (emma) 1.pptxkkkkkkkkkkkkkkkkk
audience research (emma) 1.pptxkkkkkkkkkkkkkkkkkaudience research (emma) 1.pptxkkkkkkkkkkkkkkkkk
audience research (emma) 1.pptxkkkkkkkkkkkkkkkkk
lolsDocherty
 
Article writing on excessive use of internet.pptx
Article writing on excessive use of internet.pptxArticle writing on excessive use of internet.pptx
Article writing on excessive use of internet.pptx
abhinandnam9997
 
一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理
一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理
一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理
aagad
 

Recently uploaded (13)

How Do I Begin the Linksys Velop Setup Process?
How Do I Begin the Linksys Velop Setup Process?How Do I Begin the Linksys Velop Setup Process?
How Do I Begin the Linksys Velop Setup Process?
 
The Best AI Powered Software - Intellivid AI Studio
The Best AI Powered Software - Intellivid AI StudioThe Best AI Powered Software - Intellivid AI Studio
The Best AI Powered Software - Intellivid AI Studio
 
The AI Powered Organization-Intro to AI-LAN.pdf
The AI Powered Organization-Intro to AI-LAN.pdfThe AI Powered Organization-Intro to AI-LAN.pdf
The AI Powered Organization-Intro to AI-LAN.pdf
 
Pvtaan Social media marketing proposal.pdf
Pvtaan Social media marketing proposal.pdfPvtaan Social media marketing proposal.pdf
Pvtaan Social media marketing proposal.pdf
 
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and GuidelinesMulti-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
 
The Use of AI in Indonesia Election 2024: A Case Study
The Use of AI in Indonesia Election 2024: A Case StudyThe Use of AI in Indonesia Election 2024: A Case Study
The Use of AI in Indonesia Election 2024: A Case Study
 
The+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptxThe+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptx
 
audience research (emma) 1.pptxkkkkkkkkkkkkkkkkk
audience research (emma) 1.pptxkkkkkkkkkkkkkkkkkaudience research (emma) 1.pptxkkkkkkkkkkkkkkkkk
audience research (emma) 1.pptxkkkkkkkkkkkkkkkkk
 
Article writing on excessive use of internet.pptx
Article writing on excessive use of internet.pptxArticle writing on excessive use of internet.pptx
Article writing on excessive use of internet.pptx
 
Bug Bounty Blueprint : A Beginner's Guide
Bug Bounty Blueprint : A Beginner's GuideBug Bounty Blueprint : A Beginner's Guide
Bug Bounty Blueprint : A Beginner's Guide
 
Case study on merger of Vodafone and Idea (VI).pptx
Case study on merger of Vodafone and Idea (VI).pptxCase study on merger of Vodafone and Idea (VI).pptx
Case study on merger of Vodafone and Idea (VI).pptx
 
ER(Entity Relationship) Diagram for online shopping - TAE
ER(Entity Relationship) Diagram for online shopping - TAEER(Entity Relationship) Diagram for online shopping - TAE
ER(Entity Relationship) Diagram for online shopping - TAE
 
一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理
一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理
一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理
 

PSConfEU - Offensive Active Directory (With PowerShell!)

  • 1. Offensive Active Directory Will Schroeder (@harmj0y) With PowerShell!
  • 2. Agenda • Offensive Active Directory 101 • Hunting for Users • Local Administrator Enumeration • GPO Enumeration and Abuse • Active Directory ACLs • Domain Trusts
  • 3. Offensive AD 101 • Red teams and ‘real’ bad guys have been abusing AD for years, but not much offensive AD information has existed publicly (until recently) • See http://adsecurity.org/ • A lot of what we do on a red team is essentially just (authorized) domain administration • We find misconfigurations and chain access/trust relationships to turn one
  • 4. PowerView • A pure PowerShell domain/network situational awareness tool • Version 2.0 compliant • Fully self-contained and loadable in memory • Now part of PowerSploit™ (not really trademarked) • Many modules are implemented in Empire • Built to automate large components of the tradecraft on our red team engagements
  • 5. Sidenote “The best tool these days for understanding windows networks is Powerview [1].” -Phineas Fisher http://pastebin.com/raw/0SNSvyjJ
  • 6. Hunting for Users • On nearly every engagement, we end up wanting to know where specific users are logged in • We break this down into: • Pre-elevated access, where we have regular domain user privileges. This is out “lateral spread” phase • Post-elevated access, where we have some type of elevated (e.g. Domain Admin) access. This is usually our ‘demonstrate impact’ phase
  • 7. Win32 API Access • Several techniques we rely on for user- hunting depend on various Windows API calls • Specifically NetWkstaUserEnum and NetSessionEnum • There are several methods to access these API calls through PowerShell • C# Add-Type, straight reflection, PSReflect • See Matt Graeber’s US PowerShell Summit talk on Win32 API access for more details
  • 8. • Windows allows any domain-authenticated user to enumerate the members of a local group on a remote machine • Either through the NetLocalGroupGetMembers Win32 API call or the WinNT service provider • “Derivative Local Admin” • Alice is (effectively) an admin on Bob’s machine, and Bob is (effectively) an admin on Eve’s machine • Alice can derive Eve’s rights though compromising and leveraging Bob’s credentials Local Administrator Enumeration
  • 9. • Machines obviously have to somehow determine what users have administrative rights • Usually set through restricted groups or group policy preferences • These GPO policies are accessible by anyone on the domain • From of offensive perspective, we can often query a domain controller, and determine who has administrative rights to what machines GPO Enumeration and Abuse
  • 10. • Very few organizations properly audit AD ACLs or alert on their alteration • Almost every organization has some kind of misconfiguration SOMEWHERE in the object access rights in their domain structure • This is also a great candidate place for ‘sneaky’ persistence! Active Directory ACLs
  • 11. • Trusts allow separate domains to form inter-connected relationships • Often utilized during acquisitions (i.e. forest trusts or cross-link trusts) • A trust just links up the authentication systems of two domains and allows authentication traffic to flow between them • Allows for the possibility of privileged access between domains, but doesn’t guarantee it* Domain Trusts
  • 12. • Mimikatz Golden Tickets now accept SidHistories though the new /sids:<X> argument • If you compromise a DC in a child domain, you can create a golden ticket with the “Enterprise Admins” in the SID history • This can let you compromise the parent domain! • The FOREST is the trust boundary, not the domain! Sidenote: The Mimikatz Trustpocalypse
  • 13. Summary • There’s a lot of overlap between offensive engagements and legitimate domain administration • You can find where users are logged in WITHOUT elevated domain privileges • You can enumerate the local users of a remote machine WITHOUT elevated domain privileges • Domain trusts can easily be enumerated,
  • 15. • Will Schroeder (@harmj0y) • http://blog.harmj0y.net | will [at] harmj0y.net • Security researcher and red teamer for Veris Group‘s Adaptive Threat Division • Offensive open-source developer: • Veil-Evasion, Empire, PowerSploit • Recent Microsoft CDM/PowerShell MVP About_Author
  • 16. • The Mimikatz Trustpocalypse brought to you by: • Benjamin Delpy (@gentilkiwi) • Sean Metacalf (@pyrotek3) - http://adsecurity.org • My Active Directory background brought to you by: • Carlos Perez (@darkoperator) • Sean Metcalf (@pyrotek3) - http://adsecurity.org • Get PowerView: About_References

Editor's Notes

  1. So why not the official Active Directory (RSAT-AD-PowerShell) cmdlets? For offense, we want something: PowerShell version 2.0 compliant Fully self-contained with no dependencies Usable without any installation Think of PowerView as a version 2.0 replacement for the AD cmdlets combined with offensive-oriented cmdlet functions
  2. Phineas is the person who took down HackingTeam…
  3. Pre-elevated introduces some complexities
  4. I use PSReflect in PowerView because of its simplicity DEMO Show PowerView source, and Get-NetSession code Show Invoke-UserHunter and all of its options
  5. This is INCREDIBLY useful from an offensive perspective Originally built because of the KB2871997 “pass the hash” patch so we could enumerate the RID-500 account and whether we could reuse DEMO- Get-NetLocalGroup and friends
  6. DEMO- walk through Find-GPOLocation Resolves a user/group’s SID Builds a list SIDs the target is a part of Uses Get-NetGPOGroup to pull GPOs that set “Restricted Groups” or groups.xml Matches the target SID list to the queried GPO SID list to enumerate all GPOs the target is applied to Enumerates all OUs/sites and applicable GPO GUIDs that are applied through GPLink Queries for all computers in target OUs/sites
  7. People may audit if someone’s added to a group, but not the ACL for that group DEMO
  8. Why this matters- Red teams often compromise accounts/machines in a domain trusted by their actual target This allows operators to exploit these existing trust relationships to achieve their end goal DEMO: domain trusts