使用 John the Ripper 破解 WPA/WPA2 握手包
在本步骤中,你将使用 John the Ripper 来尝试从转换后的握手包文件中破解 WPA/WPA2 密码。John the Ripper 是一个强大的密码破解工具,支持多种攻击模式,包括字典攻击(dictionary attack)。字典攻击涉及使用一个常用密码列表(wordlist)来尝试破解捕获的握手包。
你将使用 john 命令配合 --wordlist 选项来指定 wordlist 文件和握手包文件的路径。setup 脚本已在你的 ~/project 目录下创建了一个名为 wordlist.txt 的简单 wordlist。
执行以下命令来尝试破解虚拟握手包:
john --format=wpapsk --wordlist=~/project/wordlist.txt ~/project/dummy_handshake.hccapx
--format=wpapsk: 指定 John the Ripper 应该期望的哈希格式,对于 Wi-Fi 握手包,这是 WPA-PSK。
--wordlist=~/project/wordlist.txt: 指示 John 使用包含潜在密码的字典文件。
~/project/dummy_handshake.hccapx: 转换后的握手包文件的路径。
运行命令后,John the Ripper 将尝试破解密码。如果 wordlist 中的密码匹配,它将被显示出来。对于我们的虚拟握手包和 wordlist,应该能找到密码 labex123。
示例输出:
Using default input encoding: UTF-8
Loaded 1 password hash (WPA-PSK [PBKDF2-SHA1 256/256 AVX2])
Will run till completion
Press 'q' or Ctrl-C to abort, almost any other key for status
labex123 (dummy_essid)
1g 0:00:00:00 DONE (2023-10-26 08:00) 100% (ETA: 08:00) 1.000g/s 5.000p/s 5.000c/s 5.000C/s labex123
Session completed.
labex123 (dummy_essid) 这一行表示,对于 ESSID(网络名称)dummy_essid,密码 labex123 已成功破解。