• Stars
    star
    432
  • Rank 100,650 (Top 2 %)
  • Language
    C
  • Created over 7 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Send arbitrary IEEE 802.11 frames with Espressif's ESP32

ESP32 802.11 Freedom Output

Rickrolling with WiFi Networks

IMPORTANT NOTE

This project is now obsolete, please use esp32-80211-tx instead. esp32-80211-tx makes use of Espressif's esp_wifi_80211_tx API and is compatible with the latest esp-idf version.

I'm still keeping this repository up since some niche use cases might not be compatible with the new esp_wifi_80211_tx API and because lots of sites link to this page. If you still want to use esp32free80211, please be advised that this project is currently incompatible with the latest version of esp32-wifi-lib. In order to get this working, you will need to downgrade to an older version, tested with esp32-wifi-lib git commit ffe5a4c14fe9c933c776fadc62fa9d409929e6f9.

Introduction

Even though Espressif open sourced their IoT Development Framework, the underlying esp32-wifi-lib remains closed source and sparsely documented. Since I still wanted to be able to send arbitrary IEEE 802.11 data frames, I took a look at the ieee80211_freedom_output function in ieee80211_output.o in libnet80211.a. By reverse engineering the assembly code I was able to find a workaround / hack that makes it possible to use ieee80211_freedom_output and force the ESP32 to send data or management frames with custom data.

This functionality can be useful in various ways, e.g. for mesh networking, unidirectional long-distance communication or low-overhead data transmission. It can, however, be abused for spamming large numbers of invalid SSIDs, jamming WiFi networks or sending deauthentication frames in order to sniff SSIDs of hidden wireless networks. Please be advised that such usage is morally doubtful at best and illegal at worst. Use this at your own risk.

Project Description

In order to demonstrate the freedom output functionality, this software broadcasts the infamous lines from Rick Astley's Never gonna give you up. This is achieved by manually assembling IEEE 802.11 beacon frames in main.c and broadcasting them via the hidden ieee80211_freedom_output function in espressif's WiFi stack.

If you want to use raw packet sending functionality in your own project, just copy the components/free80211 component. The only function it exposes is the following:

// buffer: Raw IEEE 802.11 packet to send, will be sent as-is, apart from bytes 24 - 31 which will be set to 0x00 in case buffer[0] is 0x80.
// len: Length of IEEE 802.11 packet. Must be larger than 23 and smaller than or equal 0x578.
int8_t free80211_send(uint8_t *buffer, uint16_t len);

Compile / Flash

This project uses the Espressif IoT Development Framework. With the ESP-IDF installed, execute

make menuconfig

and configure the SDK to use your preferred settings (baudrate, python2 executable, serial flasher port, …) and proceed to compile and flash this project using

make flash

Project License: MIT

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

More Repositories

1

bluefluff

Reverse Engineering Furby Connect's Bluetooth Protocol and Update Format
JavaScript
409
star
2

esp32-80211-tx

Send arbitrary IEEE 802.11 frames with Espressif's ESP32
C
380
star
3

esp8266-smartwatch

ESP8266 DIY WiFi Smartwatch with MPU-9250, RTC, OLED, FT232, ...
C
213
star
4

spheretest

Technical Demo - Minetest on a spherical world
C++
156
star
5

gtkterm

GTKTerm: A GTK+ Serial Port Terminal
C
79
star
6

esp32-softap-ota

Minimal esp-idf example of HTTP portal to perform OTA updates of ESP32 in SoftAP mode
C
37
star
7

esp8266-light-alarmclock

Alarm clock based on ESP8266 that dims the room light to wake you up
C
37
star
8

ESP8266-WS2811-LEDs

ESP8266 driver for WS2811 LED Strips
KiCad Layout
34
star
9

QRScanJS

QR-Code scanner library for JavaScript, based on ZBar
JavaScript
26
star
10

librenard

Reverse Engineered Sigfox Stack - Library
C
20
star
11

renard-phy

Open Sigfox Stack Reference Implementation - Physical Layer for SDR
Python
17
star
12

planether

A pseudorealistic 3d space simulation game written in C++
C++
17
star
13

espterm

GTK Serial Port Terminal for ESP8266 WiFi SoC Development
Vala
15
star
14

renard-spec

Open Sigfox Stack - Specifications
TeX
14
star
15

esp32-lyrat-passthrough

Example for ESP32-LyraT: Passthrough Digital Audio over I²S, Baseline for Realtime DSP Applications
C
11
star
16

esp8266-povslinger

Persistence of vision display using ESP8266 and APA102-2020
C
9
star
17

WS2811LEDMatrix

WS2811 LED Matrix Controller Board, Firmware and Client Applications
KiCad Layout
7
star
18

alexa-power-button

Use an Amazon Dash Button or an Alexa Voice Command instead of your computer's power button
JavaScript
6
star
19

mansonnode

Web Frontend for Manson HCS Power Supplies written in node.js
JavaScript
5
star
20

huhnix

Automatic chicken door system with AVR, DCF77 time signal receiver and ESP8266 WiFi module
C
4
star
21

minetest-modding-tutorial

CSS
4
star
22

keplerslaws

A demonstration for Johannes Kepler's laws of planetary motion by Tobias Kramer (1999)
C++
3
star
23

mesecons.net

The source for the website mesecons.net
HTML
3
star
24

createarchusb

Scripts for creating persistent bootable Archlinux installations on USB drives
Shell
3
star
25

renard-phy-s2lp

Open Sigfox Stack Reference Implementation - Cross-Platform PHY Layer for STMicroelectronics S2-LP
C
3
star
26

renard-phy-s2lp-demo-esp32

Open Sigfox Stack Reference Implementation for S2-LP - Demo Application for Espressif's ESP32
C
3
star
27

renard-phy-s2lp-hal-esp32

Open Sigfox Stack Reference Implementation for S2-LP - Hardware Abstraction Layer for Espressif's ESP32
C
3
star
28

renard

Open Sigfox Stack Reference Implementation - Command Line Interface
C
3
star
29

schulealsstaat

Server, client and network components of currency and presence management platform for "Schule als EU" (school as EU) 2015, HöGy Nürtingen, using Archlinux, node.js, nodewebkit, ...
JavaScript
3
star
30

mesecons-extension-temperest

Temperest extension for the mesecons mod
Lua
2
star
31

jymcu-3208-lernkit

Lernkit mit minimaler Firmware für die LED Matrix JY-MCU 3208 mit dem HT1632c
C++
2
star
32

renard-phy-s2lp-demo-ht32sx

Open Sigfox Stack Reference Implementation for S2-LP - Demo Application for HT Micron HT32SX
C
2
star
33

mesecons-extension-22microcontroller

2x2 (8 output) microcontroller exensions for the mesecons mod in minetest
1
star
34

ldjam45-bonsai-life

Ludum Dare 45 Game Jam Entry: Bonsai Life
JavaScript
1
star
35

minetest-mod-throwing

Throwing (Bow and Arrow) mod for minetest-c55
1
star
36

jymcu_sdcard

AVR ATMega644 shell that allows interfacing SD Cards in the JY-MCU SD Card module
C
1
star
37

pollinspiel-lernkit

Lernkit für das Pollin Spiel I von pollin.de für Programmieranfänger
C
1
star