Abuse ACLS

Computer Account are also user accounts and can be used to query the ldap like any other users, interact with ACL and you can also run bloodhound ingestor

Methods

  • ForceChangePassword abused with Set-DomainUserPassword

  • AddMembers abused with Add-DomainGroupMember

  • GenericAll abused with Set-DomainUserPassword or Add-DomainGroupMember

  • GenericWrite abused with Set-DomainObject

  • WriteOwner abused with Set-DomainObjectOwner

  • WriteDACL abused with Add-DomainObjectACL

  • AllExtendedRights abused with Set-DomainUserPassword or Add-DomainGroupMember

ACLs enumeration

#Powershell CMDLets (Manul Mode and evasive)
PS C:\\htb> Get-ADUser -Filter * | Select-Object -ExpandProperty SamAccountName > ad_users.txt
PS C:\\htb> foreach($line in [System.IO.File]::ReadLines("C:\\Users\\htb-student\\Desktop\\ad_users.txt")) {get-acl  "AD:\\$(Get-ADUser $line)" | Select-Object Path -ExpandProperty Access | Where-Object {$_.IdentityReference -match 'INLANEFREIGHT\\\\wley'}}

#Performing a Reverse Search & Mapping to a GUID Value
PS C:\\htb> $guid= "00299570-246d-11d0-a768-00aa006e0529"
PS C:\\htb> Get-ADObject -SearchBase "CN=Extended-Rights,$((Get-ADRootDSE).ConfigurationNamingContext)" -Filter {ObjectClass -like 'ControlAccessRight'} -Properties * |Select Name,DisplayName,DistinguishedName,rightsGuid| ?{$_.rightsGuid -eq $guid} | fl

Enumerate ACLs for specific User

Abuse Foreign Groups

As rule try to identify users that belongs foreing groups and then check its group permission and nested groups. It may lead to lateral improvement to the parent domain

Example 1 :

User Intrusionz3r0 belongs to the foreingn group "foreingn_admins" that also belongs to accounts operator group on parent domain controller. this leads to the Intrusionz3r0 can create an user on the Parent domain and add itself to powerfull groups. (DNSAdmins)

Tools

  • Bloodhound

  • Powerview

Enumerate Foreign Users

Find Foreign ACLs across all users within the domain

Abusing Foreign Security Principals & ACLs

Convert SID to name and vice versa

Need Credentials?

GenericAll Rights on User

GenericAll Rights on Group

GenericWrite on Computer

  • shadowCredentials (windows server 2016 or later)

  • Resource-Based Constrained Delegation (Windows 2012 onwards)

  • unicodePwd to change the machine password

GenericWrite on User

targetKerberoasting (the password should be weak enough to be cracked)

WriteOwner Rights on User

WriteDACL Rights on Group

ForceChangePassword on User

If the computer account has permission to change the password just authenticate to the machine by using any user, import powerview and make the change.

[DCSync] DS-Replication-Get-Changes and DS-Replication-Get-Changes-All on Domain Controler

ReadGMSAPassword

Refereces

Abusing Active Directory ACLs/ACEs | HackTricks

Last updated