Режим монитора wifi ubuntu

Three ways to set wireless interface to Monitor mode and Managed mode

You can use the following command to set wireless interface to Monitor mode and Managed mode on any Linux distro. The only requirement is availability wireless adapter that supports monitor mode. This one is recommended.

1. How to enable monitor mode using iw

You should check whether the operating system is able to recognize your Wi-Fi card. In addition, you need to know the name of the wireless interface.

Get to know the wireless interface name:

phy#0 Interface wlan0 ifindex 3 wdev 0x1 addr 3a:c9:39:0d:fc:1a type managed txpower 20.00 dBm

As you can see, the name of my wireless interface is wlan0. In addition, you can see that it is in managed mode.

To set wireless interface to Monitor mode with iw you can use the following command sequence:

sudo ip link set IFACE down sudo iw IFACE set monitor control sudo ip link set IFACE up

Where IFACE replace with actual name of your wireless interface. In may example:

sudo ip link set wlan0 down sudo iw wlan0 set monitor control sudo ip link set wlan0 up

Then check the status of you wireless interface one more time:

sudo iw dev phy#0 Interface wlan0 ifindex 3 wdev 0x1 addr 16:30:78:80:a3:26 type monitor channel 1 (2412 MHz), width: 20 MHz (no HT), center1: 2412 MHz txpower 20.00 dBm

As you can see, now type monitor. Note: the name of interface is not changed by this method.

Читайте также:  Venta lw60t wi fi

To return wireless interface in Managed mode with iw you can use the following command sequence:

sudo ip link set IFACE down sudo iw IFACE set type managed sudo ip link set IFACE up

Where IFACE replace with actual name of your wireless interface. In may example:

sudo ip link set wlan0 down sudo iw wlan0 set type managed sudo ip link set wlan0 up

2. How to enable monitor mode using Airmon-ng

Again, we should get information about our wireless interface:

PHY Interface Driver Chipset phy0 wlan0 rt2800usb Ralink Technology, Corp. RT3572

The name of interface is wlan0.

Checking for interfering processes

Before putting a card into monitor mode, it will automatically check for interfering processes. It can also be done manually by running the following command:

This command stops network managers then kill interfering processes left:

At last, we start monitor mode:

sudo airmon-ng start wlan0 PHY Interface Driver Chipset phy0 wlan0 rt2800usb Ralink Technology, Corp. RT3572 (mac80211 monitor mode vif enabled for [phy0]wlan0 on [phy0]wlan0mon) (mac80211 station mode vif disabled for [phy0]wlan0)

As you can see, it created a monitor mode interface called wlan0mon.

sudo iwconfig wlan0mon IEEE 802.11 Mode:Monitor Frequency:2.457 GHz Tx-Power=20 dBm Retry short limit:7 RTS thr:off Fragment thr:off Power Management:off lo no wireless extensions. eth0 no wireless extensions.

Disable monitor mode

sudo airmon-ng stop wlan0mon PHY Interface Driver Chipset phy0 wlan0mon rt2800usb Ralink Technology, Corp. RT3572 (mac80211 station mode vif enabled on [phy0]wlan0) (mac80211 monitor mode vif disabled for [phy0]wlan0mon)

Don’t forget to restart the Network Manager. It is usually done with the following command:

sudo systemctl start NetworkManager

3. How to enable monitor mode using iwconfig

As usual, start from checking interface name:

sudo iwconfig lo no wireless extensions. eth0 no wireless extensions. wlan0 IEEE 802.11 ESSID:off/any Mode:Managed Access Point: Not-Associated Tx-Power=20 dBm Retry short limit:7 RTS thr:off Fragment thr:off Encryption key:off Power Management:off

The network interface with wireless extension is called wlan0.

sudo ifconfig IFACE down sudo iwconfig IFACE mode monitor sudo ifconfig IFACE up
sudo ifconfig wlan0 down sudo iwconfig wlan0 mode monitor sudo ifconfig wlan0 up

Disable monitor mode:

sudo ifconfig wlan0 down sudo iwconfig wlan0 mode managed sudo ifconfig wlan0 up

NetworkManager prevents monitor mode

If NetworkManager restarts automatically after each kill, and it pretends monitor mode, you can stop it manually:

Читайте также:  Объединить ноутбуки через wifi

In Kali Linux, BlackArch, Ubuntu, Linux Mint:

sudo systemctl stop NetworkManager

Note: when you stop NetworkManager, your Internet access disappears!

Источник

How to enable monitor mode on wlan interface

You would need to have a computer running a flavour of linux and have a WiFi card (chipset) that supports monitor mode.

Prerequisites

  • TP-Link Archer T9UH v2.0
  • Linux parrot 5.2.0-2parrot1-amd64 SMP Debian 5.2.9-2parrot1 (2019-08-25) x86_64 GNU/Linux

Does your card support monitoring mode?

Look after monitor under Supported interface modes: :

┌─[black@mamba]─[/etc] └──╼ $iw list | more (. ) Wiphy phy1 (. ) Supported interface modes: * IBSS * managed * AP * monitor 

But which wlan interface is phy1 ? Use iw dev :

┌─[black@mamba]─[/etc] └──╼ $iw dev phy#1 Interface wlan1 ifindex 5 wdev 0x3 addr type managed 
┌─[black@mamba]─[/etc] └──╼ $sudo airmon-ng PHY Interface Driver Chipset phy0 wlan0 iwlwifi Intel Corporation Centrino Ultimate-N 6300 (rev 3e) phy1 wlan1 88XXau TP-Link 802.11ac NIC 

Our phy1 interface is wlan1 . Smooth sailing.

nmcli

┌─[✗]─[black@mamba]─[/etc] └──╼ $nmcli device wifi 

airodump-ng

┌─[✗]─[black@mamba]─[/etc] └──╼ $sudo airmon-ng start wlan1 
┌─[black@mamba]─[/etc] └──╼ $iw dev phy#1 Interface wlan1 ifindex 5 wdev 0x3 addr type monitor 
┌─[✗]─[black@mamba]─[/etc] └──╼ $sudo airodump-ng wlan1mon 

Come back

┌─[✗]─[black@mamba]─[/etc] └──╼ $sudo airmon-ng stop wlan0mon ┌─[✗]─[black@mamba]─[/etc] └──╼ $sudo service network-manager restart ┌─[✗]─[black@mamba]─[/etc] └──╼ $sudo service wpa_supplicant restart 

Authors

Acknowledgments

Источник

Оцените статью
Adblock
detector