Special Keys

Special Keys

In this section, we’ll cover how to use special keys like modifier keys, function keys, navigation keys, and lock keys in DuckyScript for the NJCTR3000. These keys allow for more complex interaction with the system you’re targeting.

Table of Contents

Modifier Keys

Modifier keys are used in combination with other keys to execute more advanced commands. The NJCTR3000 supports several modifier keys that can be used to perform actions like saving files or switching between windows.

Key DuckyScript Code
SHIFT SHIFT
ALT ALT
CONTROL CONTROL
CTRL CTRL
GUI (Windows key) GUI
FN (Function key) FN

Example

REM Open Task Manager using CTRL + ALT + DEL

CTRL ALT DEL
DELAY 1000
TAB
TAB
TAB
TAB
DELAY 1000
ENTER
DELAY 2000
ALT f
DELAY 1000
STRING n
STRING firefox.exe sigmaiota.uk
DELAY 1000
F11

Function Keys

Function keys can be used for a variety of tasks, such as refreshing a web page or adjusting system settings. The NJCTR3000 allows you to send these keys through DuckyScript.

Key DuckyScript Code
F1 F1
F2 F2
F3 F3
F4 F4
F5 F5
F6 F6
F7 F7
F8 F8
F9 F9
F10 F10
F11 F11
F12 F12

Example

REM Launch and refresh browser using F5
DEFAULT_DELAY 200
GUI
STRING firefox
ENTER
DELAY 2000
F6
STRING https://www.google.com/finance/quote/DOGE-USD?hl=en

REM Refresh page to check if value changed
DELAY 5000
F5
DELAY 1000
F5
DELAY 1000
F5
DELAY 5000

REM Find text in page
F3
STRING doge
F3
F3
F3
F3
F3
F3
F3
DELAY 1000
ESCAPE


REM Open style editor
SHIFT F7
DELAY 5000
SHIFT F7

Navigation Keys

These keys allow you to navigate through documents, websites, and system interfaces. The NJCTR3000 supports various navigation keys that are commonly used in scripts for controlling the target system.

Key DuckyScript Code
UP Arrow UP
DOWN Arrow DOWN
LEFT Arrow LEFT
RIGHT Arrow RIGHT
HOME HOME
END END
PAGE UP PAGEUP
PAGE DOWN PAGEDOWN

Example

REM Scroll down a webpage
PAGEDOWN

Lock Keys

Lock keys toggle states like Caps Lock, Num Lock, and Scroll Lock. These can be used in DuckyScript to control these states on the target machine.

Key DuckyScript Code
CAPS LOCK CAPSLOCK
NUM LOCK NUMLOCK
SCROLL LOCK SCROLLLOCK

Next, learn about the Special Commands which add new features to DuckyScript and allow you to build more powerful payloads.