Q6-Deauth after assoc response

  • In this section, you are going to learn

  • How to send de-authentication packet on reception of association response packet from AP

#

Version

Ubuntu

Ubuntu 22.04 64 bit

Linux Kernel

6.9.2

Supplicant

wpa_supplicant 2.10

Hostapd

hostapd 2.10

  • Send De-Authentication packet on reception of Association response packet from AP

  • Callflow for Send de-authentication packet on reception of association response packet from AP

ieee80211_add_iface
   ieee80211_if_add
       ieee80211_setup_sdata			
	  ieee80211_iface_work
	     ieee80211_iface_process_skb
		ieee80211_sta_rx_queued_mgmt
		   ieee80211_rx_mgmt_assoc_resp
		      drv_deauth 
  • Download the below patch file

send_deauth_after_assoc_res.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 < send_deauth_after_assoc_res.patch
patching file net/mac80211/ieee80211_i.h
patching file net/mac80211/iface.c
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

send_deauth_after_assoc_res.pcapng

  • Check for deauthentication packet

  • Check packet 116 and 117

  • Observe 116 is association response packet and 117 is deauthentication packet

Diagram