Q1-Add vendor IE

  • In this section, you are going to learn

  • How to add vendor IE in Probe-Request and Association-Request similar to SSID IE

#

Version

Ubuntu

Ubuntu 22.04 64 bit

Linux Kernel

6.9.2

Supplicant

wpa_supplicant 2.10

  • Add vendor IE in Probe-Request and Association-Request similar to SSID IE

  • Call flow for add vendor ie in Probe-request

  • Call flow for add vendor ie in Association-Request

nl80211_global_init ()
   wpa_driver_nl80211_init_nl_global ()
      process_global_event ()
	 do_process_drv_event ()
	    send_scan_event ()
	       process_global_event ()
		  do_process_drv_event ()
		     mlme_event ()
			mlme_event_auth ()
			   wpa_supplicant_event ()
			       sme_event_auth ()
				  sme_associate ()
				      sta_construct_vendor_ie ()

  • Download the below patch file

add_vendor_ie_prob_assoc_req.patch

test:~$ pwd
/home/test
  • Make sure internet is available in laptop to download supplicant package

test:~$ sudo wget https://w1.fi/releases/wpa_supplicant-2.10.tar.gz
  • Create a directory

test:~$ mkdir supplicant
  • Change directory to supplicant

test:~$ cd supplicant
  • Note : Your present working directory should be supplicant

test:~$ pwd
/home/test/supplicant/
  • Extract wpa_supplicant

test:~$ sudo tar -xvf ~/wpa_supplicant-2.10.tar.gz
  • Run the below command to apply patch

test:~$ patch -p1 < add_vendor_ie_prob_assoc_req.patch
patching file wpa_supplicant-2.10/wpa_supplicant/scan.c
patching file wpa_supplicant-2.10/wpa_supplicant/sme.c
  • Change directory to wpa_supplicant

test:~$ cd wpa_supplicant-2.10/wpa_supplicant/
  • Check the current working directory using pwd command

  • Make sure your current working directory is wpa_supplicant

test:~$ pwd
/home/test/supplicant/wpa_supplicant-2.10/wpa_supplicant
  • Copy the contents of defconfig file to .config file

test:~$ sudo cp defconfig .config
  • Compile wpa_supplicant

test:~$ sudo make
  • Create run_supplicant.conf

test:~$ sudo vim ./run_supplicant.conf

ctrl_interface=/run/wpa_supplicant
update_config=1

network={
ssid="test_open"
key_mgmt=NONE
}
  • Run wpa_supplicant

test:~$ sudo ./wpa_supplicant -Dnl80211 -i wlan1 -c ./run_supplicant.conf
  • Download file to check wireshark output

add_vendor_ie_prob_assoc_req.pcapng

  • Check for probe request packet

  • Click on packet No.97 as shown in the image below

Diagram
  • Click on IEEE 802.11 Wireless Management

  • Click on Tagged parameters

  • Click on Tag: Vendor Specific: Wi-Fi Alliance: Unknown

Diagram
  • Check for association request packet

  • Click on packet No.135 as shown in the image below

Diagram
  • Click on IEEE 802.11 Wireless Management

  • Click on Tagged parameters

  • Click on Tag: Vendor Specific: Wi-Fi Alliance: Unknown

Diagram