descriptionnone
repository URLhttps://github.com/rofl0r/wpakey.git
ownerretnyg@gmx.net
last changeThu, 31 Oct 2019 18:18:52 +0000 (31 18:18 +0000)
last refreshSat, 27 Apr 2024 13:10:43 +0000 (27 15:10 +0200)
content tags
add:
README.md

wpakey (1H) WIFI hacker's manual wpakey (1H)

NAME

wpakey - monitor mode WPA1/WPA2 online password bruteforcer

SYNOPSIS

cat password.lst | wpakey -i wlan0 -b bssid -t timeout -a -f

DESCRIPTION

reads password candidates from stdin and tries to connect to the specified AP. the wifi apapter needs to be in monitor mode and on the right channel already.

password candidates with length > 64 and < 8 will be ignored.

note that some access points (most notably hostapd) insist on getting ACK responses on every single unicast packet. due to tight timeout constraints, it is not possible to generate this ACK in due time in software, so the AP will not send EAPOL packet M1 after the association response, or if it sends it, will not accept our M2 packet without an ACK for M1, which makes it impossible to distinguish whether the password is correct, or the router bitchy.

the only fix for this issue is the so-called "active monitor" mode. currently, this feature can only be activated on ath9k and mt7601u drivers using iw dev wlan1 set monitor active. iw list or iw phyX show can tell you whether the feature is implemented, it will print Device supports active monitor (which will ACK incoming frames) if supported. note that even though this feature cannot be actively activated on ath9k_htc devices, some or all of them have this behaviour turned on by default, so it may well be that other devices behave the same.

therefore, it is highly recommend to use an adapter with one of the mentioned chipsets for a reliable result.

on the bright side, if we can get the targetted AP to send M1 (regardless of whether the password we send during M2 is correct), we can retrieve its PMKID (if it sends one) and crack it with john the ripper instead.

RETURN VALUE

if the correct password is found, it will be displayed on stdin and the program will exit with status 0. if the correct password is not found, exits with status 1.

ERRORS

No errors are defined. The following sections are informative.

RATIONALE

it is possible to test password candidates online using a patched version of wpa_supplicant (see KEEP/wpa_supplicant-cracker.patch and KEEP/wpacracker in sabotage-linux repo), however it is very slow, and it is annoying to switch from monitor mode to managed mode during pentesting.

FUTURE DIRECTIONS

currently only WPA1/2 in AES CCMP mode is supported. support for TKIP, WEP and other ciphers may be added in the future.

(C) 2018 rofl0r

the crypto code in crypto/, wsupp_crypto.c and the function pmk_to_ptk() were taken from https://github.com/arsv/wsupp-libc which is licensed under the GPLv3.

due to the viral nature of the GPL, this project is currently licensed under the GPLv3.

THANKS

thanks to arsv for well commented, concise code. thanks to dragorn, Mister_X, Zero_Chaos for giving valuable tips.

shortlog
2019-10-31 rofl0radd -a (assoc only) command line optionmaster
2019-10-31 rofl0rmove authentication check from start to before M2
2019-10-31 rofl0rsupport automatic essid retrieval
2019-10-31 rofl0rdetect WLAN_AKM_SUITE_FT_PSK
2019-10-31 rofl0rimprove debug output
2019-10-31 rofl0rimprove output
2019-10-06 rofl0radd option -f for fatal timeouts
2019-10-06 rofl0rupdate README
2018-02-22 rofl0rstop assuming that AP repeats sending M1 over and over
2018-02-15 rofl0rfix wiki formatting and add thanks section
2018-02-15 rofl0radd README
2018-02-15 rofl0rmake timeout seconds adjustable
2018-02-15 rofl0rfix make clean
2018-02-15 rofl0rremove annoying warning
2018-02-15 rofl0rfail when we don't support a cipher
2018-02-15 rofl0rfix compat with WPA1 (only hmac-sha1 and CCMP/AES mode...
...
heads
4 years ago master