Bash Bunny
  • Bash Bunny by Hak5
  • Getting Started
    • Switch Positions
    • Mass Storage Structure
    • LED Status Indications
    • Installing Additional Tools
    • Installing Additional Languages
    • Considerations for Mark II
  • Writing Payloads
    • Payload Development Basics
    • DuckyScript™ on the Bash Bunny
    • QUACK
    • Extensions
    • ATTACKMODE
      • VID, PID, MAN, PROD, SN
    • LED
    • Working with the File System
    • CPU Control
    • Contributing Best Practices
    • Submitting Payloads
    • WAIT_FOR_PRESENT
  • Internet Connectivity
    • Getting the Bash Bunny Online
    • Sharing an Internet connection from Windows
    • Sharing an Internet connection from Linux
    • Sharing an Internet connection from MacOS
  • Software Updates
    • Updating the Bash Bunny Firmware
  • Troubleshooting
    • Factory Reset
    • Password Reset
  • Beginner Guides
    • Writing Keystroke Injection Payloads for the Bash Bunny
    • Network Hijacking Attacks with the Bash Bunny
    • Top 5 Bash Bunny Exfiltration Payloads to "steal files"
    • Getting Root on a Bash Bunny from the Serial Console
    • Remote Triggers for the Bash Bunny Mark II
    • Geofencing for the Bash Bunny Mark II
  • Video Guides
    • Bash Bunny Primer
    • Bash Bunny Phishing Attack with Hamsters
    • Password Grabber Bash Bunny Payload
    • Operating System Detection with the Bash Bunny
    • Bash Bunny Extensions
    • Reverse Shells on Linux with Bash Bunny
    • Bash Bunny Payload - Sudo Bashdoor on Linux
    • Bash Bunny Payload - 1990's Prank
    • Bash Bunny Dev - Behind the Scenes
    • Concealed Exfiltration - Pocket Network Attacks with the Bash Bunny
    • How to write Bash Bunny payloads and contribute on GitHub
Powered by GitBook
On this page
  1. Writing Payloads

DuckyScript™ on the Bash Bunny

Last updated 11 months ago

DuckyScript™ is the payload language of Hak5 gear. It consists of a number of simple commands specific to the Bash Bunny hardware, some helper functions and the full power of the Bash Unix shell and command language. These payloads, named payload.txt, execute on boot by the Bash Bunny depending on the switch position.

can be sourced which extend the DuckyScript language with user contributed functions and variables which enhance and simplify payloads. All DuckyScript commands are written in ALL CAPS.

The base DuckyScript commands are:

COMMAND
Description

ATTACKMODE

Specifies the USB device or combination of devices to emulate.

LED

Control the RGB LED. Accepts color and pattern or payload state.

QUACK

Injects keystrokes (ducky script) or specified ducky script file.

Q

Alias for QUACK

DUCKY_LANG

Set the HID Keyboard language. e.g: DUCKY_LANG us

Converting from USB Rubber Ducky

If you are looking to convert a payload from DuckyScript 1.0 from the USB Rubber Ducky, you will need to append to most lines in that payload to make it Bash Bunny Compatible.

Extensions
QUACK