1

Hi Ive just purchased an Alfa AWUS036NHA wireless USB wireless Adapter. I have also just upgraded the installed Kali 2.0 Sana on my hard drive to the new Kali rolling. There seems to be issues putting the wireless card into monitor mode with the new version.

root@kali:~# airmon-ng

PHY Interface   Driver      Chipset

phy0    wlan0       wl      Broadcom Corporation BCM4352 802.11ac Wireless Network Adapter (rev 03)
phy1    wlx00c0ca846d32 ath9k_htc   Atheros Communications, Inc. AR9271 802.11n

root@kali:~# airmon-ng check kill

Killing these processes:

PID Name 1006 wpa_supplicant

root@kali:~# airmon-ng

PHY Interface   Driver      Chipset

phy0    wlan0       wl      Broadcom Corporation BCM4352 802.11ac Wireless Network Adapter (rev 03)
phy1    wlx00c0ca846d32 ath9k_htc   Atheros Communications, Inc. AR9271 802.11n


root@kali:~# airmon-ng start wlx00c0ca846d32


PHY Interface   Driver      Chipset

phy0    wlan0       wl      Broadcom Corporation BCM4352 802.11ac Wireless Network Adapter (rev 03)
phy1    wlx00c0ca846d32 ath9k_htc   Atheros Communications, Inc. AR9271 802.11n


ERROR adding monitor mode interface: command failed: Invalid argument (-22)

My first question is has anyone encountered this or found a fix? I've tried a few different things without being able to fix it. After researching online the only fix I was able to find was running the adapter out of virtual box(host windows 10). After adding a new USB device it seemed to work ok, is there a way to run Kali Live in virtual Box(Host Kali Rolling) without using hard drive space and minimal resources to run the card in monitor mode until I can find a way to run it inside Kali Rolling?

  • If you look in /sys/class/net/ with the device plugged in should be 3 directories io wlan0 and anotherName. Can you post anotherName and the output from cat /sys/class/net/anotherName/phy80211/name and ls -l "/sys/class/net/anotherName/phy80211" | sed 's/^.*\/\([a-zA-Z0-9_-]*\)$/\1/') – bu5hman Nov 30 '17 at 12:40
0

Very late answer but this question intrigued me as I never had an issue with the same hardware.

With reference to the airmon-ng script, this shows that the error is thrown here

printf "\n\nERROR adding monitor mode interface: ${IW_ERROR}\n"

and IW_ERRORis evaluated as the output from the command

IW_ERROR="$(iw phy ${PHYDEV} interface add ${1}mon type monitor 2>&1)"

$PHYDEV is returned from a function that examines the wireless devices

getPhy() {
    if [ -z "$1" ]; then
            return
    fi

    if [ $MAC80211 = "0" ]; then
            PHYDEV="null"
            return
    fi

    if [ -r /sys/class/net/$1/phy80211/name ]; then
            PHYDEV="$(cat /sys/class/net/$1/phy80211/name)"
    fi
    if [ -d /sys/class/net/$1/phy80211/ ] && [ -z "${PHYDEV}" ]; then

            PHYDEV="$(ls -l "/sys/class/net/$1/phy80211" | sed 's/^.*\/\([a-zA-Z0-9_-]*\)$/\1/')"
    fi
}

Without knowing what was in OP /sys/class/net/ it is difficult to be 100% sure but the error almost certainly arose here and is probably related to either the registration of the device or parsing the wireless interface name to generate the monitor interface name ($1) would have been wlx00c0ca846d3mon(?).

The error in registering the device name (and a possible fix?) was identified here.

ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules (if you get a file exist error, delete the file and try again) then reboot

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.