← How-Tos
flipper-zero Mar 29, 2026 ◑ 7 views ◯ 2 min read

How to Use the Flipper Zero as a USB Rubber Ducky

flipper zerobadusbrubber duckyhidautomationpayload

The Flipper Zero can act as a USB HID keyboard (BadUSB mode), executing keystroke injection payloads just like a USB Rubber Ducky. This is useful for automating setup tasks, testing endpoint security, or building physical access tools.

How It Works

When plugged into a USB port, the Flipper identifies itself as a keyboard. It then types a script at machine speed โ€” far faster than any human. The target computer sees only keystrokes, not a USB drive or unknown device.

Payload Location

Payloads (.txt files in Ducky Script format) go on the SD card at:

/ext/badusb/

Basic Ducky Script Syntax

REM This is a comment
DELAY 1000          -- Wait 1000ms (1 second)
STRING Hello world  -- Type this text
ENTER               -- Press Enter
CTRL SHIFT ESC      -- Keyboard shortcut
GUI r               -- Windows key + R (Run dialog)
ALT F4              -- Close window

Example โ€” Open Notepad and Type Text (Windows)

REM Open Notepad and type a message
DELAY 500
GUI r
DELAY 500
STRING notepad
ENTER
DELAY 1000
STRING Hello from Flipper Zero!
ENTER
STRING This is a BadUSB test payload.

Example โ€” Open Terminal on Mac

REM Open Terminal on macOS
DELAY 500
GUI SPACE
DELAY 500
STRING Terminal
ENTER
DELAY 1500
STRING echo "Flipper was here"
ENTER

Example โ€” Lock the Screen (Windows)

REM Lock Windows screen
GUI l

Running a Payload

  1. Copy your .txt payload to /ext/badusb/ on the Flipper SD card
  2. On Flipper: BadUSB โ†’ select your payload โ†’ Run
  3. Plug Flipper into the target computer via USB-C
  4. Press the center button to execute

Payload Tips

Avoiding Detection

Community Payload Resources

> This is for educational use and authorized testing only. Running payloads on systems you don't own or have permission to test is illegal.