Raspbian - 无法通过HostAPD欺骗MAC地址


1

我试图让我的Raspberry Pi功能作为接入点,但我一直遇到一些问题。特别是在欺骗MAC地址时。目的是在家中创建一个Nintendo 3DS 街道通道热点。我主要是关注这个指南

首先我正在使用的东西:Raspberry Pi Model B带有TP-Link TL-WN725N v2无线usb适配器和Realtek RTL8188EUS芯片组。这一个是推荐为AR的目的。

通过NOOBS v1.3.9(2014-07-08)安装在Raspbian GNU / Linux 7上运行的内核:

Linux raspberrypi 3.12.22+ #691 PREEMPT Wed Jun 18 18:29:58 BST 2014 armv6l GNU/Linux

lsusb 在wlan适配器上:

Bus 001 Device 004: ID 0bda:8179 Realtek Semiconductor Corp.

我通过本指南安装了驱动程序。iwlist wlan0 scan成功运行会返回无线网络列表。然后我继续安装必要的包。首先我通过本指南安装了HostAPD ,但遇到了一些问题(得到了错误ioctl[RTL_IOCTL_HOSTAPD]: Invalid argument)我尝试了这里建议的内容。成功。在此之后我安装了两个软件包isc-dhcp-server和bridge-utils。

我为hostapd(/tmp/test.conf)创建了一个测试配置文件:

# Basic configuration

interface=wlan0
ssid=wifi
bssid=4E:53:50:4F:4F:46
channel=5
bridge=br0

# WPA and WPA2 configuration

macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0

# Hardware configuration

driver=rtl871xdrv
ieee80211n=1
hw_mode=g
device_name=RTL8192CU
manufacturer=Realtek

运行hostapd /tmp/test.conf后我收到以下错误(部分返回):

+rtl871x_sta_deauth_ops, ff:ff:ff:ff:ff:ff is deauth, reason=2
Using interface wlan0 with hwaddr e8:94:f6:1c:4a:dd and ssid 'wifi'

它回退到它的真实MAC地址。运行调试将返回以下内容:

root@raspberrypi:~# hostapd -dd /tmp/test.conf
random: Trying to read entropy from /dev/random
Configuration file: /tmp/test.conf
drv->ifindex=3
Configure bridge br0 for EAPOL traffic.
BSS count 1, BSSID mask a6:c7:a6:53:05:9b (0 bits)
Allowed channel: mode=1 chan=1 freq=2412 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=2 freq=2417 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=3 freq=2422 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=4 freq=2427 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=5 freq=2432 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=6 freq=2437 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=7 freq=2442 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=8 freq=2447 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=9 freq=2452 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=10 freq=2457 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=11 freq=2462 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=12 freq=2467 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=13 freq=2472 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=14 freq=2484 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=1 freq=2412 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=2 freq=2417 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=3 freq=2422 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=4 freq=2427 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=5 freq=2432 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=6 freq=2437 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=7 freq=2442 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=8 freq=2447 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=9 freq=2452 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=10 freq=2457 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=11 freq=2462 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=36 freq=5180 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=40 freq=5200 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=44 freq=5220 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=48 freq=5240 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=52 freq=5260 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=56 freq=5280 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=60 freq=5300 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=64 freq=5320 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=100 freq=5500 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=104 freq=5520 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=108 freq=5540 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=112 freq=5560 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=116 freq=5580 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=120 freq=5600 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=124 freq=5620 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=128 freq=5640 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=132 freq=5660 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=136 freq=5680 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=140 freq=5700 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=149 freq=5745 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=153 freq=5765 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=157 freq=5785 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=161 freq=5805 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=165 freq=5825 MHz max_tx_power=0 dBm
Completing interface initialization
Mode: IEEE 802.11g  Channel: 5  Frequency: 2432 MHz
RATE[0] rate=10 flags=0x1
RATE[1] rate=20 flags=0x1
RATE[2] rate=55 flags=0x1
RATE[3] rate=110 flags=0x1
RATE[4] rate=60 flags=0x0
RATE[5] rate=90 flags=0x0
RATE[6] rate=120 flags=0x0
RATE[7] rate=180 flags=0x0
RATE[8] rate=240 flags=0x0
RATE[9] rate=360 flags=0x0
RATE[10] rate=480 flags=0x0
RATE[11] rate=540 flags=0x0
Flushing old station entries
Deauthenticate all stations
+rtl871x_sta_deauth_ops, ff:ff:ff:ff:ff:ff is deauth, reason=2
rtl871x_set_key_ops
rtl871x_set_key_ops
rtl871x_set_key_ops
rtl871x_set_key_ops
Using interface wlan0 with hwaddr e8:94:f6:1c:4a:dd and ssid 'wifi'
rtl871x_set_wps_assoc_resp_ie
rtl871x_set_wps_beacon_ie
rtl871x_set_wps_probe_resp_ie
rtl871x_set_beacon_ops
rtl871x_set_hidden_ssid ignore_broadcast_ssid:0, wifi,4
rtl871x_set_acl
wlan0: Setup of interface done.
random: Got 20/20 bytes from /dev/random

我搜索和搜索,但无论我尝试什么,它都会继续回到原来的bssid。我能做些什么才能让它以我想要的方式运行?

只是单挑:我是linux的新手。

编辑:按要求输出 ifconfig

root@raspberrypi:~# ifconfig
br0       Link encap:Ethernet  HWaddr b8:27:eb:3b:a6:3d
          inet addr:192.168.1.110  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::ba27:ebff:fe3b:a63d/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:835 errors:0 dropped:0 overruns:0 frame:0
          TX packets:364 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:183402 (179.1 KiB)  TX bytes:33584 (32.7 KiB)

eth0      Link encap:Ethernet  HWaddr b8:27:eb:3b:a6:3d
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:835 errors:0 dropped:0 overruns:0 frame:0
          TX packets:364 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:183558 (179.2 KiB)  TX bytes:37524 (36.6 KiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wlan0     Link encap:Ethernet  HWaddr e8:94:f6:1c:4a:dd
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

iw list返回,command not foundiwlist如果命令甚至具有相似的目的,则命令可用。

edit2:我安装了iw。运行iw list返回:

root@raspberrypi:~# iw list
nl80211 not found.

我不能马上回答你的问题,但BSSID选项不是你想要的。交叉发布是禁忌。;)/编辑:是啊,和请张贴的输出ifconfigiw list
Daniel B

我为交叉发帖道歉。我认为他们有不同的用户群,所以这不会是一个问题。如果需要,我可以删除一个。我发布了输出ifconfig,但iw不是我可用的命令。
鲍勃

我安装了iw包。发布更新。
鲍勃

我知道了。好吧,我自然认为你的适配器将使用内核WiFi框架。如果不是这样的话,我根本无法帮助你,对不起。
Daniel B
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.