Airmon-ng doesn't work ( ASUS TUF-AX4200 v.23.05.5 )

My router ASUS TUF-AX4200 has firmware 23.05.5 installed.
I connect via ssh and try to start the airmon-ng, and get the following output

root@nameless:~# airmon-ng
/usr/sbin/airmon-ng: line 14: mountpoint: not found
/sys is not mounted, you can probably mount it with:
mount -t sysfs sysfs /sys
This program cannot continue without a working sysfs.

Please tell me how to switch wifi to monitor mode and start monitoring?

You can patch out that check in line 14 mountpoint -q until following exit statement, ultimately reporting bug in github openwrt/packages.

What do you mean patch this? What exactly should i write in line 14? right now it's like this

if ! mountpoint -q -- /sys; then

Put cuneiform in front of two offending lines.
no write nothing.

Okay, that's what I did. Now he wants lsusb, but where can I get it?

Please install lsusb from your distro's package manager.

In usbutils.

1 Like

Once we get that working please fill a bug report (or PR if you feel strong at it) namely to patch out mountpoint -q section and add usbutils dependency and whatever we find needed. if memory serves me well iw dev wlan0 monitor none and iw dev wlan0 managed were the commands to switch modes.

I installed the usbutils package (which for some reason was not installed as a dependency for aircrack-ng when building the firmware!), and now (with the commented block if ! mountpoint -q -- /sys; then) airmon-ng starts, but for some reason does not switch phy0 to monitor mode, and therefore I have to use iw for this.

Two points so far need a code change and it still does not work :roll_eyes:

Go report an issue with both steps taken so far into:

the script is supposed to kill supplicants and networkmanagers to liberate intetface for monitor mode.

I think I realized my mistake. Switching to monitor mode works!
Please look at how I do this, are all my actions correct?

root@nameless:~# airmon-ng

PHY      Interface       Driver                         Chipset

phy0     phy0-ap0       mt798x-wmac            Not pci, usb, or sdio
phy1     phy1-sta0      mt798x-wmac            Not pci, usb, or sdio

root@nameless:~# airmon-ng start phy0-ap0
....

root@nameless:~# airmon-ng

PHY      Interface              Driver                         Chipset
phy0     phy0-ap0mon       mt798x-wmac            Not pci, usb, or sdio
phy1     phy1-sta0             mt798x-wmac            Not pci, usb, or sdio

There are two questions left:

  1. We need to comment out the IF block
  2. Usbutls was not installed when building the firmware

Please tell me, is it possible to save the data that airdump creates ( *.cap files ) to the internal memory or is it better to use a flash drive for this?

You can save them in /tmp ramdisk.

1 Like

Running the airmon script is not necessary on OpenWrt. The UCI system directly supports creating wifi interfaces of type monitor.

config wifi-iface
    option device 'radio0'
    option ifname 'mon0'
    option mode 'monitor'

For best results use the radio only for monitor; don't try to run an AP or STA on the same radio.

Kind of that script is shipped dysfunctional, it should not be at all likely... or echo to use luci