
A BLE-controlled USB Rubber Ducky clone built with ESP32-S3 boards.
- 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.
- Use those ESP32-S3 boards which has at least
8MB
flash memory.
1
ESP32-S3 Board1
Micro-B USB / Type-C USB Cable with data transfer support
- Open Official CircuitPython download link from here.
- Search
ESP32-S3
according 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-S3
with a USB cable and then to the PC/Laptop. - Press and hold the
BOOT
button. - Press and release the
RST
button. - Release the
BOOT
button. - Set the Baud Rate to
460800 Baud
. - Click on
Connect
button. - Select your Device COM Port in the Pop-Up Window.
- Click on
Connect
button in the Pop-Up Window.
- Click on
Erase
button. - Wait for sometimes to successfully erased.
- Click on first one
Choose a file...
. - Select the
tinyuf2-<NAME-OF-BOARD>-0.35.0-combined.bin
file. - Click on
Program
button. - Wait for sometimes and after successfully flashed, press and release the
RST
orRESET
button. - Plug-out and then plug-in the USB cable in PC/Laptop.
- When it connects, then
ESP32-S3
board as a removable storage deviceS3DKC1BOOT
.
- Done! Now,
ESP32-S3
Board is ready to flash CircuitPython.uf2
file.
- Open Official CircuitPython download link from here.
- Search
ESP32-S3
according to the board you have. - Select your board and click on it.
- Download latest stable release CircuitPython
.uf2
file and noted its version.- It is like
X.Y.Z
. - Latest stable release is
9.2.8
but it can be changed in future so keep eye on it.
- It is like
- Copy the
.uf2
file into theS3DKC1BOOT
.- When it is copied, then it disconnects automatically and reconnect as
CIRCUITPY
. - Means CircuitPython is successfully flashed in the
ESP32-S3
board.
- When it is copied, then it disconnects automatically and reconnect as
- Done! Now,
ESP32-S3
Board is flashed with CircuitPython.uf2
file.
- Download or Clone the Repository.
- Open the folder.
- Make sure that your
ESP32-S3
board is connected to your PC/Laptop.
- Make sure that your
- Copy
code.py
in theCIRCUITPY
.- It ask for replacement of
code.py
file, then replace it. - It will overwrite in the
code.py
file.
- It ask for replacement of
- Copy
boot.py
in theCIRCUITPY
. - Download latest Adafruit CircuitPython Bundle from here.
- There are 2 variants of libraries :
Bundles
andThe Community Bundle
. - In
Bundles
variant, download latest stable Adafruit CircuitPython Bundle as noted version of.uf2
file. - Latest stable release is
adafruit-circuitpython-bundle-9.x-mpy-20250829.zip
but it can be changed in future so keep eye on it.
- There are 2 variants of libraries :
- Extarct the ZIP file.
- Go to the
lib
folder in the extracted ZIP file. - Copy
adafruit_ble
andadafruit_hid
folders in thelib
folder ofCIRCUITPY
.- After 2-3 minutes, an BLE device named
BLEDuck
is discovered.
- After 2-3 minutes, an BLE device named
- Create a folder named
payloads
inCIRCUITPY
. - Done! Now,
ESP32-S3
board is ready to use as a BLEDuck.
boot.py
helps to hide / unhide mass storage device to work in stealth.- In
boot.py
, replaceX
with any pin number available on the board inLOC 7
. - By default, the mass storage is hidden when
boot.py
is inCIRCUITPY
. - To show mass storage, put jumper wire between that pin number mentioned in
boot.py
andGND
and press and release theRST
orRESET
button. - To hide mass storage, just remove jumper wire between them and press and release the
RST
orRESET
button.
- Open Notepad or any other text editor.
- Write your payload in it.
- When saving the file, select
CIRCUITPY
. - Then go to the
payloads
folder. - Name the payload as
payload-1
,payload-2
etc.- It is saved by default as
.txt
files.
- It is saved by default as
- CIRCUITPY/
- lib/
adafruit_ble
adafruit_hid
code.py
boot.py
- payloads/
payload-X.txt
- where
X
is a number like1
,2
,3
,4
etc.
- lib/
- Turn on your mobile bluetooth.
- Scan the bluetooth and it show
BLEDuck
. - Connect and pair with it.
- Download
Serial Bluetooth Terminal
app from here. - Open
Serial Bluetooth Terminal
app. - 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
BLEDuck
show in it.
- It ask for permission, then click on
- Click on it.
- After that, when it show
Connected
it means ready to execute payloads using BLE. - Just type the number and click on Send button.
- The payload of that number executes immediately.
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 |
-
- 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 withoutENTER
key.
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
F1
F2
F3
F4
F5
F6
F7
F8
F9
F10
F11
F12
LEFT
UP
RIGHT
DOWN
TAB
HOME
END
PGUP
PGDN
CAPS
NUM
SCROLL
GUI
ESC
PRTSCR
PAUSE
INSERT
DEL
BKSP
ENTER
CTRL
SHIFT
ALT
`
!
@
#
$
%
^
&
*
(
)
-
=
[
]
\
;
'
,
.
/
SPACE
~
_
+
{
}
|
:
"
<
>
?
0
1
2
3
4
5
6
7
8
9
WAIT 1000
GUI R
WAIT 1000
TYPE notepad
WAIT 1000
ENTER
WAIT 1000
TYPE Hello World!
WAIT 1000
GUI R
WAIT 1000
TYPE cmd
WAIT 1000
CTRL SHIFT ENTER
WAIT 1300
ALT Y
WAIT 1000
CTRL SHIFT N
WAIT 1200
TYPE hello
WAIT 1100
ENTER
WAIT 1000
GUI R
WAIT 1000
TYPE notepad
WAIT 1000
ENTER
WAIT 1000
LOOP 6
TYPE Hello World!-
EXIT