Bad USB

Official Documentation

 * No official documentation on the docs site at this time.

Supported Functions

 * Supported Buttons/Key Presses
 * https://github.com/flipperdevices/flipperzero-firmware/blob/release/applications/bad_usb/bad_usb_script.c#L47
 * Supported Functions
 * https://github.com/flipperdevices/flipperzero-firmware/blob/release/applications/bad_usb/bad_usb_script.c#L104
 * Ducky Script quick-reference to help explain functions
 * https://docs.hak5.org/usb-rubber-ducky-1/the-ducky-script-language/ducky-script-quick-reference
 * REM
 * ID
 * Sets the HID vendor ID, product ID, manufacturer string, and product string
 * Must be the very first line of the badusb text file.
 * e.g. "ID 05ac:027b Apple Inc:Keyboard" will emulate an Apple keyboard.
 * Format is "ID [Vendor ID]:[Product ID] [Manufacturer String]:[Product string]"
 * DELAY
 * STRING
 * DEFAULT_DELAY, DEFAULTDELAY
 * REPEAT
 * ALTCHAR
 * Types a single character while "holding down the ALT key"
 * ALTSTRING, ALTCODE
 * Types multiple characters while "holding down the ALT key" for the duration of each key press.
 * e.g. "ALTSTRING test" will do the following:
 * keydown ALT, type 't', keyup ALT, keydown ALT, type 'e', keyup ALT, keydown ALT, type 's', keyup ALT, keydown ALT, type 't', keyup ALT

Supported Functions

 * Saving files back to the Flipper
 * https://forum.flipperzero.one/t/anyway-to-save-files-back-to-the-flipper-using-badusb/23721
 * Not only is the software currently not written to support this, but it sounds like more direct access is very slow and would provide a poor user experience.
 * https://www.reddit.com/r/flipperzero/comments/tfjci1/mount_as_usb_drive_modify_sd_card/

Considerations

 * BadUSB/Ducky script files must be in the SDcard "badusb" folder, and the files must be saved as '.txt' files.
 * BadUSB/Ducky scripts must end in "LF" (Linux newlines), not "CRLF" (Windows newlines). You can use a text editor like Notepad++ to run this type of "EOL Conversion".
 * https://forum.flipperzero.one/t/badusb-rubber-ducky-against-android/1861
 * https://forum.flipperzero.one/t/bad-usb-ducky-payload-tips/1764

Useful Tools

 * [https://www.the-sz.com/products/usbid/ USB ID database

Sites with possible BadUSB/DuckyScript examples

 * https://github.com/hak5/omg-payloads
 * https://github.com/0iphor13
 * https://github.com/I-Am-Jakoby/hak5-submissions
 * https://github.com/hak5/usbrubberducky-payloads
 * https://github.com/hak5darren/USB-Rubber-Ducky/wiki/Payloads

FAQ

 * Legality
 * Note that as with most tools, this can be used for legal purposes (e.g. IT automation, etc) as well as illegal purposes (recon, infection, etc).
 * Can I change the type of device that the Flipper shows up as (such as Logitech keyboard, Apple keyboard, etc)?
 * Yes! See the "ID" function.