SlideShare ist ein Scribd-Unternehmen logo
1 von 50
Downloaden Sie, um offline zu lesen
Trusts You
Might Have
Missed
@harmj0y
Co-founder of Empire/EmPyre,
PowerTools, Veil-Framework
PowerSploit/BloodHound
developer
Microsoft PowerShell MVP
tl;dr ⊙ Red Teaming
⊙ Active Directory and Trusts 101
⊙ Old vs New School Enumeration
⊙ Abusing Trusts
⊙ BloodHound
⊙ Mimikatz and Trusts
⊙ Demo
1
“Red Teaming”
Bridging the Gap
⊙ Red teaming means different
things to different people
○ common thread of increased time frame
and more permissive scope
⊙ We tend towards longer running,
remote network operations with
a focus on Windows
Red Teaming
“ Fundamentally, if somebody wants to get
in, they're getting in...Accept that...What
we tell clients is:
Number one, you're in the fight, whether
you thought you were or not.
Number two, you're almost certainly
penetrated.
Michael Hayden
Former Director of CIA & NSA
⊙ Domain trusts have existed for
years, and red teams have been
abusing them just as long
○ Techniques are public but not as well
known as they should be
⊙ Possible through multiple
means, “offense in depth”
○ VBScript, PowerShell, native tools
Nothing
New?
2
Domain Trusts
A Quick Refresher
⊙ Multiple Levels
○ Domain- logical group of network objects
(computers, users, etc.)
○ Trees- collection of domains
○ Forests- collection of trees
⊙ Used to authenticate and authorize
users and computers on a network
⊙ The domain is not the trust
boundary, the forest is!!!
Active
Directory
Overview
⊙ Trusts allow domains to form
inter-connected relationships
○ A trust just links up the authentication
systems of two domains and allows
authentication traffic to flow between them
○ Done by exchanging an “inter-realm trust
key” that can relay kerberos traffic
⊙ Forests can also establish trust
relationships
○ ex. all domains in Forest A will trust
domains in Forest B
Trusts 101
⊙ Communications in the trust work via
a system of referrals:
○ If the SPN being requested resides
outside of the primary domain, the DC
issues a referral to the forest KDC (or
trusted domain KDC) to receive a ticket
○ Access is passed around w/ inter-realm
TGTs signed by the inter-realm key
⊙ Multiple configuration topographies
available that will determine the
behavior of the trusts
Trusts 201
Kerberos and
Domain
Trusts
http://technet.microsoft.com/en-us/library/cc759554(v=ws.10).aspx
Trust
Direction
⊙ Trusts come in a few varieties:
○ One way- one domain trusts the other
○ Two way- both domains trust each other
○ Transitive- domain A trusts Domain B
and Domain B trusts Domain C, so
Domain A trusts Domain C
⊙ A child domain retains an implicit
two-way transitive trust with its
parent
○ http://technet.microsoft.com/en-us/libr
ary/cc773178(v=ws.10).aspx
Trust Types
⊙ Why does this matter?
⊙ Trusts can introduce unintentional
avenues of access into a target
⊙ Enterprise Admin = pwnership over
everything below
○ but at a minimum trusts let you query AD
information for a foreign domain!
Who Cares?
3
Trust
Enumeration
Old School vs. New
nltest.exe
and
adfind.exe
⊙ A pure PowerShell domain/network
situational awareness tool
○ think dsquery on steroids... and cocaine
⊙ Built to automate large components
of our tradecraft used to facilitate red
team engagements
⊙ Now integrated into PowerSploit
○ everything is version PS v2.0 compliant
PowerView
⊙ Get-NetForest: information about the
current domain forest
⊙ Get-NetForestDomain: enumerate all
domains in the current forest
⊙ Get-NetDomainTrust: find all current
domain trusts, à la nltest
⊙ Get-NetForestTrust: grab all forest
trusts
PowerView:
Enumerating
Trusts
⊙ If a trust exists, most functions in
PowerView can accept a -Domain
<name> flag to operate across a trust:
○ Get-NetDomainController, Get-NetUser,
Get-NetComputer, Get-NetGroup,
Get-NetGroupMember,
Get-NetFileServer, Invoke-UserHunter,
etc.
PowerView:
Using Trusts
PowerView:
Using Trusts
⊙ PowerView also has a function to map
all reachable domain trusts:
○ Invoke-MapDomainTrust
⊙ Finds all domain trusts for the current
domain, enumerates all trusts for each
domain it finds, and so on
○ can dump out a nice .csv of all current
trust relationships
PowerView:
Mapping
Trusts
Trust
Mappings
⊙ Raw trust mappings are digestible for
small domains
○ But the complexity can explode for really
large environments
⊙ Data means nothing if you can’t
interpret it usefully
⊙ @sixdub’sDomainTrustExplorer can
transform CSV output to graphml
Processing
Raw Data
Trust
Visualization
4
Abusing
Domain Trusts
The Path to
Pwnership
1. Map the trusts and their types
(intra-forest or otherwise) reachable from
your current domain
2. Enumerate users/groups from one
domain that have access to resources in
other domains
a. uncovering the hidden ‘trust mesh’ of accesses
that administrators have set up
3. Selectively compromise specific target
accounts in order to hop across the trust
boundary
A Trust
Attack
Strategy
⊙ To enumerate users who are in groups
outside of the user’s primary domain
(i.e. across trusts):
○ Find-ForeignUser -Domain <domain>
○ This is a domain’s “outgoing” access
⊙ To enumerate groups with users
outside of the group’s primary
domain:
○ Find-ForeignGroup -Domain <domain>
○ This is the “incoming” access to a domain
⊙ Lots of Get-NetLocalGroup
Abusing
Trusts With
PowerView
Abusing
Trusts With
PowerView
5
⊙ Automates AD attack path finding
⊙ A graphing front end build on neo4j
with a customized version of
PowerView as the data collector
○ Export as CSV or inputs directly into the
neo4j RESTful API
⊙ Released at DEF CON 24
○ http://bit.ly/getbloodhound
BloodHound
Overview
BloodHound
Path Finding
BloodHound
and Domain
Trusts
⊙ Domains are represented in the
schema only for visualizing their
relationships à la
DomainTrustExplorer
⊙ The normal schema just has
user@domain.local and
machine.domain2.local
○ This lets us easily find cross-domain
paths without having to specifically model
domains in the schema
BloodHound
Visualizing
Trusts
BloodHound
Hopping
Trusts
BloodHound
Foreign
Users/Groups
6
Mimikatz and
Trusts
Thanks @gentilkiwi
and @pyrotek3 !
⊙ “The password for a domain trust
account is used to derive an inter-realm
key for encrypting referral tickets”*
○ Mimikatz can extract these trust keys
from domain controllers participating in
the trust
⊙ These keys can be used to create
“golden” trust referral tickets for the
krbtgt service, with a trusting domain
as the target
*https://msdn.microsoft.com/en-us/library/windows/desktop/aa378170(v=vs.85).aspx
Mimikatz and
Trust Keys
Even
Crazier...
⊙ Mimikatz can now include extra
account SIDs from other domains
when it constructs a Golden Ticket
○ with the /sids flag
⊙ If you get the krbtgt hash of a domain
controller of a child domain in a forest,
you can set the SID history to be
“Enterprise Admins” of the parent
domain
○ This allows you to compromise the forest
root!
The
Trustpocalypse
If you compromise one
domain controller of a
child domain in a forest,
you can compromise the
entire forest!
The
Trustpocalypse
Advice From
@gentilkiwi
Caveat:
SID Filtering
⊙ If SID filtering is enabled, DCs in a
trusting domain remove SIDs that
aren’t contained in the trusted
domain
○ Applies to SIDHistory!
⊙ This prevents the malicious
SIDHistory Mimikatz attack
⊙ Enabled by default for
external/interforest trusts
Caveat:
Quarantined
Within Forest
⊙ Parent-child trusts can be marked as
‘quarantined’
⊙ This will filter out all SIDs, EXCEPT the
“Enterprise Domain Controllers” SID
(S-1-5-9) ;)
⊙ This means it’s still possible to craft a
Golden Ticket in such a way to hop up
the trust!
⊙ Say we land on a machine in the
dev.testlab.local domain
⊙ We want to compromise the
external.local forest
⊙ We’ll do this by abusing trust
relationships to hop to testlab.local
and then external.local
Demo Setup
Demo
Credits Special thanks to:
⊙ @_wald0
⊙ @CptJesus
⊙ @sixdub
⊙ @gentilkiwi
⊙ @pyrotek3
Thanks!
Any questions?
@harmj0y
will [at] harmj0y.net
http://blog.harmj0y.net/

Weitere ähnliche Inhalte

Was ist angesagt?

SpecterOps Webinar Week - Kerberoasting Revisisted
SpecterOps Webinar Week - Kerberoasting RevisistedSpecterOps Webinar Week - Kerberoasting Revisisted
SpecterOps Webinar Week - Kerberoasting RevisistedWill Schroeder
 
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 DominationNikhil Mittal
 
Trusts You Might Have Missed
Trusts You Might Have MissedTrusts You Might Have Missed
Trusts You Might Have MissedWill Schroeder
 
Carlos García - Pentesting Active Directory [rooted2018]
Carlos García - Pentesting Active Directory [rooted2018]Carlos García - Pentesting Active Directory [rooted2018]
Carlos García - Pentesting Active Directory [rooted2018]RootedCON
 
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 DirectoryWill Schroeder
 
Subdomain takeover
 Subdomain takeover Subdomain takeover
Subdomain takeoverHina Rawal
 
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 2016Russel Van Tuyl
 
PowerUp - Automating Windows Privilege Escalation
PowerUp - Automating Windows Privilege EscalationPowerUp - Automating Windows Privilege Escalation
PowerUp - Automating Windows Privilege EscalationWill Schroeder
 
How to hack Citrix (So, You Just Inherited Someone Else's Citrix Environment....
How to hack Citrix (So, You Just Inherited Someone Else's Citrix Environment....How to hack Citrix (So, You Just Inherited Someone Else's Citrix Environment....
How to hack Citrix (So, You Just Inherited Someone Else's Citrix Environment....Denis Gundarev
 
Here Be Dragons: The Unexplored Land of Active Directory ACLs
Here Be Dragons: The Unexplored Land of Active Directory ACLsHere Be Dragons: The Unexplored Land of Active Directory ACLs
Here Be Dragons: The Unexplored Land of Active Directory ACLsAndy Robbins
 
Hunt for Domain Controller : Active Directory Pentesting Session
Hunt for Domain Controller : ActiveDirectory Pentesting SessionHunt for Domain Controller : ActiveDirectory Pentesting Session
Hunt for Domain Controller : Active Directory Pentesting Sessionhacknpentest
 
JWT: jku x5u
JWT: jku x5uJWT: jku x5u
JWT: jku x5usnyff
 
aclpwn - Active Directory ACL exploitation with BloodHound
aclpwn - Active Directory ACL exploitation with BloodHoundaclpwn - Active Directory ACL exploitation with BloodHound
aclpwn - Active Directory ACL exploitation with BloodHoundDirkjanMollema
 
Bypassing nac solutions and mitigations
Bypassing nac solutions and mitigationsBypassing nac solutions and mitigations
Bypassing nac solutions and mitigationsSuraj Khetani
 
Reconnaissance & Scanning
Reconnaissance & ScanningReconnaissance & Scanning
Reconnaissance & Scanningamiable_indian
 
ReCertifying Active Directory
ReCertifying Active DirectoryReCertifying Active Directory
ReCertifying Active DirectoryWill Schroeder
 

Was ist angesagt? (20)

I Hunt Sys Admins
I Hunt Sys AdminsI Hunt Sys Admins
I Hunt Sys Admins
 
SpecterOps Webinar Week - Kerberoasting Revisisted
SpecterOps Webinar Week - Kerberoasting RevisistedSpecterOps Webinar Week - Kerberoasting Revisisted
SpecterOps Webinar Week - Kerberoasting Revisisted
 
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
 
Trusts You Might Have Missed
Trusts You Might Have MissedTrusts You Might Have Missed
Trusts You Might Have Missed
 
Active Directory Trusts
Active Directory TrustsActive Directory Trusts
Active Directory Trusts
 
Carlos García - Pentesting Active Directory [rooted2018]
Carlos García - Pentesting Active Directory [rooted2018]Carlos García - Pentesting Active Directory [rooted2018]
Carlos García - Pentesting Active Directory [rooted2018]
 
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
 
Subdomain takeover
 Subdomain takeover Subdomain takeover
Subdomain takeover
 
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
 
HashiCorp's Vault - The Examples
HashiCorp's Vault - The ExamplesHashiCorp's Vault - The Examples
HashiCorp's Vault - The Examples
 
PowerUp - Automating Windows Privilege Escalation
PowerUp - Automating Windows Privilege EscalationPowerUp - Automating Windows Privilege Escalation
PowerUp - Automating Windows Privilege Escalation
 
Defending Your "Gold"
Defending Your "Gold"Defending Your "Gold"
Defending Your "Gold"
 
How to hack Citrix (So, You Just Inherited Someone Else's Citrix Environment....
How to hack Citrix (So, You Just Inherited Someone Else's Citrix Environment....How to hack Citrix (So, You Just Inherited Someone Else's Citrix Environment....
How to hack Citrix (So, You Just Inherited Someone Else's Citrix Environment....
 
Here Be Dragons: The Unexplored Land of Active Directory ACLs
Here Be Dragons: The Unexplored Land of Active Directory ACLsHere Be Dragons: The Unexplored Land of Active Directory ACLs
Here Be Dragons: The Unexplored Land of Active Directory ACLs
 
Hunt for Domain Controller : Active Directory Pentesting Session
Hunt for Domain Controller : ActiveDirectory Pentesting SessionHunt for Domain Controller : ActiveDirectory Pentesting Session
Hunt for Domain Controller : Active Directory Pentesting Session
 
JWT: jku x5u
JWT: jku x5uJWT: jku x5u
JWT: jku x5u
 
aclpwn - Active Directory ACL exploitation with BloodHound
aclpwn - Active Directory ACL exploitation with BloodHoundaclpwn - Active Directory ACL exploitation with BloodHound
aclpwn - Active Directory ACL exploitation with BloodHound
 
Bypassing nac solutions and mitigations
Bypassing nac solutions and mitigationsBypassing nac solutions and mitigations
Bypassing nac solutions and mitigations
 
Reconnaissance & Scanning
Reconnaissance & ScanningReconnaissance & Scanning
Reconnaissance & Scanning
 
ReCertifying Active Directory
ReCertifying Active DirectoryReCertifying Active Directory
ReCertifying Active Directory
 

Andere mochten auch

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 CompromiseWill Schroeder
 
Building an EmPyre with Python
Building an EmPyre with PythonBuilding an EmPyre with Python
Building an EmPyre with PythonWill Schroeder
 
Derbycon - Passing the Torch
Derbycon - Passing the TorchDerbycon - Passing the Torch
Derbycon - Passing the TorchWill Schroeder
 
I Have the Power(View)
I Have the Power(View)I Have the Power(View)
I Have the Power(View)Will Schroeder
 
PSConfEU - Building an Empire with PowerShell
PSConfEU - Building an Empire with PowerShellPSConfEU - Building an Empire with PowerShell
PSConfEU - Building an Empire with PowerShellWill Schroeder
 
Adventures in Asymmetric Warfare
Adventures in Asymmetric WarfareAdventures in Asymmetric Warfare
Adventures in Asymmetric WarfareWill Schroeder
 
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 24Andy Robbins
 
Building an Empire with PowerShell
Building an Empire with PowerShellBuilding an Empire with PowerShell
Building an Empire with PowerShellWill Schroeder
 
Powerpreter: Post Exploitation like a Boss
Powerpreter: Post Exploitation like a BossPowerpreter: Post Exploitation like a Boss
Powerpreter: Post Exploitation like a BossNikhil Mittal
 
Drilling deeper with Veil's PowerTools
Drilling deeper with Veil's PowerToolsDrilling deeper with Veil's PowerTools
Drilling deeper with Veil's PowerToolsWill Schroeder
 
PowerShell for Penetration Testers
PowerShell for Penetration TestersPowerShell for Penetration Testers
PowerShell for Penetration TestersNikhil Mittal
 
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 ItNikhil Mittal
 

Andere mochten auch (17)

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
 
A Year in the Empire
A Year in the EmpireA Year in the Empire
A Year in the Empire
 
I hunt sys admins 2.0
I hunt sys admins 2.0I hunt sys admins 2.0
I hunt sys admins 2.0
 
Building an EmPyre with Python
Building an EmPyre with PythonBuilding an EmPyre with Python
Building an EmPyre with Python
 
Derbycon - Passing the Torch
Derbycon - Passing the TorchDerbycon - Passing the Torch
Derbycon - Passing the Torch
 
I Have the Power(View)
I Have the Power(View)I Have the Power(View)
I Have the Power(View)
 
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
 
Pwnstaller
PwnstallerPwnstaller
Pwnstaller
 
Adventures in Asymmetric Warfare
Adventures in Asymmetric WarfareAdventures in Asymmetric Warfare
Adventures in Asymmetric Warfare
 
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
 
Wielding a cortana
Wielding a cortanaWielding a cortana
Wielding a cortana
 
Building an Empire with PowerShell
Building an Empire with PowerShellBuilding an Empire with PowerShell
Building an Empire with PowerShell
 
Powerpreter: Post Exploitation like a Boss
Powerpreter: Post Exploitation like a BossPowerpreter: Post Exploitation like a Boss
Powerpreter: Post Exploitation like a Boss
 
Drilling deeper with Veil's PowerTools
Drilling deeper with Veil's PowerToolsDrilling deeper with Veil's PowerTools
Drilling deeper with Veil's PowerTools
 
PowerShell for Penetration Testers
PowerShell for Penetration TestersPowerShell for Penetration Testers
PowerShell for Penetration Testers
 
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
 

Ähnlich wie Trusts You Might Have Missed - 44con

Active Directory Trusts
Active Directory TrustsActive Directory Trusts
Active Directory TrustsYatinWadhwa2
 
Secure Secret Management on a Budget: Reasoning about Scalable SM with Vault ...
Secure Secret Management on a Budget: Reasoning about Scalable SM with Vault ...Secure Secret Management on a Budget: Reasoning about Scalable SM with Vault ...
Secure Secret Management on a Budget: Reasoning about Scalable SM with Vault ...Mary Racter
 
@dtmsecurity Mitre ATT&CKcon - Playing Devil's Advocate to Security Initiativ...
@dtmsecurity Mitre ATT&CKcon - Playing Devil's Advocate to Security Initiativ...@dtmsecurity Mitre ATT&CKcon - Playing Devil's Advocate to Security Initiativ...
@dtmsecurity Mitre ATT&CKcon - Playing Devil's Advocate to Security Initiativ...DTM Security
 
MITRE ATT&CKcon 2018: Playing Devil’s Advocate to Security Initiatives with A...
MITRE ATT&CKcon 2018: Playing Devil’s Advocate to Security Initiatives with A...MITRE ATT&CKcon 2018: Playing Devil’s Advocate to Security Initiatives with A...
MITRE ATT&CKcon 2018: Playing Devil’s Advocate to Security Initiatives with A...MITRE - ATT&CKcon
 
Big Data Security: Facing the challenge
Big Data Security: Facing the challengeBig Data Security: Facing the challenge
Big Data Security: Facing the challengeStratio
 
Don't Build "Death Star" Security - O'Reilly Software Architecture Conference...
Don't Build "Death Star" Security - O'Reilly Software Architecture Conference...Don't Build "Death Star" Security - O'Reilly Software Architecture Conference...
Don't Build "Death Star" Security - O'Reilly Software Architecture Conference...David Timothy Strauss
 
SVIA InsurTech Summit Dec 5 - 6th 2017
SVIA InsurTech Summit Dec 5 - 6th 2017SVIA InsurTech Summit Dec 5 - 6th 2017
SVIA InsurTech Summit Dec 5 - 6th 2017LERNER Consulting
 
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
 
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
 
Attaining data security in cloud computing
Attaining data security in cloud computingAttaining data security in cloud computing
Attaining data security in cloud computingGopinath Muthusamy
 
Automation Patterns for Scalable Secret Management
Automation Patterns for Scalable Secret ManagementAutomation Patterns for Scalable Secret Management
Automation Patterns for Scalable Secret ManagementMary Racter
 
Application of Machine Learning in Cybersecurity
Application of Machine Learning in CybersecurityApplication of Machine Learning in Cybersecurity
Application of Machine Learning in CybersecurityPratap Dangeti
 
Cryptographie avancée et Logical Data Fabric : Accélérez le partage et la mig...
Cryptographie avancée et Logical Data Fabric : Accélérez le partage et la mig...Cryptographie avancée et Logical Data Fabric : Accélérez le partage et la mig...
Cryptographie avancée et Logical Data Fabric : Accélérez le partage et la mig...Denodo
 
Certificates, PKI, and SSL/TLS for infrastructure builders and operators
Certificates, PKI, and SSL/TLS for infrastructure builders and operatorsCertificates, PKI, and SSL/TLS for infrastructure builders and operators
Certificates, PKI, and SSL/TLS for infrastructure builders and operatorsDavid Ochel
 
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
 
IRJET- Exchanging Secure Data in Cloud with Confidentiality and Privacy Goals
IRJET- Exchanging Secure Data in Cloud with Confidentiality and Privacy GoalsIRJET- Exchanging Secure Data in Cloud with Confidentiality and Privacy Goals
IRJET- Exchanging Secure Data in Cloud with Confidentiality and Privacy GoalsIRJET Journal
 
Inro to Secure Sockets Layer: SSL
Inro to Secure Sockets Layer: SSLInro to Secure Sockets Layer: SSL
Inro to Secure Sockets Layer: SSLDipankar Achinta
 
MCDB: Multi Cloud Database Model
MCDB: Multi Cloud Database ModelMCDB: Multi Cloud Database Model
MCDB: Multi Cloud Database Modelathulya_raj
 

Ähnlich wie Trusts You Might Have Missed - 44con (20)

Active Directory Trusts
Active Directory TrustsActive Directory Trusts
Active Directory Trusts
 
Codemash-2017
Codemash-2017Codemash-2017
Codemash-2017
 
Introduction to Domains and Hacking
Introduction to Domains and HackingIntroduction to Domains and Hacking
Introduction to Domains and Hacking
 
Secure Secret Management on a Budget: Reasoning about Scalable SM with Vault ...
Secure Secret Management on a Budget: Reasoning about Scalable SM with Vault ...Secure Secret Management on a Budget: Reasoning about Scalable SM with Vault ...
Secure Secret Management on a Budget: Reasoning about Scalable SM with Vault ...
 
@dtmsecurity Mitre ATT&CKcon - Playing Devil's Advocate to Security Initiativ...
@dtmsecurity Mitre ATT&CKcon - Playing Devil's Advocate to Security Initiativ...@dtmsecurity Mitre ATT&CKcon - Playing Devil's Advocate to Security Initiativ...
@dtmsecurity Mitre ATT&CKcon - Playing Devil's Advocate to Security Initiativ...
 
MITRE ATT&CKcon 2018: Playing Devil’s Advocate to Security Initiatives with A...
MITRE ATT&CKcon 2018: Playing Devil’s Advocate to Security Initiatives with A...MITRE ATT&CKcon 2018: Playing Devil’s Advocate to Security Initiatives with A...
MITRE ATT&CKcon 2018: Playing Devil’s Advocate to Security Initiatives with A...
 
Big Data Security: Facing the challenge
Big Data Security: Facing the challengeBig Data Security: Facing the challenge
Big Data Security: Facing the challenge
 
Don't Build "Death Star" Security - O'Reilly Software Architecture Conference...
Don't Build "Death Star" Security - O'Reilly Software Architecture Conference...Don't Build "Death Star" Security - O'Reilly Software Architecture Conference...
Don't Build "Death Star" Security - O'Reilly Software Architecture Conference...
 
SVIA InsurTech Summit Dec 5 - 6th 2017
SVIA InsurTech Summit Dec 5 - 6th 2017SVIA InsurTech Summit Dec 5 - 6th 2017
SVIA InsurTech Summit Dec 5 - 6th 2017
 
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
 
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
 
Attaining data security in cloud computing
Attaining data security in cloud computingAttaining data security in cloud computing
Attaining data security in cloud computing
 
Automation Patterns for Scalable Secret Management
Automation Patterns for Scalable Secret ManagementAutomation Patterns for Scalable Secret Management
Automation Patterns for Scalable Secret Management
 
Application of Machine Learning in Cybersecurity
Application of Machine Learning in CybersecurityApplication of Machine Learning in Cybersecurity
Application of Machine Learning in Cybersecurity
 
Cryptographie avancée et Logical Data Fabric : Accélérez le partage et la mig...
Cryptographie avancée et Logical Data Fabric : Accélérez le partage et la mig...Cryptographie avancée et Logical Data Fabric : Accélérez le partage et la mig...
Cryptographie avancée et Logical Data Fabric : Accélérez le partage et la mig...
 
Certificates, PKI, and SSL/TLS for infrastructure builders and operators
Certificates, PKI, and SSL/TLS for infrastructure builders and operatorsCertificates, PKI, and SSL/TLS for infrastructure builders and operators
Certificates, PKI, and SSL/TLS for infrastructure builders and operators
 
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]
 
IRJET- Exchanging Secure Data in Cloud with Confidentiality and Privacy Goals
IRJET- Exchanging Secure Data in Cloud with Confidentiality and Privacy GoalsIRJET- Exchanging Secure Data in Cloud with Confidentiality and Privacy Goals
IRJET- Exchanging Secure Data in Cloud with Confidentiality and Privacy Goals
 
Inro to Secure Sockets Layer: SSL
Inro to Secure Sockets Layer: SSLInro to Secure Sockets Layer: SSL
Inro to Secure Sockets Layer: SSL
 
MCDB: Multi Cloud Database Model
MCDB: Multi Cloud Database ModelMCDB: Multi Cloud Database Model
MCDB: Multi Cloud Database Model
 

Mehr von Will Schroeder

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...Will Schroeder
 
Nemesis - SAINTCON.pdf
Nemesis - SAINTCON.pdfNemesis - SAINTCON.pdf
Nemesis - SAINTCON.pdfWill Schroeder
 
Not a Security Boundary
Not a Security BoundaryNot a Security Boundary
Not a Security BoundaryWill Schroeder
 
Derbycon - The Unintended Risks of Trusting Active Directory
Derbycon - The Unintended Risks of Trusting Active DirectoryDerbycon - The Unintended Risks of Trusting Active Directory
Derbycon - The Unintended Risks of Trusting Active DirectoryWill Schroeder
 
Catch Me If You Can: PowerShell Red vs Blue
Catch Me If You Can: PowerShell Red vs BlueCatch Me If You Can: PowerShell Red vs Blue
Catch Me If You Can: PowerShell Red vs BlueWill Schroeder
 
A Case Study in Attacking KeePass
A Case Study in Attacking KeePassA Case Study in Attacking KeePass
A Case Study in Attacking KeePassWill Schroeder
 

Mehr von Will Schroeder (8)

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
 
Certified Pre-Owned
Certified Pre-OwnedCertified Pre-Owned
Certified Pre-Owned
 
Not a Security Boundary
Not a Security BoundaryNot a Security Boundary
Not a Security Boundary
 
Derbycon - The Unintended Risks of Trusting Active Directory
Derbycon - The Unintended Risks of Trusting Active DirectoryDerbycon - The Unintended Risks of Trusting Active Directory
Derbycon - The Unintended Risks of Trusting Active Directory
 
Ace Up the Sleeve
Ace Up the SleeveAce Up the Sleeve
Ace Up the Sleeve
 
Catch Me If You Can: PowerShell Red vs Blue
Catch Me If You Can: PowerShell Red vs BlueCatch Me If You Can: PowerShell Red vs Blue
Catch Me If You Can: PowerShell Red vs Blue
 
A Case Study in Attacking KeePass
A Case Study in Attacking KeePassA Case Study in Attacking KeePass
A Case Study in Attacking KeePass
 

Kürzlich hochgeladen

一比一原版田纳西大学毕业证如何办理
一比一原版田纳西大学毕业证如何办理一比一原版田纳西大学毕业证如何办理
一比一原版田纳西大学毕业证如何办理F
 
Local Call Girls in Seoni 9332606886 HOT & SEXY Models beautiful and charmin...
Local Call Girls in Seoni  9332606886 HOT & SEXY Models beautiful and charmin...Local Call Girls in Seoni  9332606886 HOT & SEXY Models beautiful and charmin...
Local Call Girls in Seoni 9332606886 HOT & SEXY Models beautiful and charmin...kumargunjan9515
 
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...APNIC
 
一比一原版奥兹学院毕业证如何办理
一比一原版奥兹学院毕业证如何办理一比一原版奥兹学院毕业证如何办理
一比一原版奥兹学院毕业证如何办理F
 
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime NagercoilNagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoilmeghakumariji156
 
Tadepalligudem Escorts Service Girl ^ 9332606886, WhatsApp Anytime Tadepallig...
Tadepalligudem Escorts Service Girl ^ 9332606886, WhatsApp Anytime Tadepallig...Tadepalligudem Escorts Service Girl ^ 9332606886, WhatsApp Anytime Tadepallig...
Tadepalligudem Escorts Service Girl ^ 9332606886, WhatsApp Anytime Tadepallig...meghakumariji156
 
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge GraphsEleniIlkou
 
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...kajalverma014
 
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制pxcywzqs
 
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdfMatthew Sinclair
 
Call girls Service in Ajman 0505086370 Ajman call girls
Call girls Service in Ajman 0505086370 Ajman call girlsCall girls Service in Ajman 0505086370 Ajman call girls
Call girls Service in Ajman 0505086370 Ajman call girlsMonica Sydney
 
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency""Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency"growthgrids
 
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi EscortsIndian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi EscortsMonica Sydney
 
20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdfMatthew Sinclair
 
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样ayvbos
 
Mira Road Housewife Call Girls 07506202331, Nalasopara Call Girls
Mira Road Housewife Call Girls 07506202331, Nalasopara Call GirlsMira Road Housewife Call Girls 07506202331, Nalasopara Call Girls
Mira Road Housewife Call Girls 07506202331, Nalasopara Call GirlsPriya Reddy
 
Abu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Abu Dhabi Escorts Service 0508644382 Escorts in Abu DhabiAbu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Abu Dhabi Escorts Service 0508644382 Escorts in Abu DhabiMonica Sydney
 
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi EscortsRussian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi EscortsMonica Sydney
 
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查ydyuyu
 
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girlsRussian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girlsMonica Sydney
 

Kürzlich hochgeladen (20)

一比一原版田纳西大学毕业证如何办理
一比一原版田纳西大学毕业证如何办理一比一原版田纳西大学毕业证如何办理
一比一原版田纳西大学毕业证如何办理
 
Local Call Girls in Seoni 9332606886 HOT & SEXY Models beautiful and charmin...
Local Call Girls in Seoni  9332606886 HOT & SEXY Models beautiful and charmin...Local Call Girls in Seoni  9332606886 HOT & SEXY Models beautiful and charmin...
Local Call Girls in Seoni 9332606886 HOT & SEXY Models beautiful and charmin...
 
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
 
一比一原版奥兹学院毕业证如何办理
一比一原版奥兹学院毕业证如何办理一比一原版奥兹学院毕业证如何办理
一比一原版奥兹学院毕业证如何办理
 
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime NagercoilNagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
 
Tadepalligudem Escorts Service Girl ^ 9332606886, WhatsApp Anytime Tadepallig...
Tadepalligudem Escorts Service Girl ^ 9332606886, WhatsApp Anytime Tadepallig...Tadepalligudem Escorts Service Girl ^ 9332606886, WhatsApp Anytime Tadepallig...
Tadepalligudem Escorts Service Girl ^ 9332606886, WhatsApp Anytime Tadepallig...
 
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
 
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
 
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
 
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
 
Call girls Service in Ajman 0505086370 Ajman call girls
Call girls Service in Ajman 0505086370 Ajman call girlsCall girls Service in Ajman 0505086370 Ajman call girls
Call girls Service in Ajman 0505086370 Ajman call girls
 
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency""Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
 
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi EscortsIndian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
 
20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf
 
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
 
Mira Road Housewife Call Girls 07506202331, Nalasopara Call Girls
Mira Road Housewife Call Girls 07506202331, Nalasopara Call GirlsMira Road Housewife Call Girls 07506202331, Nalasopara Call Girls
Mira Road Housewife Call Girls 07506202331, Nalasopara Call Girls
 
Abu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Abu Dhabi Escorts Service 0508644382 Escorts in Abu DhabiAbu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Abu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
 
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi EscortsRussian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
 
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
 
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girlsRussian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
 

Trusts You Might Have Missed - 44con

  • 2. @harmj0y Co-founder of Empire/EmPyre, PowerTools, Veil-Framework PowerSploit/BloodHound developer Microsoft PowerShell MVP
  • 3. tl;dr ⊙ Red Teaming ⊙ Active Directory and Trusts 101 ⊙ Old vs New School Enumeration ⊙ Abusing Trusts ⊙ BloodHound ⊙ Mimikatz and Trusts ⊙ Demo
  • 5. ⊙ Red teaming means different things to different people ○ common thread of increased time frame and more permissive scope ⊙ We tend towards longer running, remote network operations with a focus on Windows Red Teaming
  • 6. “ Fundamentally, if somebody wants to get in, they're getting in...Accept that...What we tell clients is: Number one, you're in the fight, whether you thought you were or not. Number two, you're almost certainly penetrated. Michael Hayden Former Director of CIA & NSA
  • 7. ⊙ Domain trusts have existed for years, and red teams have been abusing them just as long ○ Techniques are public but not as well known as they should be ⊙ Possible through multiple means, “offense in depth” ○ VBScript, PowerShell, native tools Nothing New?
  • 9. ⊙ Multiple Levels ○ Domain- logical group of network objects (computers, users, etc.) ○ Trees- collection of domains ○ Forests- collection of trees ⊙ Used to authenticate and authorize users and computers on a network ⊙ The domain is not the trust boundary, the forest is!!! Active Directory Overview
  • 10. ⊙ Trusts allow domains to form inter-connected relationships ○ A trust just links up the authentication systems of two domains and allows authentication traffic to flow between them ○ Done by exchanging an “inter-realm trust key” that can relay kerberos traffic ⊙ Forests can also establish trust relationships ○ ex. all domains in Forest A will trust domains in Forest B Trusts 101
  • 11. ⊙ Communications in the trust work via a system of referrals: ○ If the SPN being requested resides outside of the primary domain, the DC issues a referral to the forest KDC (or trusted domain KDC) to receive a ticket ○ Access is passed around w/ inter-realm TGTs signed by the inter-realm key ⊙ Multiple configuration topographies available that will determine the behavior of the trusts Trusts 201
  • 14. ⊙ Trusts come in a few varieties: ○ One way- one domain trusts the other ○ Two way- both domains trust each other ○ Transitive- domain A trusts Domain B and Domain B trusts Domain C, so Domain A trusts Domain C ⊙ A child domain retains an implicit two-way transitive trust with its parent ○ http://technet.microsoft.com/en-us/libr ary/cc773178(v=ws.10).aspx Trust Types
  • 15. ⊙ Why does this matter? ⊙ Trusts can introduce unintentional avenues of access into a target ⊙ Enterprise Admin = pwnership over everything below ○ but at a minimum trusts let you query AD information for a foreign domain! Who Cares?
  • 18. ⊙ A pure PowerShell domain/network situational awareness tool ○ think dsquery on steroids... and cocaine ⊙ Built to automate large components of our tradecraft used to facilitate red team engagements ⊙ Now integrated into PowerSploit ○ everything is version PS v2.0 compliant PowerView
  • 19. ⊙ Get-NetForest: information about the current domain forest ⊙ Get-NetForestDomain: enumerate all domains in the current forest ⊙ Get-NetDomainTrust: find all current domain trusts, à la nltest ⊙ Get-NetForestTrust: grab all forest trusts PowerView: Enumerating Trusts
  • 20. ⊙ If a trust exists, most functions in PowerView can accept a -Domain <name> flag to operate across a trust: ○ Get-NetDomainController, Get-NetUser, Get-NetComputer, Get-NetGroup, Get-NetGroupMember, Get-NetFileServer, Invoke-UserHunter, etc. PowerView: Using Trusts
  • 22. ⊙ PowerView also has a function to map all reachable domain trusts: ○ Invoke-MapDomainTrust ⊙ Finds all domain trusts for the current domain, enumerates all trusts for each domain it finds, and so on ○ can dump out a nice .csv of all current trust relationships PowerView: Mapping Trusts
  • 24. ⊙ Raw trust mappings are digestible for small domains ○ But the complexity can explode for really large environments ⊙ Data means nothing if you can’t interpret it usefully ⊙ @sixdub’sDomainTrustExplorer can transform CSV output to graphml Processing Raw Data
  • 27. 1. Map the trusts and their types (intra-forest or otherwise) reachable from your current domain 2. Enumerate users/groups from one domain that have access to resources in other domains a. uncovering the hidden ‘trust mesh’ of accesses that administrators have set up 3. Selectively compromise specific target accounts in order to hop across the trust boundary A Trust Attack Strategy
  • 28. ⊙ To enumerate users who are in groups outside of the user’s primary domain (i.e. across trusts): ○ Find-ForeignUser -Domain <domain> ○ This is a domain’s “outgoing” access ⊙ To enumerate groups with users outside of the group’s primary domain: ○ Find-ForeignGroup -Domain <domain> ○ This is the “incoming” access to a domain ⊙ Lots of Get-NetLocalGroup Abusing Trusts With PowerView
  • 30. 5
  • 31. ⊙ Automates AD attack path finding ⊙ A graphing front end build on neo4j with a customized version of PowerView as the data collector ○ Export as CSV or inputs directly into the neo4j RESTful API ⊙ Released at DEF CON 24 ○ http://bit.ly/getbloodhound BloodHound Overview
  • 33. BloodHound and Domain Trusts ⊙ Domains are represented in the schema only for visualizing their relationships à la DomainTrustExplorer ⊙ The normal schema just has user@domain.local and machine.domain2.local ○ This lets us easily find cross-domain paths without having to specifically model domains in the schema
  • 38. ⊙ “The password for a domain trust account is used to derive an inter-realm key for encrypting referral tickets”* ○ Mimikatz can extract these trust keys from domain controllers participating in the trust ⊙ These keys can be used to create “golden” trust referral tickets for the krbtgt service, with a trusting domain as the target *https://msdn.microsoft.com/en-us/library/windows/desktop/aa378170(v=vs.85).aspx Mimikatz and Trust Keys
  • 40. ⊙ Mimikatz can now include extra account SIDs from other domains when it constructs a Golden Ticket ○ with the /sids flag ⊙ If you get the krbtgt hash of a domain controller of a child domain in a forest, you can set the SID history to be “Enterprise Admins” of the parent domain ○ This allows you to compromise the forest root! The Trustpocalypse
  • 41.
  • 42.
  • 43. If you compromise one domain controller of a child domain in a forest, you can compromise the entire forest! The Trustpocalypse
  • 45. Caveat: SID Filtering ⊙ If SID filtering is enabled, DCs in a trusting domain remove SIDs that aren’t contained in the trusted domain ○ Applies to SIDHistory! ⊙ This prevents the malicious SIDHistory Mimikatz attack ⊙ Enabled by default for external/interforest trusts
  • 46. Caveat: Quarantined Within Forest ⊙ Parent-child trusts can be marked as ‘quarantined’ ⊙ This will filter out all SIDs, EXCEPT the “Enterprise Domain Controllers” SID (S-1-5-9) ;) ⊙ This means it’s still possible to craft a Golden Ticket in such a way to hop up the trust!
  • 47. ⊙ Say we land on a machine in the dev.testlab.local domain ⊙ We want to compromise the external.local forest ⊙ We’ll do this by abusing trust relationships to hop to testlab.local and then external.local Demo Setup
  • 48. Demo
  • 49. Credits Special thanks to: ⊙ @_wald0 ⊙ @CptJesus ⊙ @sixdub ⊙ @gentilkiwi ⊙ @pyrotek3
  • 50. Thanks! Any questions? @harmj0y will [at] harmj0y.net http://blog.harmj0y.net/