Send custom 802.11 data frame with ESP8266

Kalzifa
Posts: 1
Joined: Mon Jan 29, 2018 5:50 am

Send custom 802.11 data frame with ESP8266

Postby Kalzifa » Mon Jan 29, 2018 6:03 am

I would like to send raw 802.11 data frames in order to transmit pictures with the ESP8266. I have the Espressif SDK 1.3 and so far I have tried to construct a packet and send it with wifi_send_pkt_freedom(...), but it didn't work. I cannot pick it up with wireshark or airodump-ng on Kali.

here is the code:

Code: Select all

wifi_set_channel(5);

uint8_t packetH[36]={
0x80, 0x00, //Frame Control
0x00, 0x00, //Duration
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //Receiver Address= Destination Address
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //Transmitter Address= Source Address
0x01, 0x02, 0x03, 0x04, 0x05, 0x06, //BSSID
0x00, 0x00,                         //Sequence control
0x01, 0x02, 0x02, 0x03,0x03,0x03,0x04,0x04, //Body
0x05, 0x03, 0x02, 0x01 //FCS
};

wifi_send_pkt_freedom(packetH,sizeof(packetH),0);


For testing I just wanted to send some numbers in the Frame body, but later it should send pictures. The goal is to receive unidirectional video transmittion. One ESP8266 should send and the other one should receive. Both have their wireless card in monitor mode.

My guess is that the packet construction is complete wrong. Can someone help me understand how to "build" a proper packet?

AgentSmithers
Posts: 195
Joined: Sat Apr 01, 2017 1:21 am
Contact:

Re: Send custom 802.11 data frame with ESP8266

Postby AgentSmithers » Thu Feb 01, 2018 8:23 am

Kalzifa wrote:I would like to send raw 802.11 data frames in order to transmit pictures with the ESP8266. I have the Espressif SDK 1.3 and so far I have tried to construct a packet and send it with wifi_send_pkt_freedom(...), but it didn't work. I cannot pick it up with wireshark or airodump-ng on Kali.

here is the code:

Code: Select all

wifi_set_channel(5);

uint8_t packetH[36]={
0x80, 0x00, //Frame Control
0x00, 0x00, //Duration
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //Receiver Address= Destination Address
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //Transmitter Address= Source Address
0x01, 0x02, 0x03, 0x04, 0x05, 0x06, //BSSID
0x00, 0x00,                         //Sequence control
0x01, 0x02, 0x02, 0x03,0x03,0x03,0x04,0x04, //Body
0x05, 0x03, 0x02, 0x01 //FCS
};

wifi_send_pkt_freedom(packetH,sizeof(packetH),0);


For testing I just wanted to send some numbers in the Frame body, but later it should send pictures. The goal is to receive unidirectional video transmittion. One ESP8266 should send and the other one should receive. Both have their wireless card in monitor mode.

My guess is that the packet construction is complete wrong. Can someone help me understand how to "build" a proper packet?


I don't know the frame off the top of my head but if you have a Linux box you can Wireshark it in Monitor mode to see the actual 802.11. This is on my list to do as well in the next week. If you get it figured out post back here and I'll make it a point to circle around with what I have as well.
Thanks Kalzifa.

Who is online

Users browsing this forum: No registered users and 117 guests