Attack Active Directory
Attack Active Directory
of ACL in AD
Shlyundin Pavel
Bio
Name: Shlyundin Pavel
Alias: Riocool t.me/riocool
Day job: BSS-Security
Night job(s):
Github: github.com/PShlyundin/ldap_shell
Telegram chanel: t.me/RedTeambro
Certifications:
OSCP, LPT, OSCE, OSWE, CRTE, EcPTXv2
CTF (Standoff) Team: True0xA3
ACL, DACL and SACL
Имя Фамилия
Security Descriptor
Имя Фамилия
ACL in ADUC
Имя Фамилия
ACL, DACL and SACL
Имя Фамилия
ACE
All ACEs include:
□ A 32-bit set of flags that control auditing
□ A 32-bit access mask that specifies access rights
allowed
□ A security identifier (SID) that identifies the
principal/trustee that has the given rights
Имя Фамилия
ACE
RIGHT Mask Human view
RIGHT_DS_CREATE_CHILD 0x00000001 CreateChild
RIGHT_DS_DELETE_CHILD 0x00000002 DeleteChild
RIGHT_DS_LIST_CONTENTS 0x00000004 ListChildren
RIGHT_DS_WRITE_PROPERTY_ 0x00000008 Self
EXTENDED
RIGHT_DS_READ_PROPERTY 0x00000010 ReadProperty
RIGHT_DS_WRITE_PROPERTY 0x00000020 WriteProperty
RIGHT_DS_DELETE_TREE 0x00000040 DeleteTree
RIGHT_DS_LIST_OBJECT 0x00000080 ListObject 0x20000 – ReadControl
RIGHT_DS_CONTROL_ACCESS 0x00000100 ExtendedRight 0x100 – ExtendedRight
RIGHT_DELETE 0x00010000 Delete
RIGHT_READ_CONTROL 0x00020000 ReadControl 0x30 – WriteProperty and ReadProperty
RIGHT_WRITE_DAC 0x00040000 WriteDacl 0x4 – ListChildren
RIGHT_WRITE_OWNER 0x00080000 WriteOwner
RIGHT_GENERIC_ALL 0x10000000 GenericAll
RIGHT_GENERIC_EXECUTE 0x20000000 GenericExecute
RIGHT_GENERIC_WRITE 0x40000000 GenericWrite
RIGHT_GENERIC_READ 0x80000000 GenericRead
Имя Фамилия
ACE GUI
Имя Фамилия
ACE
object_type='1131f6ad-9c07-11d1-f79f-00c04fc2dcd2' – DS-Replication-Get-Changes-All
object_type='1131f6aa-9c07-11d1-f79f-00c04fc2dcd2' – DS-Replication-Get-Changes
object_type='89e95b76-444d-4c62-991a-0facbeda640c' - DS-Replication-Get-Changes-In-Filtered-Set
Имя Фамилия
ACE
Имя Фамилия
Properties
Имя Фамилия
Shadow credentials
Имя Фамилия
More masks
Имя Фамилия
Set DcSync bloodyAD
bloodyAD - https://github.com/CravateRouge/bloodyAD
Имя Фамилия
Set DcSync ldap_shell
Ldap_shell - https://github.com/PShlyundin/ldap_shell
Имя Фамилия
ACL Abuse GenericAll
Computer:
• Reset password (bad idea)
• RBCD
• Read LAPS
• Read GMSA
• Shadow Credentials
User:
• Reset password
• Set SPN (target kerberoasting)
• Set dontreqpreauth (target as-rep roasting)
• Shadow Credentials
• Script Path
• msTSInitialProgram
Имя Фамилия
ACL Abuse
Имя Фамилия
ACL Abuse ldap_shell
https://github.com/PShlyundin/ldap_shell
Имя Фамилия
ACL Abuse ldap_shell
Имя Фамилия
ACL Abuse ldap_shell
1. Helpdesk1
• Add member
2. Helpdesk2
• Add member
3. User1
• Target Kerberoasting/As-Reproasting
6. User3
• Script Path
• Reset password
• Shadow Credentials
• Target Kerberoasting/As-Reproasting
• UP to GenericAll
• Script Path
4. User2 • Shadow Credentials
• Target Kerberoasting/As-Reproasting
7. Admin
• Script Path
• ResetPassword
• Shadow Credentials
• Target Kerberoasting/As-Reproasting
• Set Owner (Get WriteDACL)
• Script Path
• UP to GenericAll
• Shadow Credentials
5. SRV1
8. REDTEAM.BRO
• RBDC
• Set DcSync
• Shadow Credentials Имя Фамилия
ACL Abuse ldap_shell
1. Helpdesk1
• Add member
2. Helpdesk2
• Add member
3. User1
• Target Kerberoasting/As-Reproasting
6. User3
• Script Path
• Reset password
• Shadow Credentials
• Target Kerberoasting/As-Reproasting
• UP to GenericAll
• Script Path
4. User2 • Shadow Credentials
• Target Kerberoasting/As-Reproasting
7. Admin
• Script Path
• ResetPassword
• Shadow Credentials
• Target Kerberoasting/As-Reproasting
• Set Owner (Get WriteDACL)
• Script Path
• UP to GenericAll -> Reset password
• Shadow Credentials
5. SRV1
8. REDTEAM.BRO
• RBDC
• Set DcSync
• Shadow Credentials Имя Фамилия
DEMO1
Имя Фамилия
ACL Abuse ldap_shell
1. Helpdesk1
• Add member
2. Helpdesk2
• Add member
3. User1
• Target Kerberoasting/As-Reproasting
6. User3
• Script Path
• Reset password
• Shadow Credentials
• Target Kerberoasting/As-Reproasting
• UP to GenericAll
• Script Path
4. User2 • Shadow Credentials
• Target Kerberoasting/As-Reproasting
7. Admin
• Script Path
• ResetPassword
• Shadow Credentials
• Target Kerberoasting/As-Reproasting
• Set Owner (Get WriteDACL)
• Script Path
• UP to GenericAll
• Shadow Credentials
5. SRV1
8. REDTEAM.BRO
• RBDC
• Set DcSync
• Shadow Credentials Имя Фамилия
ACL Abuse ldap_shell
1. Helpdesk1
• Add member
2. Helpdesk2
• Add member
3. User1
• Target Kerberoasting/As-Reproasting
6. User3
• Script Path
• Reset password
• Shadow Credentials
• Target Kerberoasting/As-Reproasting
• UP to GenericAll
• Script Path
4. User2 • Shadow Credentials
• Target Kerberoasting/As-Reproasting
7. Admin
• Script Path
• ResetPassword
• Shadow Credentials
• Target Kerberoasting/As-Reproasting
• Set Owner (Get WriteDACL)
• Script Path
• UP to GenericAll
• Shadow Credentials
5. SRV1
8. REDTEAM.BRO
• RBDC
• Set DcSync
• Shadow Credentials Имя Фамилия
DEMO2
Имя Фамилия
Bonus
Имя Фамилия
Questions?
Имя Фамилия