Q2-Add SSID IE

  • In this section, you are going to learn

  • How to add multiple SSID IE elements in Probe-Request and Association-Request

#

Version

Ubuntu

Ubuntu 22.04 64 bit

Linux Kernel

6.9.2

Supplicant

wpa_supplicant 2.10

  • Add multiple SSID IE elements in Probe-Request, Association-Request

  • Call flow for add multiple SSID IE elements in Probe-Request

main ()
  wpa_supplicant_add_iface ()
     wpa_supplicant_init_iface ()
	wpa_supplicant_driver_init ()
	    wpa_supplicant_req_scan ()
		wpa_supplicant_scan ()
		    wpa_supplicant_extra_ies ()
			sta_build_multiple_ssid_ie ()
  • Call flow for add multiple SSID IE elements 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 ()
				      construct_vendor_ie ()
					 sta_construct_multiple_ssid_ie ()
  • Download the below patch file

add_multiple_ssid_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_multiple_ssid_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_multiple_ssid_ie_prob_assoc_req.pcapng

  • Check for probe request packet

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

Diagram
  • Click on IEEE 802.11 Wireless Management

  • Click on Tagged parameters

  • Click on Tag: SSID parameter set : Undecoded

Diagram
  • Check for association request packet

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

Diagram
  • Click on IEEE 802.11 Wireless Management

  • Click on Tagged parameters

  • Click on Tag: SSID parameter set : Undecoded

Diagram