Q5-Deauth after auth response

  • In this section, you are going to learn

  • How to send de-authentication packet on reception of authentication 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 Authentication response packet from AP

  • Call flow for send de-authentication packet on reception of Authentication 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_auth
		       drv_deauth
  • Download the below patch file

send_deauth_after_auth_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_auth_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_auth_res.pcapng

  • Check for deauthentication packet

  • Check packet 141 and 142

  • Observe 141 is authentication response packet and 142 is deauthentication packet

Diagram