Payload Control
In addition to the logic, loops and functions that provide complex payload control, a few additional commands exist to manipulate the execution of a payload.
The
RESTART_PAYLOAD
command ceases any further execution, restarting the payload from the beginning.REM Example RESTART_PAYLOAD
ATTACKMODE HID STORAGE
DELAY 2000
STRINGLN Hello, World!
RESTART_PAYLOAD
STRINGLN Nothing to see here.
- The payload loop typing the "
Hello, World!
" line infinitely. - The "
Nothing to see here.
" string will never be typed.
The
STOP_PAYLOAD
command ceases and further execution.REM Example STOP_PAYLOAD
ATTACKMODE HID STORAGE
DELAY 2000
BUTTON_DEF
STOP_PAYLOAD
END_BUTTON
WHILE TRUE
RANDOM_CHARACTER
END_WHILE
- The payload will continuously type a random character.
- Pressing the button will stop the payload.
Not to be confused with the
RESTART_PAYLOAD
command, the will not change the payload flow. Rather, the RESET
command will clear the HID keystroke buffer. This may be useful while debugging complex hold key states.REM Example RESET
ATTACKMODE HID STORAGE
DELAY 2000
INJECT_MOD
HOLD SHIFT
HOLD a
DELAY 700
RELEASE a
RESET
DELAY 1000
STRING nd reset
- On a Windows or Linux target, the payload may result in
AAAAAAAAAAAAnd reset
- Notice that a
RELEASE SHIFT
command was omitted, and yet thend reset
string is lowercase. This is because theRESET
command released all keys.
Last modified 1yr ago