USB Rubber Ducky
  • USB Rubber Ducky by Hak5
  • Unboxing "Quack-Start" Guide
  • DuckyScript™ Quick Reference
  • Ducky Script Basics
    • Hello, World!
    • Keystroke Injection
    • Comments
    • Delays
  • Basic Input and Output
    • The Button
    • The LED
  • Attack Modes, Constants and Variables
    • Attack Modes
    • Constants
    • Variables
  • Operators, Conditions, Loops and Functions
    • Operators
    • Conditional Statements
    • Loops
    • Functions
  • Advanced Features
    • Randomization
    • Holding Keys
    • Payload Control
    • Jitter
    • Payload Hiding
    • Storage Activity
    • Lock Keys
    • Exfiltration
    • Extensions
    • Conditional Compilation
  • Tips & Troubleshooting
    • Common issues
    • Tips
Powered by GitBook
On this page
  • Overview
  • $_JITTER_ENABLED
  • Example
  • $_JITTER_MAX
  • Example

Was this helpful?

  1. Advanced Features

Jitter

Overview

Jitter is a feature which varies the cadence, or delay, between individual key presses. When enabled, jitter affects all keystroke injection commands. Jitter delays are randomly generated at payload deployment, rather than statically compiled delays such as when using the DELAY command. This means that each deployment of a jitter-enabled payload will produce different results.

$_JITTER_ENABLED

Jitter is enabled and disabled by changing the boolean value of the $_JITTER_ENABLED internal variable. By default the value of this variable is FALSE. To turn jitter on, set the variable to TRUE.

Example

REM Example Jitter

ATTACKMODE HID STORAGE
DELAY 2000

$_JITTER_ENABLED = TRUE
WHILE TRUE
    STRINGLN The quick brown fox jumps over the lazy dog
END_WHILE
  • The test string is typed continuously with a modulated delay between each key press.

$_JITTER_MAX

The $_JITTER_MAX internal variable sets the maximum time between key presses in milliseconds. The default is 20 ms.

Example

REM Example Jitter with increasing $_JITTER_MAX

ATTACKMODE HID STORAGE
DELAY 2000

$_JITTER_ENABLED = TRUE
WHILE TRUE
    STRINGLN The quick brown fox jumps over the lazy dog
    $_JITTER_MAX = ($_JITTER_MAX * 2)
END_WHILE

Result

  • With each iteration of typing the test string the jitter limit is doubled, yielding slower and more sporadic typing.

Last updated 2 years ago

Was this helpful?