Q5-Deauth after auth response =========================================== .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Topics in this section, * :ref:`Learnings in this section ` * :ref:`Version Info ` * :ref:`Problem Statement ` * :ref:`Approach and code flow ` * :ref:`Actual change and Patch ` * :ref:`Wireshark capture ` .. _wifi_ldd_wi-fi_dev_driver_ques5_step_1: .. tab-set:: .. tab-item:: Learnings in this section * In this section, you are going to learn .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow * How to send de-authentication packet on reception of authentication response packet from AP .. _wifi_ldd_wi-fi_dev_driver_ques5_step_2: .. tab-set:: .. tab-item:: Version Info =============================== ======================================= # Version =============================== ======================================= Ubuntu Ubuntu 22.04 64 bit Linux Kernel 6.9.2 Supplicant wpa_supplicant 2.10 Hostapd hostapd 2.10 =============================== ======================================= .. _wifi_ldd_wi-fi_dev_driver_ques5_step_3: .. tab-set:: .. tab-item:: Problem Statement .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow * Send De-Authentication packet on reception of Authentication response packet from AP .. _wifi_ldd_wi-fi_dev_driver_ques5_step_4: .. tab-set:: .. tab-item:: Approach and code flow * Call flow for send de-authentication packet on reception of Authentication response packet from AP .. literalinclude:: send_deauth_after_auth_res_callflow.txt .. _wifi_ldd_wi-fi_dev_driver_ques5_step_5: .. tab-set:: .. tab-item:: Actual change and Patch * Download the below patch file :download:`send_deauth_after_auth_res.patch ` .. dropdown:: See the full content of patch file .. literalinclude:: send_deauth_after_auth_res.patch .. code-block:: shell test:~$ pwd /home/test/ * Compile Linux :doc:`../../../../osp/bare_linux/x86-64/secB` * Change directory to linux-6.9.2 .. code-block:: shell test:~$ cd linux-6.9.2/ * Note : Your present working directory should be linux-6.9.2 .. code-block:: shell test:~$ pwd /home/test/linux-6.9.2/ * Remove mac80211 module .. code-block:: shell test:~$ sudo systemctl stop NetworkManager.service test:~$ sudo rmmod mac80211 * Run the below command to apply patch .. code-block:: shell 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 .. code-block:: shell test:~$ sudo make -C . M=net/mac80211/ * Insert mac80211 module .. code-block:: shell test:~$ sudo insmod ./net/mac80211/mac80211.ko .. tab-set:: .. tab-item:: Hardware simulator : run hostapd and supplicant with mac80211_hwsim in open mode :doc:`../../wi-fi_mac80211_hwsim/open_mode/open_mode` .. tab-set:: .. tab-item:: Intel chipset : if your wifi chipset is intel follow below link :doc:`../../wi-fi_chipset/intel_wi-fi_6_AX200/wi-fi_intel_Wi-Fi_6_AX200` .. tab-set:: .. tab-item:: Realtek chipset : if your wifi chipset is realtek follow below link :doc:`../../wi-fi_chipset/realtek_TP-Link_TL-WN722N/wi-fi_realtek_RTL8188EUS` .. tab-set:: .. tab-item:: Netgear chipset : if your wifi chipset is netgear follow below link :doc:`../../wi-fi_chipset/netgear_A6210/wi-fi_netgear_A6210` .. tab-set:: .. tab-item:: Atheros chipset : if your wifi chipset is atheros follow below link :doc:`../../wi-fi_chipset/atheros_AR9271/wi-fi_atheros_AR9271` .. _wifi_ldd_wi-fi_dev_driver_ques5_step_6: .. tab-set:: .. tab-item:: Wireshark capture * Download file to check wireshark output :download:`send_deauth_after_auth_res.pcapng ` .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow * Check for deauthentication packet * Check packet 141 and 142 * Observe 141 is authentication response packet and 142 is deauthentication packet .. image:: send_deauth_after_auth_res_wireshark_image.png :alt: Diagram :width: 800 :height: 400