BLEDuck
BLEDuck copied to clipboard
A BLE-controlled USB Rubber Ducky clone built with ESP32-S3 boards.
🦆BLEDuck
A BLE-controlled USB Rubber Ducky clone built with ESP32-S3 boards.
✨Features
- Minimal Setup.
- Simply controlled by Serial Bluetooth Terminal App.
- Execute payloads by just sending numbers.
- Store payloads in folder for better management.
- Hide / Unhide mass storage device to work in stealth.
- Manual control for advertisment of device.
📋List of ESP32S3 boards
- These boards supports native
BLEandHID. - It also supports
combined.binfile to make board into CircuitPython board.
- YD-ESP32-S3 N16R8 By VCC-GND Studio
- MatrixPortal S3 By Adafruit
- ESP32-S3-DevKitC-1-N8 By Espressif
- Waveshare ESP32-S3-Zero By Waveshare
- ESP32-S3 Reverse TFT Feather By Adafruit
- Feather ESP32-S3 4MB Flash 2MB PSRAM By Adafruit
- Seeed Studio XIAO ESP32S3 Sense By Seeed Studio
- Adafruit QT Py ESP32-S3 4MB Flash/2MB PSRAM By Adafruit
- M5Stack CardPuter - M5StampS3 powered mini computer By M5Stack
- T-Dongle S3 By LILYGO
- ESP32-S3-DevKitC-1-N16 By Espressif
- Adafruit QT Py ESP32-S3 8MB Flash No PSRAM By Adafruit
- Qualia ESP32-S3 for TTL RGB-666 Displays By Adafruit
- Feather ESP32-S3 TFT PSRAM By Adafruit
- Feather ESP32-S3 8MB Flash No PSRAM By Adafruit
- T-Display S3 By LILYGO
- ESP32S3-TOUCH-LCD-2 By Waveshare
- ESP32-S3-DevKitC-1-N8R8 By Espressif
- ESP32-S3-DevKitC-1-N8R2 By Espressif
- ESP32-S3-Matrix Development Board By Waveshare
- MEMENTO - Python Programmable DIY Camera By Adafruit
- T-Deck (Plus) By LILYGO
- ESP32-S3-GEEK By Waveshare
- T-Embed By LILYGO
- Unexpected Maker FeatherS3 By Unexpected Maker
- AtomS3 Dev Kit w/ 0.85-inch Screen By M5Stack
- T-Watch S3 By LILYGO
- Nano ESP32 By Arduino
- Metro ESP32-S3 By Adafruit
- ESP32-S3-DevKitM-1-N8 By Espressif
- Unexpected Maker TinyS3 By Unexpected Maker
- Unexpected Maker ProS3 By Unexpected Maker
- ESP32-S3-Tiny By Waveshare
- ESP32-S3-Pico By Waveshare
- ESP32-S3-EYE By Espressif
- AtomS3 Lite ESP32S3 Dev Kit By M5Stack
- ESP32-S3-USB-OTG-N8 By Espressif
- ESP32-S3 ETH Development Board By Waveshare
- Dial - Smart Rotary Knob with Touch Screen By M5Stack
- ESP32-S3-DevKitC-1-N32R8 By Espressif
- YD-ESP32-S3 N8R8 By VCC-GND Studio
- BPI-PicoW-S3 By Banana Pi
- Vision Master E290 By Heltec Automation
- Bee Data Logger By Smart Bee Designs
- M5Stamp S3 By M5Stack
- LOLIN S3 Pro By Wemos
- ESP32-S3 LCD Evaluation Kit By Espressif
- ThingPulse Pendrive S3 By ThingPulse
- LOLIN S3 By Wemos
- ESP32-S3 LCD Evaluation Kit v1.5 By Espressif
- LOLIN S3 MINI By Wemos
- T-Display S3 Pro By LILYGO
- Unexpected Maker TinyWATCH S3 By Unexpected Maker
- LOLIN S3 MINI PRO By Wemos
- Nano ESP32 with inverted Status LED By Arduino
- CoreS3 ESP32 IoT By M5Stack
- Unexpected Maker RGBTouch Mini By Unexpected Maker
- BrainBoardz Neuron By BrainBoardz Inc.
- MaTouch ESP32-S3 Parallel TFT with Touch 7“ By Makerfabs
- Unexpected Maker OMGS3 By Unexpected Maker
- Unexpected Maker Blizzard S3 By Unexpected Maker
- Maker Feather AIoT S3 By Cytron Technologies
- TQ-T Pro (with PSRAM) By LILYGO
- FireBeetle 2 ESP32-S3 By DFRobot
- ESP32-S3 Box Lite By Espressif
- MagiClick S3 By MakerM0
- Deneyap Kart 1A v2 By Turkish Technology Team Foundation
- ESP32-S3 1.47inch Display Development Board By Waveshare
- Unexpected Maker FeatherS3 Neo By Unexpected Maker
- WiFi LoRa 32 V3 By Heltec Automation
- Unexpected Maker NanoS3 By Unexpected Maker
- ESP32-S3 Box By Espressif
- AtomS3U ESP32S3 Dev Kit By M5Stack
- TQ-T Pro (No PSRAM) By LILYGO
- Bee Motion S3 By Smart Bee Designs
- BPI-Leaf-S3 By Banana Pi
- Sunton ESP32-8048S070 By Sunton
- CircuitArt ESP32S3 Zero By CircuitArt
- Barduino By Fablab Barcelona
- ESP32-S3 HackTablet By Kevin Matocha
- Unexpected Maker Bling By Unexpected Maker
- Bee S3 By Smart Bee Designs
- ESP32S3-LCD-1.28 By Waveshare
- Sunton ESP32-8048S050 By Sunton
- Elecrow CrowPanel 4.2 By Elecrow
- Heltec Wireless Paper By Heltec Automation
- M5Stack CardPuter - M5StampS3 powered mini computer (MicroROS) By M5Stack
- ESP32-S3-DevKitC-1-N8R2 (MicroROS) By Espressif
- Unexpected Maker EdgeS3[D] By Unexpected Maker
- AI-On-The-Edge-Cam By Prokyber
- M5Stack Din Meter w/ M5StampS3 By M5Stack
- ESP32S3-TOUCH-LCD-2.8 By Waveshare
- ESP32-S3-Touch-LCD-1.47 By Waveshare
- Seeed Studio XIAO ESP32S3 By Seeed Studio
👍Recommended
- Use those ESP32-S3 boards which has at least
8MBflash memory.
📦Requirements
1ESP32-S3 Board1Micro-B USB / Type-C USB Cable with data transfer support
⚙️Setup ESP32-S3 boards for CircuitPython
- Open Official CircuitPython download link from here.
- Search
ESP32-S3according to the board you have. - Select your board and click on it.
- At the end of the page, there is button named
DOWNLOAD BOOTLOADER combined.bin. - Click on it to download.
- There is a file named
tinyuf2-<NAME-OF-BOARD>-0.35.0-combined.bin.
- There is a file named
- Open Adafruit ESP Web Flasher from here.
- Connect
ESP32-S3with a USB cable and then to the PC/Laptop. - Press and hold the
BOOTbutton. - Press and release the
RSTbutton. - Release the
BOOTbutton. - Set the Baud Rate to
460800 Baud. - Click on
Connectbutton. - Select your Device COM Port in the Pop-Up Window.
- Click on
Connectbutton in the Pop-Up Window.
- When connected successfully, then it show this
- Click on
Erasebutton. - Wait for sometimes to successfully erased.
- Click on first one
Choose a file.... - Select the
tinyuf2-<NAME-OF-BOARD>-0.35.0-combined.binfile. - Click on
Programbutton. - Wait for sometimes and after successfully flashed, press and release the
RSTorRESETbutton. - Plug-out and then plug-in the USB cable in PC/Laptop.
- When it connects, then
ESP32-S3board as a removable storage deviceS3DKC1BOOT.
- Done! Now,
ESP32-S3Board is ready to flash CircuitPython.uf2file.
⚙️Setup CircuitPython
- Open Official CircuitPython download link from here.
- Search
ESP32-S3according to the board you have. - Select your board and click on it.
- Download latest stable release CircuitPython
.uf2file and noted its version.- It is like
X.Y.Z. - Latest stable release is
9.2.8but it can be changed in future so keep eye on it.
- It is like
- Copy the
.uf2file into theS3DKC1BOOT.- When it is copied, then it disconnects automatically and reconnect as
CIRCUITPY. - Means CircuitPython is successfully flashed in the
ESP32-S3board.
- When it is copied, then it disconnects automatically and reconnect as
- Done! Now,
ESP32-S3Board is flashed with CircuitPython.uf2file.
⚙️Setup Essential Files for BLEDuck
- Download or Clone the Repository.
- Open the folder.
- Make sure that your
ESP32-S3board is connected to your PC/Laptop.
- Make sure that your
- Copy
code.pyin theCIRCUITPY.- It ask for replacement of
code.pyfile, then replace it. - It will overwrite in the
code.pyfile.
- It ask for replacement of
- Copy
boot.pyin theCIRCUITPY. - Download latest Adafruit CircuitPython Bundle from here.
- There are 2 variants of libraries :
BundlesandThe Community Bundle. - In
Bundlesvariant, download latest stable Adafruit CircuitPython Bundle as noted version of.uf2file. - Latest stable release is
adafruit-circuitpython-bundle-9.x-mpy-20250829.zipbut it can be changed in future so keep eye on it.
- There are 2 variants of libraries :
- Extarct the ZIP file.
- Go to the
libfolder in the extracted ZIP file. - Copy
adafruit_bleandadafruit_hidfolders in thelibfolder ofCIRCUITPY.- After 2-3 minutes, an BLE device named
BLEDuckis discovered.
- After 2-3 minutes, an BLE device named
- Create a folder named
payloadsinCIRCUITPY. - Done! Now,
ESP32-S3board is ready to use as a BLEDuck.
🔧Tweaks in boot.py
boot.pyhelps to hide / unhide mass storage device to work in stealth.- In
boot.py, replaceXwith any pin number available on the board inLOC 7. - By default, the mass storage is hidden when
boot.pyis inCIRCUITPY. - To show mass storage, put jumper wire between that pin number mentioned in
boot.pyandGNDand press and release theRSTorRESETbutton. - To hide mass storage, just remove jumper wire between them and press and release the
RSTorRESETbutton.
📄Payload Files
- Open Notepad or any other text editor.
- Write your payload in it.
- When saving the file, select
CIRCUITPY. - Then go to the
payloadsfolder. - Name the payload as
payload-1,payload-2etc.- It is saved by default as
.txtfiles.
- It is saved by default as
🧩CIRCUITPY Directory Structure
- CIRCUITPY/
- lib/
adafruit_bleadafruit_hid
code.pyboot.py- payloads/
payload-X.txt
- where
Xis a number like1,2,3,4etc.
- lib/
🏃🏻♂Run BLEDuck
- Turn on your mobile bluetooth.
- Scan the bluetooth and it show
BLEDuck. - Connect and pair with it.
- Download
Serial Bluetooth Terminalapp from here. - Open
Serial Bluetooth Terminalapp. - Click on
☰. - Click on
Devices. - Click on
Bluetooth LE. - Click on
Scan.- It ask for permission, then click on
Allow. - There is a device named
BLEDuckshow in it.
- It ask for permission, then click on
- Click on it.
- After that, when it show
Connectedit means ready to execute payloads using BLE. - Just type the number and click on Send button.
- The payload of that number executes immediately.
💡Mnemonic Table
| Mnemonics | Description | Example |
|---|---|---|
| WAIT | It add time in the code. Time is in milliseconds. 1000 ms = 1 second. |
WAIT 1000 |
| TYPE | It add text want to type in the code. | TYPE Hello World! |
| LOOP | It runs commands for a certain number of times. Synatx is LOOP number-of-times commands |
LOOP 3 TYPE Hello World! EXIT LOOP 4 TAB EXIT LOOP 1 CTRL S EXIT LOOP 1 CTRL SHIFT N EXIT |
| INF | It run commans infinitely. Syntax is INF commands |
INF TYPE Hello World! EXIT INF TAB EXIT |
🔡Special Symbols
-
- It is used to put the cursor in the next line.
- It is only used with TYPE.
- Example :
TYPE Hello World!- - If TYPE contain any command and then
-then it run automatically withoutENTERkey.
📝Supported Mnemonics
Alphabet Keys
A B C D E F G H I J K L M N O
P Q R S T U V W X Y Z
Function Keys
F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12
Navigation Keys
LEFT UP RIGHT DOWN TAB HOME END PGUP PGDN
Lock Keys
CAPS NUM SCROLL
System and GUI Keys
GUI ESC PRTSCR PAUSE
Editing Keys
INSERT DEL BKSP ENTER
Modifier Keys
CTRL SHIFT ALT
ASCII Characters
` ! @ # $ % ^ & * ( ) - = [ ] \ ;
' , . / SPACE ~ _ + { } | : " < > ? 0
1 2 3 4 5 6 7 8 9
📖Examples
Open notepad and type Hello World!
WAIT 1000
GUI R
WAIT 1000
TYPE notepad
WAIT 1000
ENTER
WAIT 1000
TYPE Hello World!
Open CMD as Administrator Mode
WAIT 1000
GUI R
WAIT 1000
TYPE cmd
WAIT 1000
CTRL SHIFT ENTER
WAIT 1300
ALT Y
Create A New Folder
WAIT 1000
CTRL SHIFT N
WAIT 1200
TYPE hello
WAIT 1100
ENTER
Open notepad and type Hello World! 6 times in different lines
WAIT 1000
GUI R
WAIT 1000
TYPE notepad
WAIT 1000
ENTER
WAIT 1000
LOOP 6
TYPE Hello World!-
EXIT