WiFi monitor mode and commands to enforce monitor mode in Linux / Ubuntu

Monitor mode, or RFMON (Radio Frequency MONitor) mode, allows a computer with a wireless network interface controller (WNIC) to monitor all traffic received from the wireless network. Monitor mode allows packets to be captured without having to associate with an access point or ad hoc network first. Monitor mode is one of the eight modes that 802.11 wireless cards can operate in: Master (acting as an access point), Managed (client, also known as station), Ad hoc, Repeater, Mesh, Wi-Fi Direct, TDLS and Monitor mode.

Below commands, just shows the details of our access point to which we are connected.

 $ iwconfig wlan0 

wlan0 IEEE 802.11abg ESSID:”virus4all”
Mode:Managed Frequency:2.462 GHz Access Point: 64:70:02:E1:2C:16
Retry short limit:7 RTS thr:off Fragment thr:off
Power Management:on

Linux command to check if monitor mode is enabled or not ?

Not every platform supports monitor mode, hence to check if our platform supports monitor mode, first enter below command,

 $ iw list 

If you can see “monitor” in “Supported interface modes:” along with “IBSS” and “managed” then, we can be sure that our platform supports monitor mode and we will be able to capture all the packets from the network. If you do not see “monitor” in “Supported interface modes:” that means platform doesn’t support monitor mode, and if we forcefully tries to put it to monitor mode, we will get an error as,

 $ sudo iwconfig wlan0 mode monitor 

Error for wireless request “Set Mode” (8B06) :
SET failed on device wlan0 ; Operation not supported.

Now, once we are sure that our platform supports monitor mode, type below commands,

 $ sudo ifconfig wlan0 down 
 $ sudo iwconfig wlan0 mode monitor 
 $ sudo ifconfig wlan0 up 
 $ iwconfig wlan0 
Android Android Commands Android Java Applications Application Libraries Bash / Shell Scripts Bluetooth driver Build Frameworks Commands and Packages Core Kernel C Programs Development Environment Setup Documents / Books Errors & Failures File Systems Framebuffer / Display Driver git Go Language Programs Hardware Platforms Home Kernel & Device Drivers Kernel Booting and Porting Linux, OS Concepts and Networking Linux Device Drivers Linux Host, Ubuntu, SysAdmin Linux Kernel Linux Networking Middleware Libraries, HAL NDK / Middleware / HAL Network Driver OS Concepts PHP Procfs Filesystem Programming Languages RaspberryPi Scripting and Automation Search Engine Optimisation ( SEO ) Social Media Socurce Code Management ( SCM ) System Administration, Security Testing and Debugging Uncategorized Userspace Utilities Web design and development Wordpress Yocto / Bitbake / Openembedded

Leave a Reply