ubuntu-os-capture-wireless-beacon-frame-by-wireshark
Version
Wireshark
: 3.6.2iw
: 5.16wifi
:Realtek Semiconductor Co., Ltd. RTL8852AE 802.11ax PCIe Wireless Network Adapter
bylspci
安装wireshark
1 | sudo apt -y install iw ethtool wireshark |
然后logout
或重启系统
Wi-Fi断开连接
这里需要将无线网卡的wifi
断开连接, 即不连接任何路由器, 不然切换monitor
模式时会自动切回来.
可以将wifi
设置所有SSID
忘记密码.
设置Wi-Fi为monitor模式
1 | sudo ip link set wlp2s0 down |
设置完之后可通过以下命令查看是否切换成monitor
模式
1 | / # iwconfig wlp2s0 |
开始抓包
启动Wireshark
.
选择wlp2s0
网卡.
过滤框输入: wlan.fc.type_subtype==0x08
, 表示只看beacon
帧.
Wireshark
菜单栏 -> View
-> Wireless Toolbar
选上, 这样才能选择抓不同信道的beacon
帧.
如下图所示, 选上后会在过滤框下方多出一栏, 可以选择特定信道.
恢复Wi-Fi
以上抓包完成后, 需要恢复Wi-Fi
1 | sudo ip link set wlp2s0 down |
设置完之后可通过以下命令查看是否切换成managed
模式
1 | / # iwconfig wlp2s0 |