The command airmon-ng autodetects which wireless card you have and run the right commands.
A common problem in Kali Linux VM is when you run the airmon-ng command, it returns a blank list:
No wireless adapter is detected! There is nothing wrong with your installation of VMWare or VM. So, if you encounter this problem, do not waste time on the VMWare network settings. It can be NAT or Bridged, does not matter. The default network interface you see in the VM is a virtual Ethernet interface, which is connected to the physical wireless adapter over a bridge. However, the VM has no control of or the visibility to the physical wireless adapter. Hence, airmon-ng does not return anything. There is nothing you can do to bring those network adapters appear when you run the airmon-ng command.
Nevertheless, a VM within VMWare is able to gain control of a USB wireless adapter and be put into monitor mode. You need to install the adapter driver into the Kali Linux VM, though, and make sure the adapter is supported by Kali Linux. In this case, please follow the hardware installation guide supplied by the vendor, which is not covered here.
If you have an adapter that only has Windows drivers, make sure the driver is supported by ndiswrapper (please google by yourself). Kali Linux is not bundled with ndiswrapper, therefore, you have to install ndiswrapper first. Then, use ndiswrapper to install the windows drivers into Kali Linux.
Installing ndiswrapper into Kali Linux
First, download ndiswrapper from sourceforge.net. The file name is somthing like ndiswrapper-1.59.tar.gz.
After the download, unzip it:
root@kali: tar -xzf ndiswrapper-1.59.tar.gz
Then, change directory to the unzipped folder, build and install.
root@kali:~/Desktop/ndiswrapper-1.59# make
..
.. (compiling messages)
..
root@kali:~/Desktop/ndiswrapper-1.59# make install
..
.. (installing messages)
..
This above runs smoothly in Backtrack, but not for Kali Linux. The typical error you may encounter is as below:
root@kali:~/ndiswrapper-1.59# make
make -C utils
make[1]: Entering directory `/root/ndiswrapper-1.59/utils'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/root/ndiswrapper-1.59/utils'
make -C driver
make[1]: Entering directory `/root/ndiswrapper-1.59/driver'
make -C /usr/src/linux-headers-3.14-kali1-amd64 M=/root/ndiswrapper-1.59/driver
make[2]: Entering directory `/usr/src/linux-headers-3.14-kali1-amd64'
CC [M] /root/ndiswrapper-1.59/driver/crt.o
/root/ndiswrapper-1.59/driver/crt.c: In function ‘_win_srand’:
/root/ndiswrapper-1.59/driver/crt.c:470:2: error: implicit declaration of function ‘net_srandom’ [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[5]: *** [/root/ndiswrapper-1.59/driver/crt.o] Error 1
make[4]: *** [_module_/root/ndiswrapper-1.59/driver] Error 2
make[3]: *** [sub-make] Error 2
make[2]: *** [all] Error 2
make[2]: Leaving directory `/usr/src/linux-headers-3.14-kali1-amd64'
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/root/ndiswrapper-1.59/driver'
make: *** [driver] Error 2
Fortunately, there is a patched ndiswrapper in GitHub:
https://github.com/Schwartz/ndiswrapper-patched-3.14/
Download the zip file, unzip and overwrite the original ndiswrapper folder, then run "make" and "make install" again. It should work as below:
root@kali:~/Desktop/ndiswrapper-1.59# make
make -C utils
make[1]: Entering directory `/root/Desktop/ndiswrapper-1.59/utils'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/root/Desktop/ndiswrapper-1.59/utils'
make -C driver
make[1]: Entering directory `/root/Desktop/ndiswrapper-1.59/driver'
make -C /usr/src/linux-headers-3.14-kali1-amd64 M=/root/Desktop/ndiswrapper-1.59/driver
make[2]: Entering directory `/usr/src/linux-headers-3.14-kali1-amd64'
CC [M] /root/Desktop/ndiswrapper-1.59/driver/crt.o
CC [M] /root/Desktop/ndiswrapper-1.59/driver/hal.o
CC [M] /root/Desktop/ndiswrapper-1.59/driver/iw_ndis.o
CC [M] /root/Desktop/ndiswrapper-1.59/driver/loader.o
CC [M] /root/Desktop/ndiswrapper-1.59/driver/ndis.o
CC [M] /root/Desktop/ndiswrapper-1.59/driver/ntoskernel.o
CC [M] /root/Desktop/ndiswrapper-1.59/driver/ntoskernel_io.o
CC [M] /root/Desktop/ndiswrapper-1.59/driver/pe_linker.o
CC [M] /root/Desktop/ndiswrapper-1.59/driver/pnp.o
CC [M] /root/Desktop/ndiswrapper-1.59/driver/proc.o
CC [M] /root/Desktop/ndiswrapper-1.59/driver/rtl.o
CC [M] /root/Desktop/ndiswrapper-1.59/driver/wrapmem.o
CC [M] /root/Desktop/ndiswrapper-1.59/driver/wrapndis.o
CC [M] /root/Desktop/ndiswrapper-1.59/driver/wrapper.o
CC [M] /root/Desktop/ndiswrapper-1.59/driver/usb.o
AS [M] /root/Desktop/ndiswrapper-1.59/driver/win2lin_stubs.o
AS [M] /root/Desktop/ndiswrapper-1.59/driver/lin2win.o
LD [M] /root/Desktop/ndiswrapper-1.59/driver/ndiswrapper.o
Building modules, stage 2.
MODPOST 1 modules
CC /root/Desktop/ndiswrapper-1.59/driver/ndiswrapper.mod.o
LD [M] /root/Desktop/ndiswrapper-1.59/driver/ndiswrapper.ko
make[2]: Leaving directory `/usr/src/linux-headers-3.14-kali1-amd64'
make[1]: Leaving directory `/root/Desktop/ndiswrapper-1.59/driver'
root@kali:~/Desktop/ndiswrapper-1.59# make install
make -C driver install
make[1]: Entering directory `/root/Desktop/ndiswrapper-1.59/driver'
mkdir -p -m 755 /lib/modules/3.14-kali1-amd64/misc
install -m 0644 ndiswrapper.ko /lib/modules/3.14-kali1-amd64/misc
/sbin/depmod -a 3.14-kali1-amd64
make[1]: Leaving directory `/root/Desktop/ndiswrapper-1.59/driver'
make -C utils install
make[1]: Entering directory `/root/Desktop/ndiswrapper-1.59/utils'
mkdir -p -m 755 /sbin
mkdir -p -m 755 /usr/sbin
install -m 755 loadndisdriver /sbin
install -m 755 ndiswrapper /usr/sbin
install -m 755 ndiswrapper-buginfo /usr/sbin
make[1]: Leaving directory `/root/Desktop/ndiswrapper-1.59/utils'
mkdir -p -m 755 /usr/share/man/man8
install -m 644 ndiswrapper.8 /usr/share/man/man8
install -m 644 loadndisdriver.8 /usr/share/man/man8
Finally, install the driver:
Copy the windows driver to a folder in Kali Linux.
Change directory to the driver folder, then:
root@kali:~/Desktop# cd Vista64
root@kali:~/Desktop/Vista64# ls
athrxusbext.cat athrxusb.sys netathrxusb.inf
root@kali:~/Desktop/Vista64# ndiswrapper -i netathrxusb.inf
installing netathrxusb ...
root@kali:~/Desktop/Vista64#
Done! airmon-ng command should now detects the network card.
You can now put the USB wireless adapter in monitor mode by running the commands:
root@kali:airmon-ng stop wlan0
root@kali:airodump-ng wlan0
A common problem in Kali Linux VM is when you run the airmon-ng command, it returns a blank list:
root@kali:~# airmon-ng
Interface Chipset Driver
No wireless adapter is detected! There is nothing wrong with your installation of VMWare or VM. So, if you encounter this problem, do not waste time on the VMWare network settings. It can be NAT or Bridged, does not matter. The default network interface you see in the VM is a virtual Ethernet interface, which is connected to the physical wireless adapter over a bridge. However, the VM has no control of or the visibility to the physical wireless adapter. Hence, airmon-ng does not return anything. There is nothing you can do to bring those network adapters appear when you run the airmon-ng command.
Nevertheless, a VM within VMWare is able to gain control of a USB wireless adapter and be put into monitor mode. You need to install the adapter driver into the Kali Linux VM, though, and make sure the adapter is supported by Kali Linux. In this case, please follow the hardware installation guide supplied by the vendor, which is not covered here.
If you have an adapter that only has Windows drivers, make sure the driver is supported by ndiswrapper (please google by yourself). Kali Linux is not bundled with ndiswrapper, therefore, you have to install ndiswrapper first. Then, use ndiswrapper to install the windows drivers into Kali Linux.
Installing ndiswrapper into Kali Linux
First, download ndiswrapper from sourceforge.net. The file name is somthing like ndiswrapper-1.59.tar.gz.
After the download, unzip it:
root@kali: tar -xzf ndiswrapper-1.59.tar.gz
Then, change directory to the unzipped folder, build and install.
..
.. (compiling messages)
..
root@kali:~/Desktop/ndiswrapper-1.59# make install
..
.. (installing messages)
..
This above runs smoothly in Backtrack, but not for Kali Linux. The typical error you may encounter is as below:
make -C utils
make[1]: Entering directory `/root/ndiswrapper-1.59/utils'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/root/ndiswrapper-1.59/utils'
make -C driver
make[1]: Entering directory `/root/ndiswrapper-1.59/driver'
make -C /usr/src/linux-headers-3.14-kali1-amd64 M=/root/ndiswrapper-1.59/driver
make[2]: Entering directory `/usr/src/linux-headers-3.14-kali1-amd64'
CC [M] /root/ndiswrapper-1.59/driver/crt.o
/root/ndiswrapper-1.59/driver/crt.c: In function ‘_win_srand’:
/root/ndiswrapper-1.59/driver/crt.c:470:2: error: implicit declaration of function ‘net_srandom’ [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[5]: *** [/root/ndiswrapper-1.59/driver/crt.o] Error 1
make[4]: *** [_module_/root/ndiswrapper-1.59/driver] Error 2
make[3]: *** [sub-make] Error 2
make[2]: *** [all] Error 2
make[2]: Leaving directory `/usr/src/linux-headers-3.14-kali1-amd64'
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/root/ndiswrapper-1.59/driver'
make: *** [driver] Error 2
Fortunately, there is a patched ndiswrapper in GitHub:
https://github.com/Schwartz/ndiswrapper-patched-3.14/
Download the zip file, unzip and overwrite the original ndiswrapper folder, then run "make" and "make install" again. It should work as below:
make -C utils
make[1]: Entering directory `/root/Desktop/ndiswrapper-1.59/utils'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/root/Desktop/ndiswrapper-1.59/utils'
make -C driver
make[1]: Entering directory `/root/Desktop/ndiswrapper-1.59/driver'
make -C /usr/src/linux-headers-3.14-kali1-amd64 M=/root/Desktop/ndiswrapper-1.59/driver
make[2]: Entering directory `/usr/src/linux-headers-3.14-kali1-amd64'
CC [M] /root/Desktop/ndiswrapper-1.59/driver/crt.o
CC [M] /root/Desktop/ndiswrapper-1.59/driver/hal.o
CC [M] /root/Desktop/ndiswrapper-1.59/driver/iw_ndis.o
CC [M] /root/Desktop/ndiswrapper-1.59/driver/loader.o
CC [M] /root/Desktop/ndiswrapper-1.59/driver/ndis.o
CC [M] /root/Desktop/ndiswrapper-1.59/driver/ntoskernel.o
CC [M] /root/Desktop/ndiswrapper-1.59/driver/ntoskernel_io.o
CC [M] /root/Desktop/ndiswrapper-1.59/driver/pe_linker.o
CC [M] /root/Desktop/ndiswrapper-1.59/driver/pnp.o
CC [M] /root/Desktop/ndiswrapper-1.59/driver/proc.o
CC [M] /root/Desktop/ndiswrapper-1.59/driver/rtl.o
CC [M] /root/Desktop/ndiswrapper-1.59/driver/wrapmem.o
CC [M] /root/Desktop/ndiswrapper-1.59/driver/wrapndis.o
CC [M] /root/Desktop/ndiswrapper-1.59/driver/wrapper.o
CC [M] /root/Desktop/ndiswrapper-1.59/driver/usb.o
AS [M] /root/Desktop/ndiswrapper-1.59/driver/win2lin_stubs.o
AS [M] /root/Desktop/ndiswrapper-1.59/driver/lin2win.o
LD [M] /root/Desktop/ndiswrapper-1.59/driver/ndiswrapper.o
Building modules, stage 2.
MODPOST 1 modules
CC /root/Desktop/ndiswrapper-1.59/driver/ndiswrapper.mod.o
LD [M] /root/Desktop/ndiswrapper-1.59/driver/ndiswrapper.ko
make[2]: Leaving directory `/usr/src/linux-headers-3.14-kali1-amd64'
make[1]: Leaving directory `/root/Desktop/ndiswrapper-1.59/driver'
root@kali:~/Desktop/ndiswrapper-1.59# make install
make -C driver install
make[1]: Entering directory `/root/Desktop/ndiswrapper-1.59/driver'
mkdir -p -m 755 /lib/modules/3.14-kali1-amd64/misc
install -m 0644 ndiswrapper.ko /lib/modules/3.14-kali1-amd64/misc
/sbin/depmod -a 3.14-kali1-amd64
make[1]: Leaving directory `/root/Desktop/ndiswrapper-1.59/driver'
make -C utils install
make[1]: Entering directory `/root/Desktop/ndiswrapper-1.59/utils'
mkdir -p -m 755 /sbin
mkdir -p -m 755 /usr/sbin
install -m 755 loadndisdriver /sbin
install -m 755 ndiswrapper /usr/sbin
install -m 755 ndiswrapper-buginfo /usr/sbin
make[1]: Leaving directory `/root/Desktop/ndiswrapper-1.59/utils'
mkdir -p -m 755 /usr/share/man/man8
install -m 644 ndiswrapper.8 /usr/share/man/man8
install -m 644 loadndisdriver.8 /usr/share/man/man8
Finally, install the driver:
Copy the windows driver to a folder in Kali Linux.
Change directory to the driver folder, then:
root@kali:~/Desktop/Vista64# ls
athrxusbext.cat athrxusb.sys netathrxusb.inf
root@kali:~/Desktop/Vista64# ndiswrapper -i netathrxusb.inf
installing netathrxusb ...
root@kali:~/Desktop/Vista64#
Done! airmon-ng command should now detects the network card.
You can now put the USB wireless adapter in monitor mode by running the commands:
root@kali:airodump-ng wlan0
No comments:
Post a Comment