Hacking For Babies
  • Introduction
  • Ethical Hacking
  • Kali Linux
    • Why Kali ?
    • Virtual Machine
    • kali on Cloud
    • Bootable USB
    • Dual Boot Kali
    • Kali Nethunter
    • Most Used Linux Commands
    • Additional Information
  • Network Basics
    • What is the internet ?
    • Key Words
    • Network devices
    • LAN / WAN
    • VPN (Virtual Private Network)
    • Deep and Dark Web
    • Networking Commands
    • Additional Information
  • OSINT
    • Maltego
    • Google Advanced Search Operators
    • OSINT Username Finder
    • Social Media OSINT
    • Reverse Image Search
    • Protect yourself from OSINT
    • Additional Information
  • Digital Forensics
  • Phishing Attacks
    • Temporary Numbers
    • GitHub Projects/Tools
    • Kali Pre-Installed Tools
    • Emails Tricks
    • How to secure yourself from phishing attacks
    • Additional Information
  • Hardware Attacks
    • Marketplaces and Websites
    • Keylogger
    • USB Killer
    • Ethernet Hacking Tools
    • Flipper Zero
    • Bad USB
  • HID Attacks
    • Classic Bad USB
    • Wireless Bad USB
    • Keystroke Injection Cable
    • Other Tools Using the Some Concept
    • Simple Ducky Script
    • Reverse Shell Ducky Script
    • Solution for Bad USB
  • Cryptography
    • What is Cryptography ?
    • Simple Cryptography Algorithms
    • Hash Algorithms
    • Symmetric / Asymmetric cryptography
    • RSA Cryptosystem
    • Quantum Computers VS Cryptography
    • Steganography: Hiding Data in music and photos
    • Additional Information
  • Password Attacks
    • Dictionary Attacks
    • Brute Force Attacks
    • Hashcat
    • Hydra
    • Other Password Attacks Tools
    • Protect your Self against Password Attacks
  • Wireless Attacks
    • RFID / NFC Attacks
    • Bluetooth Attacks
    • MouseJack Attacks
    • IR Replay Attacks
    • RF Attacks
    • Wifi Attacks
  • WIFI Attacks
    • Wireless Adapters
    • Basic WIFI Manipulation
    • Deauthentication Attack
    • WIFI Cracking
    • MITM Attacks
    • Prebuild WIFI Pentesting Tools
    • WIFI Attack Solution
    • Additional Information
  • WIFI Cracking
    • WEP Cracking
    • WPS Attack
    • WPA Handshake Capture
    • PMKID Hash Capture
    • Hashcat Cracking
    • Wifite
    • Airgeddon
    • Fern WIFI Cracker
    • Protecting your Wi-Fi network from cracking
  • Coming Soon
Powered by GitBook
On this page
  • Overview
  • How to write a Ducky Script?
  • Hak5 Payload Studio (Community Version: Free)
  • Ready Ducky Script To Use
  • YouTube Tutorials About Ducky Script
  1. HID Attacks

Simple Ducky Script

Overview

Ducky Script is a simple scripting language used in the Bad USB community. It was initially developed for the USB Rubber Ducky, a popular hardware keystroke injection tool. Ducky Script allows users to create scripts that emulate keyboard inputs and actions, effectively automating tasks or executing commands on a target system.

Ducky Script is composed of a series of commands, each representing a specific keystroke or action. These commands can include typing text, pressing special keys (such as Enter or Shift), delaying between commands, and executing complex sequences of actions. The syntax of Ducky Script is straightforward and easy to understand, making it accessible to both beginners and experienced users.

By programming Ducky Script onto a compatible Bad USB device, such as an Arduino board or a USB Rubber Ducky, the device can be used to simulate keyboard input on a target system. This can be useful for automation, penetration testing, or educational purposes. However, it's important to note that the use of Ducky Script or any keystroke injection tool must be done ethically and legally, with proper authorization and consent.

DuckyScript is the programming language of the USB Rubber Ducky, Hak5 hotplug attack gear and officially licensed devices (Trademark Hak5 LLC. Copyright © 2010 Hak5 LLC. All rights reserved.)

DuckyScript officially licensed and supported devices are backward compatible with previous versions, excluding any device-specific functionality.

E.g. DuckyScript 1.0 payloads written for the USB Rubber Ducky is valid DuckyScript 3.0 and will function on the New USB Rubber Ducky without modification

DuckyScript Version

Device Compatibility

1.0

Original USB Rubber Ducky (USB-A Only)

2.X

Bash Bunny, Key Croc, Packet Squirrel, LAN Turtle, Shark Jack, O.MG Devices

3.0

New USB Rubber Ducky (USB-A & USB-C)

How to write a Ducky Script?

To write a Ducky Script, which is a scripting language used for Rubber Ducky USB devices, follow these steps:

  1. Plan your script: Determine the actions you want the Rubber Ducky to perform when connected to a computer. This can include keystrokes, commands, delays, and other functions.

  2. Understand Ducky Script syntax: Familiarize yourself with the syntax of Ducky Script. It uses simple commands and symbols to specify key presses, delays, and other actions. For example, the "STRING" command is used to input text, the "DELAY" command adds a delay between commands, and the "REM" command allows you to add comments.

  3. Write your script: Using a text editor, create a new file and start writing your Ducky Script commands based on your planned actions. Each command should be written on a new line. You can use commands like "REM" for comments, "STRING" for inputting text, "DELAY" for adding delays, "ENTER" for pressing the Enter key, and more. Refer to the official Ducky Script documentation for a comprehensive list of available commands.

  4. Test and refine your script: Once you have written your Ducky Script, test it on a compatible Rubber Ducky device or by emulating it using software tools. Verify that the script performs the desired actions as expected. Make any necessary adjustments or refinements to your script if needed.

  5. Save your Ducky Script: Save your script with a ".txt" file extension or any other text file format.

YOU WILL FIND ALL COMMANDS AND CODE ON THOSE DOCUMENTATION:

YOU CAN ALSO USE CHAT GPT TO WRITE SIMPLE DUCKY SCRIPT

Hak5 Payload Studio (Community Version: Free)

PayloadStudio is used to generate ducky script for Hak5 USB rubber ducky

Ready Ducky Script To Use

YouTube Tutorials About Ducky Script

Several YouTube tutorials are accessible about ducky script:

PreviousOther Tools Using the Some ConceptNextReverse Shell Ducky Script

Last updated 1 year ago

This YouTube Tutorials ( , ) created by

This YouTube Videos ( , , ...) created by

USB Rubber Ducky Playlist
Payload Playlist
Hak5
O.M.G
O.M.G Cables
David Bombal
DuckyScript™ Quick ReferenceUSB Rubber Ducky
Scripting | USB Nova
The basicsMaltronics Documentation
Scripting | WiFi Duck
Logo
Writing Your First PayloadUSB Nugget
Hak5 PayloadStudio
Logo
Duck ToolKit
Logo
PayloadsHak5
GitHub - hak5/usbrubberducky-payloads: The Official USB Rubber Ducky Payload RepositoryGitHub
GitHub - davidbombal/hak5: hak5 YouTube videosGitHub
badusb_examples/usb_rubber_ducky at master · joelsernamoreno/badusb_examplesGitHub
GitHub - nocomp/Flipper_Zero_Badusb_hack5_payloads: hack5 badusb payloads moded for be played with flipper zeroGitHub
Logo
Logo
Logo
Logo
Logo
Logo
Logo
Logo
Logo