Can I use my router as if it was a wireless adapter in linux?

I wanted to learn wi-fi hacking with aircrack-ng and stuff like that but when I make the router go into monitor mode in settings it is not an adapter in iwconfig. Guessing I am doing it very wrong. Or is it just not possible due to hardware or driver limitations? I'm connected over lan1 to my PC running Arch and Kali on live usb. TP-Link TP-1043ND v3 with the latest 22.03.0-rc5 firmware.

No, I am not going to hack anyone else. I just wanted to get a grasp of it on my own network and take advantage of these three nice antennas that I had sitting around in a cupboard for a couple of years now.

It's an ath9k radio, which fully supports monitor mode and transmitting arbitrary packets (packet injection). The UCI system supports directly defining a monitor mode interface in /etc/config/wireless. There is no need for iwconfig, which is long obsolete.

It works best of course if you don't use the radio for anything else.

1 Like

You are talking about router's files? I have no idea how to access these, I'm using luci settings and there is an option for monitor mode but when I turn it on, it is not detected by aircrack-ng. There should be wlan0 in iwconfig avilable right? Instead there is enp0s20f0u3 with no wireless interfaces when I plug in the router. I get it that my radio is capable but I want to control it from the terminal as if it was a plug and play usb interface. Could you link to some documentation or walk me through it? As you can tell I'm far from being an expert in networking. What should I use instead of iwconfig?

That would be on your PC. You need to SSH log into the router and run something like kismet-drone there.

iw is now used for low-level configuration of wireless hardware. On OpenWrt you should use it as a read-only utility for example iw dev will show which logical devices exist:

phy#1
	Interface mon0
		ifindex 26
		wdev 0x100000002
		addr (MAC ADDRESS REDACTED)
		type monitor
		channel 1 (2412 MHz), width: 20 MHz (no HT), center1: 2412 MHz
		txpower 20.00 dBm

Edit: kismet seems to no longer be a package. There is something called iwcap which claims to convert wifi packets to TCP to export them over a network. Of course you can run things like aircrack-ng directly in the router, but the real power here is making your monitor radio remote from the PC.

1 Like

I don't have enough free space to install aircrack-ng on the router. Meaning I do but I will be left with 0.1MB of storage left and I don't know even how to do it. I would have to add a new repository right? I managed to log in using SSH but I have no clue what to do next. iw dev works and prints out:

phy#0
        Interface wlan0
                ifindex 9
                wdev 0x2
                addr *A MAC ADRESS*
                type monitor
                channel 1 (2412 MHz), width: 20 MHz (no HT), center1: 2412 MHz
                txpower 25.00 dBm

No clue what to do next, please help.

Get a wifi adapter for your pc and work on the pc only

Well I have an USB adapter but it sucks, it is literally not detecting clients from meters away and it is not reliable.

With 8/64 memory, a V3 isn't completely unusable, but you'll need Image Builder or build from source to fit the packages you want (mostly by removing some others).

1 Like

You can check which usb adaptor are the best for pen testing

1 Like