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
  • ALT CODES
  • Caveats
  1. Writing Payloads

QUACK

Last updated 3 months ago

The Bash Bunny inherits the original DuckyScript commands from the USB Rubber Ducky. Keystrokes can be injected from DuckyScript text files, or inline using the QUACK command. The ATTACKMODE must contain HID for keystroke injection.

Examples:

QUACK switch1/helloworld.txt

Injects keystrokes from the specified ducky script text file.

QUACK STRING Hello World

Injects the keystrokes “Hello World”

Q ALT F4

Injects the keystroke combination of ALT and F4

ALT CODES

Firmware version 1.5 added the QUACK ALTCODE command. This allows the printing of alt-codes on Windows system only.

QUACK ALTCODE 168 # types an upside down question mark
QUACK ALTCODE 236 # types an infinity symbol

Caveats

When writing payloads for the bash bunny be mindful that when using QUACK and other DuckyScript commands you are passing arguments to a script. If you are using variables in your payload, and injecting keystrokes, avoid variable naming collisions! URL="example.com" QUACK STRING <some code we are injecting onto a system> $URL Will inject: <some code we are injecting onto a system> example.com This can be very useful for adding easily configurable parameters to your payload for others to use similar to the . However, if the code you're intending to inject on a system uses a variable $URL (and so does your bash bunny payload) you will not get the intended results because bash will have resolved it rather than injecting it. You may find that there may be other, similar caveats when building complex payloads with the power of Bash+DuckyScript.

DEFINEpattern introduced in DuckyScript 3 on the USB Rubber Ducky