电子说
1、配置内核信道监管域
WiFi信道根据国家地区的不同,有着严格的频道划分,某些5G信道可以作为雷达探测使用,这意味着 如果有路由器工作在雷达探测保留信道,那么意味着你很可能不能在上边注入,解除认证,以及创建虚假克隆 AP。因此我们需要根据WiFi信道顺从表,修改内核监管域国家代码,以影响无线网卡工作频段,使其 能正常注入、解除认证、创建AP等
WLAN信道顺从表案例:https://www.docin.com/p-2253061296.html
编辑开机启动配置文件
# 编辑配置,使得每次开机将无线网卡工作频率 # 国家代码设置为CN(中国),特别推荐PA(巴拿马)可以避开雷达信道,解除认证5G杠杠的 ╰─ vim /etc/rc.local #!/bin/bash # THIS FILE IS ADDED FOR COMPATIBILITY PURPOSES # # It is highly advisable to create own systemd services or udev rules # to run scripts during boot instead of using this file. # # In contrast to previous versions due to parallel execution during boot # this script will NOT be run after all other services. # # Please note that you must run 'chmod +x /etc/rc.d/rc.local' to ensure # that this script will be executed during boot. # set wlan frequency country code to PA/CN iw reg set PA exit 0 # 添加执行权限 ╰─ chmod +x /etc/rc.local
复制
使配置生效
# 重启服务 ╰─ systemctl restart rc-local.service ╰─ systemctl status rc-local.service # 或者重启机器 ╰─ reboot
复制
之后你会发现8812au将能够成功deauth解除认证所有5G信号
#配置完成后验证信道 #你应该能看到如下输出 #信道后边应该没有任何特殊标记 #说明我们可以在上边执行deauth与创建AP ╰─ iw list Wiphy phy0 Frequencies: * 2412 MHz [1] (20.0 dBm) * 2417 MHz [2] (20.0 dBm) * 2422 MHz [3] (20.0 dBm) * 2427 MHz [4] (20.0 dBm) * 2432 MHz [5] (20.0 dBm) * 2437 MHz [6] (20.0 dBm) * 2442 MHz [7] (20.0 dBm) * 2447 MHz [8] (20.0 dBm) * 2452 MHz [9] (20.0 dBm) * 2457 MHz [10] (20.0 dBm) * 2462 MHz [11] (20.0 dBm) * 2467 MHz [12] (20.0 dBm) * 2472 MHz [13] (20.0 dBm) * 2484 MHz [14] (20.0 dBm) Frequencies: * 5075 MHz [15] (30.0 dBm) * 5080 MHz [16] (30.0 dBm) * 5085 MHz [17] (30.0 dBm) * 5090 MHz [18] (30.0 dBm) * 5100 MHz [20] (30.0 dBm) * 5120 MHz [24] (30.0 dBm) * 5140 MHz [28] (30.0 dBm) * 5160 MHz [32] (30.0 dBm) * 5180 MHz [36] (30.0 dBm) * 5200 MHz [40] (30.0 dBm) * 5220 MHz [44] (30.0 dBm) * 5240 MHz [48] (30.0 dBm) * 5260 MHz [52] (30.0 dBm) * 5280 MHz [56] (30.0 dBm) * 5300 MHz [60] (30.0 dBm) * 5320 MHz [64] (30.0 dBm) * 5340 MHz [68] (30.0 dBm) * 5360 MHz [72] (30.0 dBm) * 5380 MHz [76] (30.0 dBm) * 5400 MHz [80] (30.0 dBm) * 5420 MHz [84] (30.0 dBm) * 5440 MHz [88] (30.0 dBm) * 5460 MHz [92] (30.0 dBm) * 5480 MHz [96] (30.0 dBm) * 5500 MHz [100] (30.0 dBm) * 5520 MHz [104] (30.0 dBm) * 5540 MHz [108] (30.0 dBm) * 5560 MHz [112] (30.0 dBm) * 5580 MHz [116] (30.0 dBm) * 5600 MHz [120] (30.0 dBm) * 5620 MHz [124] (30.0 dBm) * 5640 MHz [128] (30.0 dBm) * 5660 MHz [132] (30.0 dBm) * 5680 MHz [136] (30.0 dBm) * 5700 MHz [140] (30.0 dBm) * 5720 MHz [144] (30.0 dBm) * 5745 MHz [149] (30.0 dBm) * 5765 MHz [153] (30.0 dBm) * 5785 MHz [157] (30.0 dBm) * 5805 MHz [161] (30.0 dBm) * 5825 MHz [165] (30.0 dBm) * 5845 MHz [169] (30.0 dBm) * 5865 MHz [173] (30.0 dBm) * 5885 MHz [177] (30.0 dBm)
复制
2、配置fluxion以修复5Ghz创建AP
配置fluxion以支持创建5G频段的AP
#编辑ap脚本文件 ╰─ cat 桌面/fluxion-fix-for-5Ghz/lib/ap/hostapd.sh function ap_service_prep() { if [ ${#@} -lt 5 ]; then return 1; fi APServiceInterface=$1 APServiceInterfaceAddress=$2 APServiceSSID=$3 APServiceMAC=$4 APServiceChannel=$5 ap_service_stop # Prepare the hostapd config file. country_code="$(iw reg get | awk 'FNR == 2 {print $2}' | cut -f 1 -d ":" 2 > /dev/null)" [[ ! ${country_code} =~ ^[A-Z]{2}$ ]] && country_code="00" rm -rf "$APServiceConfigDirectory/$APServiceMAC-hostapd.conf" > /dev/null 2 >&1 echo " interface=$APServiceInterface driver=nl80211 ssid=$APServiceSSID channel=$APServiceChannel" > > "$APServiceConfigDirectory/$APServiceMAC-hostapd.conf" if [[ ${APServiceChannel} -gt 14 ]];then { echo -e "hw_mode=a" } > > "$APServiceConfigDirectory/$APServiceMAC-hostapd.conf" else { echo -e "hw_mode=g" } > > "$APServiceConfigDirectory/$APServiceMAC-hostapd.conf" fi if [[ "${country_code}" != "00" ]];then { echo -e "country_code=${country_code}" } > > "$APServiceConfigDirectory/$APServiceMAC-hostapd.conf" fi
复制
添加如下代码
之后,你会发现fluxion将会正常创建5G频段的AP,不会卡住
审核编辑 黄宇
全部0条评论
快来发表一下你的评论吧 !