WiFi Data Capturing on 2 Channels - Beginner Guide

Product: Linux
Commands: airodump-ng, iw

Overview

I do not like to use the airmon-ng command to change the WiFi device name to follow its original device name, which it is hard for me to remember, e.g. device name wlp0s12u1.

So in this post, I will use "iw" utility (previously called iwlist, iwconfig) that bundled with Fedora 41, or RedHat RHEL 9, to configure the WiFi adapter in monitor mode with my preferred device name.  The benefits are:
  • I can define my own device name, e.g. wlan0mon
  • I can use pre-defined device name in script
  • "iw" utility offers more information in the WiFi network adapter as well as LAN NIC
  • USB device detection is more accurate
  • It can shows device name of my USB WiFi dongle without additional typing
  • It can creates additional logical device that other new users like, such as wifi1, capture2024

Procedure

  1. Login to Linux as root, or use one of the following
    1. su -
    2. sudo su -
  2. Find out the physical device ID using "iw dev" command
    1. It will display "phy#<n>"
    2. Under "Interface" line, it will display device name, e.g. wlp0s12u1
    3. Under Interface > type, it will display either managed, or monitor to indicate your WiFi is in AP client mode, or monitor mode
  3. Creates a new logical device wlan0mon and set it to monitor mode.  Assumes the physical device number shown above is phy#9, which means 9
    1. Enter: iw phy phy9 interface add wlan0mon type monitor
    2. You can replace "wlan0mon" with your desire name of the WiFi adapter
  4. If you prefers to change existing WiFi adapter to monitor mode instead of creating a new logical device, then
    1. Enter: iw wlp0s12u1 set type monitor
    2. You can replace "wlp0s12u1" with the device name shown in "iw dev" or "ip link" command
  5. Type "iw dev" again and you will see new device wlan0mon (if you created it) in monitor mode.  Please note that there will be 2 devices (interface) under the same physical device
    1. If you modified existing device, then the output will show 1 device name in monitor mode
  6. Let's say I want to capture SSID "Karate" on 2GHz channel 6, and 5GHz channel 149, and saving the output to capture_Karate_202412
    1. Enter: airodump-ng --channel 6,149 --essid "Karate" --write capture_Karate_202412
    2. The program will start to run and start capturing
    3. You can specify multiple channels by using comma.  However, the program will hops through each of them, and might missed some data.  If you do not want to missed any data, then installs an additional USB WiFi adapter

Comments

Popular posts from this blog

Oracle ORA-0600 on 17090 - When login with wrong password

Windows 10: Converting MBT to GPT+EFI Partition Type

AMD Custom Resolution Setting for BenQ EX3501R Ultra Wide Monitor