Q2-Add SSID IE

  • In this section, you are going to learn

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

#

Version

Ubuntu

Ubuntu 22.04 64 bit

Linux Kernel

6.9.2

Supplicant

wpa_supplicant 2.10

Hostapd

hostapd 2.10

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

  • Call flow for add vendor ie in Probe-request

ieee80211_scan ()
   ieee80211_request_scan ()
      __ieee80211_start_scan ()
	 ieee80211_prep_hw_scan ()	
	    ieee80211_build_preq_ies ()
		ieee80211_put_preq_ies ()
		    ieee80211_put_preq_ies_band ()	
		        drv_add_multiple_ssid_ie ()
  • Call flow for add vendor ie in Association-Request

ieee80211_add_iface ()
   ieee80211_if_add ()
      ieee80211_setup_sdata ()
	 ieee80211_iface_work ()
	    ieee80211_sta_work ()
	        ieee80211_do_assoc ()	
		    ieee80211_send_assoc ()
		        drv_add_multiple_ssid_ie ()
  • Download the below patch file

add_multiple_ssid_ie_prob_assoc_req.patch

test:~$ pwd
/home/test/
test:~$ cd linux-6.9.2/
  • Note : Your present working directory should be linux-6.9.2

test:~$ pwd
/home/test/linux-6.9.2/
  • Remove mac80211 module

test:~$ sudo systemctl stop NetworkManager.service

test:~$ sudo rmmod mac80211
  • Run the below command to apply patch

test:~$ sudo patch -p1 < add_multiple_ssid_ie_prob_assoc_req.patch
patching file net/mac80211/link.c
patching file net/mac80211/mac80211.mod.c
patching file net/mac80211/mlme.c
patching file net/mac80211/util.c
  • Compile mac80211 folder

test:~$ sudo make -C . M=net/mac80211/
  • Insert mac80211 module

test:~$ sudo insmod ./net/mac80211/mac80211.ko
  • Download file to check wireshark output

add_multiple_ssid_ie_prob_assoc_req.pcapng

  • Check for probe request packet

  • Click on packet No.70 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.149 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