Saturday, 28 May 2016

How to enable monitor mode of your wireless Card in Ubuntu

Just Using the below three commands you can turn on enable the monitor mode of your wireless card.
sudo ifconfig wlan0 down
sudo iwconfig wlan0 mode Monitor
sudo ifconfig wlan0 up



This command "sudo iwconfig wlan0 mode monitor"  will throw an error if your wireless card does not support monitor mode.In this case , You can use airmon-ng[Aircrack-ng] to set the mode to monitor mode.Using airmon-ng is as follows.

The link to airmon-ng is here


Airmon-ng

Description

This script can be used to enable monitor mode on wireless interfaces. It may also be used to go back from monitor mode to managed mode. Entering the airmon-ng command without parameters will show the interfaces status.

Usage

usage: airmon-ng <start|stop> <interface> [channel] or airmon-ng <check|check kill>
Where:
  • <start|stop> indicates if you wish to start or stop the interface. (Mandatory)
  • <interface> specifies the interface. (Mandatory)
  • [channel] optionally set the card to a specific channel.
  • <check|check kill> “check” will show any processes that might interfere with the aircrack-ng suite. It is strongly recommended that these processes be eliminated prior to using the aircrack-ng suite. “check kill” will check and kill off processes that might interfere with the aircrack-ng suite. For “check kill” see

Usage Examples

Typical Uses

Check status and/or listing wireless interfaces

~# airmon-ng
PHY Interface Driver  Chipset

phy0 wlan0  ath9k_htc Atheros Communications, Inc. AR9271 802.11n