Wireless Utilities
Post

Wireless Utilities

Wireless Utilities

Even though we could still use iwconfig and other tools are deprecated and we shouldn’t use them anymore. The iw utility and its variety of options is the only command we need for configuring a Wi-Fi device.

iw

iw list will provide us with lots of detailed information about the wireless devices and their capabilities such as if the wireless adapter supports monitor mode:

1
2
3
4
5
6
7
8
9
10
11
12
13
kali@kali:~$ sudo iw list
Wiphy phy0
	...
	Supported interface modes:
		 * IBSS
		 * managed
		 * AP
		 * AP/VLAN
		 * monitor
		 * mesh point
		 * P2P-client
		 * P2P-GO
		 * outside context of a BSS

To get a listing of wireless access points that are within range of our wireless card, we will use iw with the dev wlan0 option

1
2
3
kali@kali:~$ sudo iw dev wlan0 scan | grep SSID
	SSID: wifu
	SSID: 6F36E6

Listing wireless access points that are within range of our wireless card:

1
2
3
kali@kali:~$ sudo iw dev wlan0 scan | grep SSID
	SSID: wifu
	SSID: 6F36E6

Listing wireless channel numbers that are within range of our wireless card:

1
2
3
4
5
kali@kali:~$ sudo iw dev wlan0 scan | egrep "DS Parameter set|SSID:"
	SSID: wifu
	DS Parameter set: channel 3
	SSID: 6F36E6
	DS Parameter set: channel 11

iwconfig and other utilities (deprecated)

  • iwlist allows for the initiation of scanning, listing frequencies, bit rates, and encryption keys.
  • iwspy provides per-node link quality (not often implemented by drivers).
  • iwpriv allows for the manipulation of the Wireless Extensions specific to a driver.

To see the channel numbers and corresponding frequencies that our wireless interface is able to detect, we can run iwlist with the interface name followed by the frequency parameter:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
kali@kali:~$ sudo iwlist wlan0 frequency
wlan0     14 channels in total; available frequencies :
          Channel 01 : 2.412 GHz
          Channel 02 : 2.417 GHz
          Channel 03 : 2.422 GHz
          Channel 04 : 2.427 GHz
          Channel 05 : 2.432 GHz
          Channel 06 : 2.437 GHz
          Channel 07 : 2.442 GHz
          Channel 08 : 2.447 GHz
          Channel 09 : 2.452 GHz
          Channel 10 : 2.457 GHz
          Channel 11 : 2.462 GHz
          Channel 12 : 2.467 GHz
          Channel 13 : 2.472 GHz