cilynx / rtl88x2bu

rtl88x2bu driver updated for current kernels.
http://www.wolfteck.com/2018/02/22/wsky_1200mbps_wireless_usb_wifi_adapter/
GNU General Public License v2.0
1.61k stars 316 forks source link

airmon_ng can't create new monitor interface indicating other problems. #258

Open SK-Infidel opened 9 months ago

SK-Infidel commented 9 months ago

I discovered this issue when taking some online cyber classes. I have rtl8812bu chipset, and the built in kali drivers had it working, but it also wouldn't create a monitor interface so I tried this one. The process is as follows. airmon_ng check kill -- kills all processes that might interfere with monitor mode.

airmon_ng start wlan0 -- this runs iwconfig down, iwconfig mode monitor, iwconfig up, and creates a monitor mode virtual interface with the name mon. Not necessarily in that order. Pretty sure it stealth creates the interface first, and places that in monitor mode.

Here with this driver, and every single other one I've found it places wlan0 in monitor mode but doesn't create the monitor mode interface.

I can verify this by running ifconfig or ip link and no new interfaces have been created.

When I run airmon to enable monitor mode the output I get is:

phy0 wlan0 rtl88x2bu Realtek Semiconductor Corp. RTL88x2bu [AC1200 Techkey] (monitor mode enabled)

It SHOULD be:

phy0 wlan0 rtl88x2bu Realtek Semiconductor Corp. RTL88x2bu [AC1200 Techkey] (mac80211 monitor mode enabled for [phy0]wlan0 on [phy0]wlan0mon)

and as I said, all I see when I look at the interfaces is the ususal i0 eth0 and wlan0.. No wlan0mon.

So, I started digging through airmon_ng's script and I found that it attempts to create the interface in airmon by running

iw phy phy0 interface add mon mode monitor.

so I tried that manually on the command line and it totally jams up my entire network stack. In dmesg it appears to create a race condition. various modules scrambling to get their stuff in order despite something being missing.

Nothing ends this process trying to cannibalize itself. The wifi adapter is completely vapor locked. I have to reboot the system and and pull the adapter, and add it back again for it to work.

And yes, before installing I did configure monitor mode in the Makefile. I have also talked to some folks over at aircrack_ng forum.

The reason I'd like this to be fixed is because it inhibits my ability to run injections due to the fact that I now have to run injections over the same channel as my monitoring, which is a bit congestive. And to be honest, it should just work.

So my question is, what make flags do I need in order to get it to work?

I've done a little research, and found that all the necessary changes and fixes have been made in ioctl_cfg80211.c but they just don't seem to be run somehow. At least the cfg80211_rtw_add_virtual_intf() function

In looking at other builds of similar interfaces, namely 8812au, I notice that there's a flag called CONFIG_RTW_VIRTUAL_INTF which is usually set to n. Is that it? Do I need to set that to y?

It'd be super sweet if someone listed all the make flags and what they did for these drivers. I'm having a hard time digging up info on them.

Just wanted to give you a heads up about this, and hopefull get pointed in the right direction as to what to configure before compiling, or where I can go to find out what all the flags do.

Regards, SK.