SlideShare ist ein Scribd-Unternehmen logo
1 von 21
Cracking the
domain
Please sign-in via QR Code or
https://goo.gl/U46rfU
But… gaining knowledge is fun
and we always profit from
knowledge...
Announcements
â—Ź Square CTF - Oct 10th
â—Ź Cambrian Cyber Group - October 21st
â—Ź Alkami - October 28th
â—Ź Firetalks - October 30th
â—Ź TI - November 4th
â—Ź Officer Applications!
What is a network domain?
â—Ź A network domain is an administrative grouping of multiple private
computer networks or hosts within the same infrastructure.
â—Ź A domain controller is a server that automates logins, user groups, and
architecture of the domain.
â—‹ Typically on microsoft servers.
â—‹ Makes it so you don't have to manual setup every host with all the
domain data individually.
What do I want out of this?
● In an ideal pentest you want to control the entire network because that’s what the
attackers want.
â—Ź The domain controller tells all the other systems how the domain works and how it
supposed to look.
â—‹ Controller is managed by the domain admin.
â—Ź I.E. I want to be domain admin.
Okay, so how can I become the big daddy
admin?
● You could…
â—Ź Phish the admin.
â—Ź Break in through web stuff..
â—Ź Kidnap the admin.
● “Persuade” the admin.
â—Ź Physically connect to the domain
controller.
â—Ź Or you could..
â—Ź Abuse the domains architecture to
laterally move.
â—Ź Abuse active directory.
â—Ź Exploit Domain services like
Kerberos.
What’s an active directory?
â—Ź The Active Directory Domain Service is a service that authenticates and authorizes
all computers and users in a domain, assigning and enforcing security policies
(GPO) for all computers.
â—‹ Runs on the Lightweight Directory Access Protocol (LDAP)
â—Ź Holds data about what users can access/allowed to do on specified systems.
Permissions can be given individually or through AD Groups.
â—Ź AD can have many more services like..
â—‹ Certificate services.
â—‹ Federation services.
â—‹ Rights management.
3 attack scenarios
1. Attacking the domain by exploiting it’s architecture. Starting from
comfortable shell access of a domain system.
2. Attacking a single machine by exploiting the domains kerberos system.
Starting from a more restricted shell access of a domain system.
3. Owning the whole domain by exploiting the domains kerberos system.
Starting from no shell access of a domain system.
Scenario 1: The Bloodhound
â—Ź You are inside the network and on a system that is flexible.
â—‹ Allows you to download and run things without much fuss.
â—‹ Currently a user on the system.
â—‹ Currently not much on the immediate system that is exploitable.
â—Ź To take advantage of the domain architecture and user permissions you could use
a tool called bloodhound. (https://github.com/BloodHoundAD/BloodHound/wiki)
â—Ź Collects AD data through powershell to be examined on the attackers machine.
â—Ź We can now quickly identify attack vectors on the victim machine.
What’s this kerberos thing I keep hearing?
â—Ź Kerberos is a network authentication protocol that works on tickets that allow for
nodes over a network to prove their identity in a secure manner.
â—Ź Users are granted ticket granting tickets (TGT) which have a time limit after pre-
authentication. A TGT can be used to request access to a service to then gain a
ticket granting services (TGS).
â—Ź To get a TGS, a service has to be registered under a service principal name (SPN).
Kerberos delegation
â—Ź Sometimes a service may need to access another service on the users behalf.
â—Ź There are 3 main delegation features
â—‹ Unconstrained Delegation - User gives its TGT to the service and the service
uses that ticket to obtain TGS for other services.
â—‹ Constrained Delegation - The service uses the users TGS to acquire TGS for
other services.
â—‹ Protocol Transition - Allows services to request TGS on behalf of users
arbitrary users. **It can impersonate users out of thin air!!**
NTLM Relay Attack
â—Ź NetNTLM is a challenge response
authentication protocol designed by
Microsoft.
1. The client sends a NEGOTIATE message
to request authentication and
“advertise capabilities”.
2. The server sends a CHALLENGE
message that contains a random 8-byte
nonce.
3. The client sends an AUTHENTICATE
message that contains a response to the
challenge. The response is calculated
using a cryptographic function with a
key derived from the user’s password
(the NTLM hash).
Scenario 2: Wagging the Dog
● Windows and Kerberos have some “features” that could prove useful and things we need
for an successful attack.
â—Ź Kerberos offers a resource-based constrained delegation which allows a node to
configure who is allowed to delegate (impersonate) them.
â—Ź This could allow for a possible NTLM relay attack to setup up this delegation on another
services behalf if there is no signing on the communication.
● Windows 10 has a webdav server installed by default that doesn’t do message signing.
â—Ź When you change your account picture the user SYSTEM opens the image as well to
inspect its properties.
Taken from: https://shenaniganslabs.io/2019/01/28/Wagging-the-Dog.html
Scenario 2: Wagging the Dog
Taken from: https://shenaniganslabs.io/2019/01/28/Wagging-the-Dog.html
Taken from: https://shenaniganslabs.io/2019/01/28/Wagging-the-Dog.html
Scenario 3: Roasting Kerberos
● Well I don’t want to impersonate other services I rather just be that service.
â—Ź Some more facts you may wanna know about kerberos
â—‹ Need a TGT and a valid SPN to get a TGS.
○ The DC doesn’t track if it is used or if they even have access.
â—‹ The TGS for the SPN is encrypted with the service account associated with
the SPN.
○ Kerberos uses RC4_HMAC_MD5 encryption. **It uses the service account’s
NTLM password hash to encrypt the ticket**
â—Ź So could we just generate NTLM hashes and see which one opens/decrypts the
ticket?
Scenario 3: Roasting Kerberos
The Kerberoast Attack
â—Ź What if you have an admin who gives a SPN to a domain admin and makes bad
passwords?
â—Ź Can request a TGS to the domain admin as a normal user.
â—Ź Crack the hash to get the domain admins password.
â—Ź Profit????
Ticket Hash:
05f50a70b856b624df5e723
15d9c9194
Domain Admin Pass:
texsaw{r3c0n_i5_my_m1ddl3
_n4me}
DEMOOOOOOOOOOOOOOOOOOO
Let’s hack em’ up.
References
https://shenaniganslabs.io/2019/01/28/Wagging-the-Dog.html
https://www.harmj0y.net/blog/redteaming/another-word-on-delegation/
https://www.nccgroup.trust/uk/about-us/newsroom-and-events/blogs/2019/august/kerberos-resource-based-
constrained-delegation-when-an-image-change-leads-to-a-privilege-escalation/
https://adsecurity.org/?p=2362

Weitere ähnliche Inhalte

Was ist angesagt?

Industry Best Practices for SSH Access
Industry Best Practices for SSH AccessIndustry Best Practices for SSH Access
Industry Best Practices for SSH AccessDevOps.com
 
Home network security
Home network securityHome network security
Home network securityJay Mehta
 
May The Data Stay with U! Network Data Exfiltration Techniques - Brucon 2017.
May The Data Stay with U! Network Data Exfiltration Techniques - Brucon 2017.May The Data Stay with U! Network Data Exfiltration Techniques - Brucon 2017.
May The Data Stay with U! Network Data Exfiltration Techniques - Brucon 2017.Leszek Mi?
 
Responder PPT
Responder PPTResponder PPT
Responder PPTIlan Mindel
 
Defense in Depth: Securing your new Kubernetes cluster from the challenges th...
Defense in Depth: Securing your new Kubernetes cluster from the challenges th...Defense in Depth: Securing your new Kubernetes cluster from the challenges th...
Defense in Depth: Securing your new Kubernetes cluster from the challenges th...CloudOps2005
 
Incident response, Hacker Techniques and Countermeasures
Incident response, Hacker Techniques and CountermeasuresIncident response, Hacker Techniques and Countermeasures
Incident response, Hacker Techniques and CountermeasuresJose L. Quiñones-Borrero
 
Policy Based Routing (PBR) on Mikrotik
Policy Based Routing (PBR) on MikrotikPolicy Based Routing (PBR) on Mikrotik
Policy Based Routing (PBR) on MikrotikGLC Networks
 
Reverse shell
Reverse shellReverse shell
Reverse shellIlan Mindel
 
Mikrotik Hotspot
Mikrotik HotspotMikrotik Hotspot
Mikrotik HotspotGLC Networks
 
Insecurity-In-Security version.1 (2010)
Insecurity-In-Security version.1 (2010)Insecurity-In-Security version.1 (2010)
Insecurity-In-Security version.1 (2010)Abhishek Kumar
 
Trusted Email Server DKIM, SPF, DMARC, RDNS
Trusted Email Server DKIM, SPF, DMARC, RDNSTrusted Email Server DKIM, SPF, DMARC, RDNS
Trusted Email Server DKIM, SPF, DMARC, RDNSGLC Networks
 
Defense in Depth: Lessons Learned Securing 200,000 Sites
Defense in Depth: Lessons Learned Securing 200,000 SitesDefense in Depth: Lessons Learned Securing 200,000 Sites
Defense in Depth: Lessons Learned Securing 200,000 SitesPantheon
 
Insecurity-In-Security version.2 (2011)
Insecurity-In-Security version.2 (2011)Insecurity-In-Security version.2 (2011)
Insecurity-In-Security version.2 (2011)Abhishek Kumar
 
Web security at Meteor (Pivotal Labs)
Web security at Meteor (Pivotal Labs)Web security at Meteor (Pivotal Labs)
Web security at Meteor (Pivotal Labs)Emily Stark
 

Was ist angesagt? (20)

Industry Best Practices for SSH Access
Industry Best Practices for SSH AccessIndustry Best Practices for SSH Access
Industry Best Practices for SSH Access
 
Home network security
Home network securityHome network security
Home network security
 
May The Data Stay with U! Network Data Exfiltration Techniques - Brucon 2017.
May The Data Stay with U! Network Data Exfiltration Techniques - Brucon 2017.May The Data Stay with U! Network Data Exfiltration Techniques - Brucon 2017.
May The Data Stay with U! Network Data Exfiltration Techniques - Brucon 2017.
 
Cryto Party at CCU
Cryto Party at CCUCryto Party at CCU
Cryto Party at CCU
 
Responder PPT
Responder PPTResponder PPT
Responder PPT
 
Weaponization of IoT
Weaponization of IoTWeaponization of IoT
Weaponization of IoT
 
Defense in Depth: Securing your new Kubernetes cluster from the challenges th...
Defense in Depth: Securing your new Kubernetes cluster from the challenges th...Defense in Depth: Securing your new Kubernetes cluster from the challenges th...
Defense in Depth: Securing your new Kubernetes cluster from the challenges th...
 
Incident response, Hacker Techniques and Countermeasures
Incident response, Hacker Techniques and CountermeasuresIncident response, Hacker Techniques and Countermeasures
Incident response, Hacker Techniques and Countermeasures
 
Policy Based Routing (PBR) on Mikrotik
Policy Based Routing (PBR) on MikrotikPolicy Based Routing (PBR) on Mikrotik
Policy Based Routing (PBR) on Mikrotik
 
Reverse shell
Reverse shellReverse shell
Reverse shell
 
Ethereum overview
Ethereum overviewEthereum overview
Ethereum overview
 
Mikrotik Hotspot
Mikrotik HotspotMikrotik Hotspot
Mikrotik Hotspot
 
Insecurity-In-Security version.1 (2010)
Insecurity-In-Security version.1 (2010)Insecurity-In-Security version.1 (2010)
Insecurity-In-Security version.1 (2010)
 
Tls 1.3
Tls 1.3Tls 1.3
Tls 1.3
 
Trusted Email Server DKIM, SPF, DMARC, RDNS
Trusted Email Server DKIM, SPF, DMARC, RDNSTrusted Email Server DKIM, SPF, DMARC, RDNS
Trusted Email Server DKIM, SPF, DMARC, RDNS
 
Blockchain
BlockchainBlockchain
Blockchain
 
Defense in Depth: Lessons Learned Securing 200,000 Sites
Defense in Depth: Lessons Learned Securing 200,000 SitesDefense in Depth: Lessons Learned Securing 200,000 Sites
Defense in Depth: Lessons Learned Securing 200,000 Sites
 
Insecurity-In-Security version.2 (2011)
Insecurity-In-Security version.2 (2011)Insecurity-In-Security version.2 (2011)
Insecurity-In-Security version.2 (2011)
 
TLS v1.3
TLS v1.3TLS v1.3
TLS v1.3
 
Web security at Meteor (Pivotal Labs)
Web security at Meteor (Pivotal Labs)Web security at Meteor (Pivotal Labs)
Web security at Meteor (Pivotal Labs)
 

Ă„hnlich wie Cracking Active Directory Domains with Kerberos Attacks

Secure Developer Access at Decisiv
Secure Developer Access at DecisivSecure Developer Access at Decisiv
Secure Developer Access at DecisivTeleport
 
Not a Security Boundary
Not a Security BoundaryNot a Security Boundary
Not a Security BoundaryWill Schroeder
 
Jesse Burke RDPwned HackMiami7
Jesse Burke RDPwned HackMiami7Jesse Burke RDPwned HackMiami7
Jesse Burke RDPwned HackMiami7Jesse Burke
 
Final ProjectFinal Project Details Description Given a spec.docx
Final ProjectFinal Project Details Description  Given a spec.docxFinal ProjectFinal Project Details Description  Given a spec.docx
Final ProjectFinal Project Details Description Given a spec.docxAKHIL969626
 
Nymble blocking misbehaviouring users in anonymizing networks
Nymble blocking misbehaviouring users in anonymizing networksNymble blocking misbehaviouring users in anonymizing networks
Nymble blocking misbehaviouring users in anonymizing networksMuthu Samy
 
Nymble blocking misbehaviouring users in anonymizing networks
Nymble blocking misbehaviouring users in anonymizing networksNymble blocking misbehaviouring users in anonymizing networks
Nymble blocking misbehaviouring users in anonymizing networksMuthu Samy
 
Nymble blocking misbehaviouring users in anonymizing networks
Nymble blocking misbehaviouring users in anonymizing networksNymble blocking misbehaviouring users in anonymizing networks
Nymble blocking misbehaviouring users in anonymizing networksMuthu Samy
 
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...ijceronline
 
[OWASP Poland Day] Application security - daily questions & answers
[OWASP Poland Day] Application security - daily questions & answers[OWASP Poland Day] Application security - daily questions & answers
[OWASP Poland Day] Application security - daily questions & answersOWASP
 
Istio as a Service Mesh
Istio as a Service MeshIstio as a Service Mesh
Istio as a Service MeshKnoldus Inc.
 
Uber mobility - High Performance Networking
Uber mobility - High Performance NetworkingUber mobility - High Performance Networking
Uber mobility - High Performance NetworkingDhaval Patel
 
FIWARE Developers Week_BootcampWeBUI_presentation1
FIWARE Developers Week_BootcampWeBUI_presentation1FIWARE Developers Week_BootcampWeBUI_presentation1
FIWARE Developers Week_BootcampWeBUI_presentation1FIWARE
 
Introduction to Akka Serverless
Introduction to Akka ServerlessIntroduction to Akka Serverless
Introduction to Akka ServerlessKnoldus Inc.
 
S.A.kalaiselvan blocking misbehaving users in anonymizing
S.A.kalaiselvan blocking misbehaving users in anonymizingS.A.kalaiselvan blocking misbehaving users in anonymizing
S.A.kalaiselvan blocking misbehaving users in anonymizingkalaiselvanresearch
 
Cloud firewall logging
Cloud firewall loggingCloud firewall logging
Cloud firewall loggingJoyent
 

Ă„hnlich wie Cracking Active Directory Domains with Kerberos Attacks (20)

Windows Domains Part 2
Windows Domains Part 2Windows Domains Part 2
Windows Domains Part 2
 
Introduction to Domains and Hacking
Introduction to Domains and HackingIntroduction to Domains and Hacking
Introduction to Domains and Hacking
 
Secure Developer Access at Decisiv
Secure Developer Access at DecisivSecure Developer Access at Decisiv
Secure Developer Access at Decisiv
 
Not a Security Boundary
Not a Security BoundaryNot a Security Boundary
Not a Security Boundary
 
Jesse Burke RDPwned HackMiami7
Jesse Burke RDPwned HackMiami7Jesse Burke RDPwned HackMiami7
Jesse Burke RDPwned HackMiami7
 
Final ProjectFinal Project Details Description Given a spec.docx
Final ProjectFinal Project Details Description  Given a spec.docxFinal ProjectFinal Project Details Description  Given a spec.docx
Final ProjectFinal Project Details Description Given a spec.docx
 
Kerberos
KerberosKerberos
Kerberos
 
Nymble blocking misbehaviouring users in anonymizing networks
Nymble blocking misbehaviouring users in anonymizing networksNymble blocking misbehaviouring users in anonymizing networks
Nymble blocking misbehaviouring users in anonymizing networks
 
Nymble blocking misbehaviouring users in anonymizing networks
Nymble blocking misbehaviouring users in anonymizing networksNymble blocking misbehaviouring users in anonymizing networks
Nymble blocking misbehaviouring users in anonymizing networks
 
Nymble blocking misbehaviouring users in anonymizing networks
Nymble blocking misbehaviouring users in anonymizing networksNymble blocking misbehaviouring users in anonymizing networks
Nymble blocking misbehaviouring users in anonymizing networks
 
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
 
[OWASP Poland Day] Application security - daily questions & answers
[OWASP Poland Day] Application security - daily questions & answers[OWASP Poland Day] Application security - daily questions & answers
[OWASP Poland Day] Application security - daily questions & answers
 
Istio as a Service Mesh
Istio as a Service MeshIstio as a Service Mesh
Istio as a Service Mesh
 
Uber mobility - High Performance Networking
Uber mobility - High Performance NetworkingUber mobility - High Performance Networking
Uber mobility - High Performance Networking
 
FIWARE Developers Week_BootcampWeBUI_presentation1
FIWARE Developers Week_BootcampWeBUI_presentation1FIWARE Developers Week_BootcampWeBUI_presentation1
FIWARE Developers Week_BootcampWeBUI_presentation1
 
Introduction to Akka Serverless
Introduction to Akka ServerlessIntroduction to Akka Serverless
Introduction to Akka Serverless
 
The Perimeter Is Dead
The Perimeter Is DeadThe Perimeter Is Dead
The Perimeter Is Dead
 
S.A.kalaiselvan blocking misbehaving users in anonymizing
S.A.kalaiselvan blocking misbehaving users in anonymizingS.A.kalaiselvan blocking misbehaving users in anonymizing
S.A.kalaiselvan blocking misbehaving users in anonymizing
 
Mqtt
MqttMqtt
Mqtt
 
Cloud firewall logging
Cloud firewall loggingCloud firewall logging
Cloud firewall logging
 

Mehr von UTD Computer Security Group

Mehr von UTD Computer Security Group (20)

Py jail talk
Py jail talkPy jail talk
Py jail talk
 
Cloud talk
Cloud talkCloud talk
Cloud talk
 
Forensics audio and video
Forensics   audio and videoForensics   audio and video
Forensics audio and video
 
Intro to python
Intro to pythonIntro to python
Intro to python
 
Powershell crash course
Powershell crash coursePowershell crash course
Powershell crash course
 
Intro to cybersecurity
Intro to cybersecurityIntro to cybersecurity
Intro to cybersecurity
 
Intro to Bash
Intro to BashIntro to Bash
Intro to Bash
 
Web Exploitation
Web ExploitationWeb Exploitation
Web Exploitation
 
Penetration Testing: Celestial
Penetration Testing: CelestialPenetration Testing: Celestial
Penetration Testing: Celestial
 
Cryptography Crash Course
Cryptography Crash CourseCryptography Crash Course
Cryptography Crash Course
 
Fuzzing - Part 2
Fuzzing - Part 2Fuzzing - Part 2
Fuzzing - Part 2
 
Exploitation Crash Course
Exploitation Crash CourseExploitation Crash Course
Exploitation Crash Course
 
Fuzzing - Part 1
Fuzzing - Part 1Fuzzing - Part 1
Fuzzing - Part 1
 
Protostar VM - Heap3
Protostar VM - Heap3Protostar VM - Heap3
Protostar VM - Heap3
 
Heap Base Exploitation
Heap Base ExploitationHeap Base Exploitation
Heap Base Exploitation
 
Return Oriented Programming
Return Oriented ProgrammingReturn Oriented Programming
Return Oriented Programming
 
Advanced Windows Exploitation
Advanced Windows ExploitationAdvanced Windows Exploitation
Advanced Windows Exploitation
 
Advanced Domain Hacking
Advanced Domain HackingAdvanced Domain Hacking
Advanced Domain Hacking
 
Security Information and Event Management
Security Information and Event ManagementSecurity Information and Event Management
Security Information and Event Management
 
Format String Exploitation
Format String ExploitationFormat String Exploitation
Format String Exploitation
 

KĂĽrzlich hochgeladen

SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
WhatsApp 9892124323 âś“Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 âś“Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 âś“Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 âś“Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 

KĂĽrzlich hochgeladen (20)

SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
WhatsApp 9892124323 âś“Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 âś“Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 âś“Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 âś“Call Girls In Kalyan ( Mumbai ) secure service
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 

Cracking Active Directory Domains with Kerberos Attacks

  • 1. Cracking the domain Please sign-in via QR Code or https://goo.gl/U46rfU But… gaining knowledge is fun and we always profit from knowledge...
  • 2. Announcements â—Ź Square CTF - Oct 10th â—Ź Cambrian Cyber Group - October 21st â—Ź Alkami - October 28th â—Ź Firetalks - October 30th â—Ź TI - November 4th â—Ź Officer Applications!
  • 3. What is a network domain? â—Ź A network domain is an administrative grouping of multiple private computer networks or hosts within the same infrastructure. â—Ź A domain controller is a server that automates logins, user groups, and architecture of the domain. â—‹ Typically on microsoft servers. â—‹ Makes it so you don't have to manual setup every host with all the domain data individually.
  • 4. What do I want out of this? â—Ź In an ideal pentest you want to control the entire network because that’s what the attackers want. â—Ź The domain controller tells all the other systems how the domain works and how it supposed to look. â—‹ Controller is managed by the domain admin. â—Ź I.E. I want to be domain admin.
  • 5. Okay, so how can I become the big daddy admin? â—Ź You could… â—Ź Phish the admin. â—Ź Break in through web stuff.. â—Ź Kidnap the admin. â—Ź “Persuade” the admin. â—Ź Physically connect to the domain controller. â—Ź Or you could.. â—Ź Abuse the domains architecture to laterally move. â—Ź Abuse active directory. â—Ź Exploit Domain services like Kerberos.
  • 6. What’s an active directory? â—Ź The Active Directory Domain Service is a service that authenticates and authorizes all computers and users in a domain, assigning and enforcing security policies (GPO) for all computers. â—‹ Runs on the Lightweight Directory Access Protocol (LDAP) â—Ź Holds data about what users can access/allowed to do on specified systems. Permissions can be given individually or through AD Groups. â—Ź AD can have many more services like.. â—‹ Certificate services. â—‹ Federation services. â—‹ Rights management.
  • 7.
  • 8. 3 attack scenarios 1. Attacking the domain by exploiting it’s architecture. Starting from comfortable shell access of a domain system. 2. Attacking a single machine by exploiting the domains kerberos system. Starting from a more restricted shell access of a domain system. 3. Owning the whole domain by exploiting the domains kerberos system. Starting from no shell access of a domain system.
  • 9. Scenario 1: The Bloodhound â—Ź You are inside the network and on a system that is flexible. â—‹ Allows you to download and run things without much fuss. â—‹ Currently a user on the system. â—‹ Currently not much on the immediate system that is exploitable. â—Ź To take advantage of the domain architecture and user permissions you could use a tool called bloodhound. (https://github.com/BloodHoundAD/BloodHound/wiki) â—Ź Collects AD data through powershell to be examined on the attackers machine. â—Ź We can now quickly identify attack vectors on the victim machine.
  • 10.
  • 11. What’s this kerberos thing I keep hearing? â—Ź Kerberos is a network authentication protocol that works on tickets that allow for nodes over a network to prove their identity in a secure manner. â—Ź Users are granted ticket granting tickets (TGT) which have a time limit after pre- authentication. A TGT can be used to request access to a service to then gain a ticket granting services (TGS). â—Ź To get a TGS, a service has to be registered under a service principal name (SPN).
  • 12.
  • 13. Kerberos delegation â—Ź Sometimes a service may need to access another service on the users behalf. â—Ź There are 3 main delegation features â—‹ Unconstrained Delegation - User gives its TGT to the service and the service uses that ticket to obtain TGS for other services. â—‹ Constrained Delegation - The service uses the users TGS to acquire TGS for other services. â—‹ Protocol Transition - Allows services to request TGS on behalf of users arbitrary users. **It can impersonate users out of thin air!!**
  • 14. NTLM Relay Attack â—Ź NetNTLM is a challenge response authentication protocol designed by Microsoft. 1. The client sends a NEGOTIATE message to request authentication and “advertise capabilities”. 2. The server sends a CHALLENGE message that contains a random 8-byte nonce. 3. The client sends an AUTHENTICATE message that contains a response to the challenge. The response is calculated using a cryptographic function with a key derived from the user’s password (the NTLM hash).
  • 15. Scenario 2: Wagging the Dog â—Ź Windows and Kerberos have some “features” that could prove useful and things we need for an successful attack. â—Ź Kerberos offers a resource-based constrained delegation which allows a node to configure who is allowed to delegate (impersonate) them. â—Ź This could allow for a possible NTLM relay attack to setup up this delegation on another services behalf if there is no signing on the communication. â—Ź Windows 10 has a webdav server installed by default that doesn’t do message signing. â—Ź When you change your account picture the user SYSTEM opens the image as well to inspect its properties. Taken from: https://shenaniganslabs.io/2019/01/28/Wagging-the-Dog.html
  • 16. Scenario 2: Wagging the Dog Taken from: https://shenaniganslabs.io/2019/01/28/Wagging-the-Dog.html
  • 18. Scenario 3: Roasting Kerberos â—Ź Well I don’t want to impersonate other services I rather just be that service. â—Ź Some more facts you may wanna know about kerberos â—‹ Need a TGT and a valid SPN to get a TGS. â—‹ The DC doesn’t track if it is used or if they even have access. â—‹ The TGS for the SPN is encrypted with the service account associated with the SPN. â—‹ Kerberos uses RC4_HMAC_MD5 encryption. **It uses the service account’s NTLM password hash to encrypt the ticket** â—Ź So could we just generate NTLM hashes and see which one opens/decrypts the ticket?
  • 19. Scenario 3: Roasting Kerberos The Kerberoast Attack â—Ź What if you have an admin who gives a SPN to a domain admin and makes bad passwords? â—Ź Can request a TGS to the domain admin as a normal user. â—Ź Crack the hash to get the domain admins password. â—Ź Profit???? Ticket Hash: 05f50a70b856b624df5e723 15d9c9194 Domain Admin Pass: texsaw{r3c0n_i5_my_m1ddl3 _n4me}

Hinweis der Redaktion

  1. Certificate is for regulating enterprise wide public key infrastructure. Federation is for single sign on services. Rights management is for restricting documents rights in AD.
  2. BloodHound is a single page Javascript web application, built on top of Linkurious, compiled with Electron, with a Neo4j database fed by a C# data collector. BloodHound uses graph theory to reveal the hidden and often unintended relationships within an Active Directory environment. Attackers can use BloodHound to easily identify highly complex attack paths that would otherwise be impossible to quickly identify. Defenders can use BloodHound to identify and eliminate those same attack paths. Both blue and red teams can use BloodHound to easily gain a deeper understanding of privilege relationships in an Active Directory environment.
  3. When users log in, they encrypt a piece of information (a timestamp) with an encryption key derived from their password, to prove to the authentication server that they know the password. This step is called “preauthentication”. In Active Directory environments, the authentication server is a domain controller. Upon successful preauthentication, the authentication server provides the user with a ticket-granting-ticket (TGT), which is valid for a limited time. When a user wishes to authenticate to a certain service, the user presents the TGT to the authentication server. If the TGT is valid, the user receives a ticket-granting service (TGS), also known as a “service ticket”, from the authentication server. The user can then present the TGS to the service they want to access, and the service can authenticate the user and make authorisation decisions based on the data contained in the TGS.
  4. An attacker in a man-in-the-middle position waits for an incoming NEGOTIATE message from a victim. The attacker relays the NEGOTIATE message to the target server. The target server sends a CHALLENGE message to the attacker. The attacker relays the CHALLENGE message to the victim. The victim generates a valid AUTHENTICATE message and sends it to the attacker. The attacker relays the valid AUTHENTICATE message to the target server. The target server accepts the AUTHENTICATE message and the attacker is authenticated successfully. The NetNTLM protocol does not only provide authentication but can also facilitate a session key exchange for encryption (“sealing”) and signing. The client and the server negotiate whether sealing/signing is required through certain flags in the exchanged messages. The exchanged session key is RC4 encrypted using a key derived from the client’s NTLM hash. The client obviously holds the NTLM hash and can decrypt it. However, a domain member server does not hold the NTLM hash of domain users, but only of local users. When a domain user exchanges a session key with a member server, the member server uses the Netlogon RPC protocol to validate the client’s response to the challenge with a domain controller, and if a session key was exchanged then the key to decrypt it is calculated by the domain controller and provided to the member server. This separation of knowledge ensures that the member server does not obtain the NTLM hash of the client, and the domain controller does not obtain the session key. If the client and server negotiate a session key for signing, an attacker performing a relay attack can successfully authenticate, but will not be able to obtain the session key to sign subsequent messages, unless the attacker can obtain one of the following: The NTLM hash of the victim. Credentials for the computer account of the target server. Compromise a domain controller. However, if the attacker obtains any of the above, they do not need to perform an NTLM relay attack to compromise the target host or impersonate the victim, and this is the reason signing mitigates NTLM relay attacks.
  5. The attacker compromises credentials or a TGT for an account that has an SPN or creates one (“Service A”). The attacker gains unprivileged access to another computer running Windows 10 or Windows Server 2016/2019 with the WebDAV Redirector feature installed (“Service B”). If required, the attacker uses Service A to add a DNS record using ADIDNS. The attacker changes the account profile picture to a path on a rogue WebDAV NTLM relay server. The attacker relays the computer account NTLM authentication to the LDAP service on the domain controller, and configures resource-based constrained delegation from Service A to Service B. The attacker uses Rubeus to perform a full S4U attack to obtain a TGS to Service B for a user that has local administrator privileges on it. The attacker can pass-the-ticket to compromise Service B.
  6. This attack involves requesting a Kerberos service ticket(s) (TGS) for the Service Principal Name (SPN) of the target service account. This request uses a valid domain user’s authentication ticket (TGT) to request one or several service tickets for a target service running on a server. The Domain Controller doesn’t track if the user ever actually connects to these resources (or even if the user has access). The Domain Controller looks up the SPN in Active Directory and encrypts the ticket using the service account associated with the SPN in order for the service to validate user access. The encryption type of the requested Kerberos service ticket is RC4_HMAC_MD5 which means the service account’s NTLM password hash is used to encrypt the service ticket. This means that Kerberoast can attempt to open the Kerberos ticket by trying different NTLM hashes and when the ticket is successfully opened, the correct service account password is discovered. Works well because service account passwords are typically short.