An android app to perform USB HID Attacks (Rubber Duck) in multiple ways:
Ducky Script syntax is simple. Each command resides on a new line and may have options follow. Commands are written in ALL CAPS, because ducks are loud and like to quack with pride. Most commands invoke keystrokes, key-combos or strings of text, while some offer delays or pauses. Below is a list of commands and their function, followed by some example usage. Some syntax extended from the original Hak5 Ducky Script Syntax. Mouse ducky scripts are different from those seen online and have been defined to keep the similarity with the keyboard ducky scripts.
Note: In parameters [num]
represents a number, [char]
represents characters A-Z, a-z. Customizable HID support too has been added.
All HID2/Legacy HID commands are supported
Feature | Sub Feature | Supported | Description |
---|---|---|---|
Keystroke Injection | Character Keys: Alphanumeric | ✅ | Hak5 Docs |
Keystroke Injection | Character Keys: Punctuation | ✅ | Hak5 Docs |
Keystroke Injection | STRING | ✅ | Hak5 Docs |
Keystroke Injection | STRINGLN | ✅ | Hak5 Docs |
Keystroke Injection | Cursor Keys | ✅ | Hak5 Docs |
Keystroke Injection | System Keys | ✅ | Hak5 Docs |
Keystroke Injection | Basic Modifier Keys | ✅ | Hak5 Docs |
Keystroke Injection | Basic Modifier Keys | ✅ | Hak5 Docs |
Keystroke Injection | Basic Modifier Keys | ✅ | Hak5 Docs |
Keystroke Injection | Basic Modifier Keys | ✅ | Hak5 Docs |
Comments | REM | ✅ | Hak5 Docs |
Delays | DELAY | ✅ | Hak5 Docs |
The Button | WAIT_FOR_BUTTON_PRESS | ❌ | Hak5 Docs Checking for feasibility |
The Button | BUTTON_DEF | ❌ | Hak5 Docs Checking for feasibility |
The Button | DISABLE_BUTTON | ❌ | Hak5 Docs Checking for feasibility |
The Button | ENABLE_BUTTON | ❌ | Hak5 Docs Checking for feasibility |
The Button | Internal Variables | ❌ | Hak5 Docs Checking for feasibility |
The LED | Default Behaviors | ❌ | Hak5 Docs Checking for feasibility |
The LED | LED_OFF | ❌ | Hak5 Docs Checking for feasibility |
The LED | LED_R | ❌ | Hak5 Docs Checking for feasibility |
The LED | LED_G | ❌ | Hak5 Docs Checking for feasibility |
The LED | Internal Variables | ❌ | Hak5 Docs Checking for feasibility |
Attack Modes | ATTACKMODE | 🚧 | Hak5 Docs STORAGE MODE not supported as newer Android versions do not support mass storage mode |
Attack Modes | VID and PID | ✅ | Hak5 Docs |
Attack Modes | MAN, PROD and SERIAL | 🚧 | Hak5 Docs SERIAL_RANDOM is currently not supported |
Attack Modes | SAVE and RESTORE | ❌ | Hak5 Docs |
Attack Modes | Internal Variables | ❌ | Hak5 Docs |
Constants | DEFINE | ✅ | Hak5 Docs |
Variables | VAR | ✅ | Hak5 Docs |
Operators | Math Operators | ✅ | Hak5 Docs |
Operators | Comparison Operators | ✅ | Hak5 Docs |
Operators | Order of Operations | ✅ | Hak5 Docs |
Operators | Logical Operators | ✅ | Hak5 Docs |
Operators | Augmented Assignment Operators | ✅ | Hak5 Docs |
Operators | Bitwise Operators | ✅ | Hak5 Docs |
Conditional Statements | IF | ✅ | Hak5 Docs |
Conditional Statements | ELSE | ✅ | Hak5 Docs |
Conditional Statements | Nested IF Statements | ✅ | Hak5 Docs |
Conditional Statements | IF Statements with logical operators | ✅ | Hak5 Docs |
Conditional Statements | IF Statement Optimization | ✅ | Hak5 Docs |
Loops | WHILE | ✅ | Hak5 Docs |
Loops | Infinite Loop | ✅ | Hak5 Docs |
Functions | FUNCTION | ✅ | Hak5 Docs |
Functions | Passing Arguments and Return Values | ✅ | Hak5 Docs |
Randomization | ❌ | Hak5 Docs | |
Holding Keys | HOLD and RELEASE | ✅ | Hak5 Docs |
Holding Keys | Holding Modifier Keys | ✅ | Hak5 Docs |
Holding Keys | Holding Multiple Keys | ✅ | Hak5 Docs |
Payload Control | ❌ | Hak5 Docs | |
Jitter | ❌ | Hak5 Docs | |
Payload Hiding | ❌ | Hak5 Docs | |
Storage Activity | ❌ | Hak5 Docs | |
Lock Keys | ❌ | Hak5 Docs | |
Exfiltration | ❌ | Hak5 Docs | |
Extensions | ❌ | Hak5 Docs |
All mouse/pointer commands will start with this command. REPEAT command and DELAY commands effect can also be applied to mouse commands.
Note:
[button]
, which emulates a mouse button action and can have the following value:
[x]
and [y]
, which emulates mouse movement action and can have the value range from -127 to 127. This represents pixels and is relative to where the mouse currently is. If you are at the point (150,150) then you can move the mouse to (127,127) pixels of this point followed by (23,23). Therefore, if the mouse is at (0,0) [top left corner] and you want to move to (1920, 1080) [bottom right corner, assuming a 1080p display], then you would need to move the mouse a few times 127 pixels at a time (or less) in either direction.[scroll]
, which emulates mouse scroll whell action and can have the following value:
[num]
represents a number. This is used to repeat the action. Alternatively, REPEAT command can be used.Syntax:
Command | Command Type | Parameter 1 | Parameter 2 | Parameter 3 | Parameter 4 | Description |
---|---|---|---|---|---|---|
MOUSE or POINTER | CLICK or TOUCH or PRESS | [button] | [num] | Mouse button click. Mouse does not move along [x] and [y] directions. |
||
MOUSE or POINTER | HOLD or DRAG | [button] | [x] | [y] | [num] | Mouse button click and hold. Mouse can be moved along [x] and [y] directions. |
MOUSE or POINTER | MOVE or TRANSLATE | [x] | [y] | [num] | Mouse button does not click. Mouse can be moved along [x] and [y] directions. |
|
MOUSE or POINTER | KNOB or WHEEL or SCROLL | [scroll] | [num] | Mouse button does not click. Mouse can be scrolled up or down. |
Example:
REM double left click
MOUSE CLICK LEFT 2
REM drag a folder
MOUSE HOLD LEFT 127 45
REM move pointer
MOUSE MOVE 0 0 5
REM scroll a document
MOUSE SCROLL DOWN 10
REM using repeat
MOUSE CLICK LEFT
REPEAT 1
Status | Code | Language | Translated |
---|---|---|---|
❌ | b+ach | Acholi | 0% |
❌ | aa | Afar | 0% |
✅ | af | Afrikaans | 100% |
✅ | ak | Akan | 100% |
✅ | sq | Albanian | 100% |
✅ | am | Amharic | 100% |
✅ | ar | Arabic | 100% |
❌ | an | Aragonese | 0% |
✅ | hy | Armenian | 100% |
❌ | as | Assamese | 0% |
❌ | b+ast | Asturian | 0% |
❌ | av | Avaric | 0% |
❌ | ae | Avestan | 0% |
❌ | ay | Aymara | 0% |
✅ | az | Azerbaijani | 100% |
❌ | b+ban | Balinese | 0% |
❌ | b+bal | Balochi | 0% |
❌ | bm | Bambara | 0% |
❌ | ba | Bashkir | 0% |
✅ | eu | Basque | 100% |
✅ | be | Belarusian | 100% |
✅ | bn | Bengali | 100% |
🚧 | b+ber | Berber | 41% |
❌ | bh | Bihari | 0% |
❌ | bi | Bislama | 0% |
✅ | bs | Bosnian | 100% |
✅ | br | Breton | 100% |
✅ | bg | Bulgarian | 100% |
❌ | my | Burmese | 0% |
✅ | ca | Catalan | 100% |
❌ | b+ceb | Cebuano | 0% |
❌ | ch | Chamorro | 0% |
❌ | ce | Chechen | 0% |
❌ | b+chr | Cherokee | 0% |
✅ | ny | Chewa | 100% |
✅ | zh-rCN | Chinese Simplified | 100% |
✅ | zh-rTW | Chinese Traditional | 100% |
❌ | cv | Chuvash | 0% |
❌ | kw | Cornish | 0% |
✅ | co | Corsican | 100% |
❌ | cr | Cree | 0% |
✅ | hr | Croatian | 100% |
✅ | cs | Czech | 100% |
✅ | da | Danish | 100% |
❌ | dv | Dhivehi | 0% |
✅ | nl | Dutch | 100% |
❌ | dz | Dzongkha | 0% |
✅ | en-rGB | English (UK) | 100% |
✅ | en-rUS | English (US) | 100% |
✅ | eo | Esperanto | 100% |
✅ | et | Estonian | 100% |
✅ | ee | Ewe | 100% |
❌ | fo | Faroese | 0% |
❌ | fj | Fijian | 0% |
✅ | b+fil | Filipino | 100% |
✅ | fi | Finnish | 100% |
✅ | fr | French | 100% |
✅ | fy | Frisian | 100% |
❌ | b+fur | Friulian | 0% |
❌ | ff | Fula | 0% |
❌ | b+gaa | Ga | 0% |
✅ | gl | Galician | 100% |
✅ | ka | Georgian | 100% |
✅ | de | German | 100% |
❌ | b+got | Gothic | 0% |
✅ | el | Greek | 100% |
❌ | kl | Greenlandic | 0% |
✅ | gn | Guarani | 100% |
✅ | gu | Gujarati | 100% |
✅ | ht | Haitian Creole | 100% |
✅ | ha | Hausa | 100% |
✅ | b+haw | Hawaiian | 100% |
✅ | iw | Hebrew | 100% |
❌ | hz | Herero | 0% |
❌ | b+hil | Hiligaynon | 0% |
✅ | hi | Hindi | 100% |
❌ | ho | Hiri Motu | 0% |
❌ | b+hmn | Hmong | 0% |
✅ | hu | Hungarian | 100% |
✅ | is | Icelandic | 100% |
❌ | io | Ido | 0% |
✅ | ig | Igbo | 100% |
❌ | b+ilo | Ilokano | 0% |
✅ | in | Indonesian | 100% |
❌ | iu | Inuktitut | 0% |
✅ | ga | Irish | 100% |
✅ | it | Italian | 100% |
✅ | ja | Japanese | 100% |
✅ | jv | Javanese | 100% |
❌ | b+kab | Kabyle | 0% |
✅ | kn | Kannada | 100% |
✅ | b+pam | Kapampangan | 100% |
❌ | ks | Kashmiri | 0% |
❌ | b+csb | Kashubian | 0% |
✅ | kk | Kazakh | 100% |
❌ | km | Khmer | 0% |
✅ | rw | Kinyarwanda | 100% |
❌ | b+tlh | Klingon | 0% |
❌ | kv | Komi | 0% |
❌ | kg | Kongo | 0% |
❌ | b+kok | Konkani | 0% |
✅ | ko | Korean | 100% |
✅ | ku | Kurdish | 100% |
❌ | kj | Kwanyama | 0% |
✅ | ky | Kyrgyz | 100% |
✅ | lo | Lao | 100% |
✅ | la | Latin | 100% |
✅ | lv | Latvian | 100% |
❌ | li | Limburgish | 0% |
✅ | ln | Lingala | 100% |
✅ | lt | Lithuanian | 100% |
❌ | b+jbo | Lojban | 0% |
❌ | b+nds | Low German | 0% |
❌ | b+dsb | Lower Sorbian | 0% |
✅ | lg | Luganda | 100% |
❌ | b+luy | Luhya | 0% |
❌ | lb | Luxembourgish | 0% |
✅ | mk | Macedonian | 100% |
❌ | b+mai | Maithili | 0% |
✅ | mg | Malagasy | 100% |
✅ | ms | Malay | 100% |
✅ | ml | Malayalam | 100% |
✅ | mt | Maltese | 100% |
❌ | gv | Manx | 0% |
✅ | mi | Maori | 100% |
❌ | b+arn | Mapudungun | 0% |
✅ | mr | Marathi | 100% |
❌ | mh | Marshallese | 0% |
❌ | b+moh | Mohawk | 0% |
✅ | mn | Mongolian | 100% |
❌ | b+mos | Mossi | 0% |
❌ | na | Nauru | 0% |
❌ | ng | Ndonga | 0% |
✅ | ne | Nepali | 100% |
❌ | se | Northern Sami | 0% |
✅ | b+nso | Northern Sotho | 100% |
✅ | no | Norwegian | 100% |
✅ | nb | Norwegian Bokmal | 100% |
✅ | nn | Norwegian Nynorsk | 100% |
❌ | oc | Occitan | 0% |
🚧 | or | Odia | 26% |
❌ | oj | Ojibwe | 0% |
✅ | om | Oromo | 100% |
❌ | os | Ossetian | 0% |
❌ | pi | Pali | 0% |
❌ | b+pap | Papiamento | 0% |
✅ | ps | Pashto | 100% |
✅ | fa | Persian | 100% |
✅ | pl | Polish | 100% |
✅ | pt | Portuguese (PT) | 100% |
✅ | pt-rBR | Portuguese (BR) | 100% |
✅ | pa | Punjabi | 100% |
✅ | qu | Quechua | 100% |
✅ | ro | Romanian | 100% |
❌ | rm | Romansh | 0% |
❌ | rn | Rundi | 0% |
✅ | ru | Russian | 100% |
❌ | sg | Sango | 0% |
❌ | sa | Sanskrit | 0% |
🚧 | b+sat | Santali | 80% |
❌ | sc | Sardinian | 0% |
❌ | b+sco | Scots | 0% |
✅ | gd | Scottish Gaelic | 100% |
✅ | sr | Serbian (Cyrillic) | 100% |
❌ | b+sr+Latn | Serbian (Latin) | 0% |
✅ | sn | Shona | 100% |
❌ | ii | Sichuan Yi | 0% |
✅ | sd | Sindhi | 100% |
✅ | si | Sinhala | 100% |
✅ | sk | Slovak | 100% |
✅ | sl | Slovenian | 100% |
✅ | so | Somali | 100% |
❌ | b+son | Songhay | 0% |
❌ | nr | Southern Ndebele | 0% |
❌ | b+sma | Southern Sami | 0% |
❌ | st | Southern Sotho | 0% |
✅ | es | Spanish (ES) | 100% |
✅ | b+es+419 | Spanish (Latin America) | 100% |
✅ | su | Sundanese | 100% |
✅ | sw | Swahili | 100% |
❌ | ss | Swati | 0% |
✅ | sv | Swedish | 100% |
❌ | b+syc | Syriac | 0% |
❌ | tl | Tagalog | 0% |
❌ | ty | Tahitian | 0% |
✅ | tg | Tajik | 100% |
✅ | ta | Tamil | 100% |
✅ | tt | Tatar | 100% |
✅ | te | Telugu | 100% |
✅ | th | Thai | 100% |
❌ | bo | Tibetan | 0% |
✅ | ti | Tigrinya | 100% |
❌ | ts | Tsonga | 0% |
❌ | tn | Tswana | 0% |
✅ | tr | Turkish | 100% |
✅ | tk | Turkmen | 100% |
✅ | uk | Ukrainian | 100% |
❌ | b+hsb | Upper Sorbian | 0% |