Month 5 Box - Cyber Security

Lesson 6 - Advanced USB Ducky Payloads

Advanced USB Ducky Payloads

This lesson shows what HID injection tools can really do, so you understand how attackers think and, more importantly, how defenders prepare. You will run contained, self-cleaning demos on your own machine, and you will learn about more dangerous classes of attack, like fake-Wi-Fi credential phishing, at the level you need to recognize and defend against them. Everything here is for understanding and defense on systems you own or are explicitly permitted to test.

Why this lesson matters for defense

The value of seeing advanced payloads is understanding how much damage is possible in seconds, so you can defend against it. A device posing as a keyboard can type any command you could, which means it can do system-level things: open a command prompt, run scripts, or change settings, all at machine speed. These same techniques have been used in real ransomware, espionage, and credential theft. You study them not to perform them, but to know what you are protecting against.

Contained demos on your own machine

There are safe, self-contained ways to see the mechanism. One example creates a temporary local test user with a system command, then you immediately delete it yourself, so nothing is left behind. Another simply opens PowerShell and prints a harmless message. These run entirely on your own computer, change nothing permanent, and are cleaned up right away. They let you observe how quickly a payload acts without doing harm.

Captive-portal phishing, and how to recognize it

A more dangerous class of attack, which you should understand but not deploy, is captive-portal phishing, sometimes called an evil twin. A device broadcasts an inviting open Wi-Fi network with a trustworthy-sounding name and presents a fake login page that imitates a real brand, asking for an account and password. People who connect and type their credentials hand them straight to the attacker. This is why you must never enter real credentials into a login page that pops up for free public Wi-Fi. The defensive lessons are concrete: distrust open networks with generic names, verify the real network with staff, never reuse passwords, and use multi-factor authentication so a stolen password alone is not enough. This course does not walk through building or deploying such a portal against others, because doing so against non-consenting people is a serious crime; the goal is to recognize and defend against it.

The absolute rule

These capabilities make the ethics non-negotiable. You must not deploy any of this on machines you do not own or lack explicit permission to test, and never against strangers or in public. The contained demos are yours to run on your own computer. Everything else is for understanding the threat and hardening against it. Misuse is illegal and is entirely on the person who does it.

Working through it

Run the contained user demo on your own machine. Upload a script that opens a command prompt and creates a temporary local test user, run it on your own computer, and confirm the user exists.

Clean it up immediately. Delete the test user yourself with the matching command so nothing is left behind. Cleaning up is part of the exercise.

Run a harmless PowerShell demo. Create a payload that opens PowerShell and prints a friendly message, showing the mechanism with zero side effects.

Study captive-portal phishing conceptually. Understand how a fake open network and a look-alike login page harvest credentials, so you can recognize the signs, without building or deploying one against anyone.

Write down the defenses. List how you would protect against both HID injection and captive-portal phishing, from USB skepticism to multi-factor authentication.

Contained demo: create then delete a test user (your machine only)

REM Educational demo. Run ONLY on your own computer.
REM Creates a temporary local test user; you MUST delete it after.

GUI r
DELAY 500
STRING cmd
ENTER
DELAY 500
STRING net user testuser Passw0rd23 /add
ENTER

REM --- CLEAN UP afterward, run this yourself in the command prompt: ---
REM   net user testuser /delete

This shows a payload performing a system action, creating a local user, so you can see the mechanism. You then delete the account yourself, leaving nothing behind. Do this only on your own machine; it is a contained demonstration, not something to run on anyone else's computer.

Harmless PowerShell message

GUI r
DELAY 500
STRING powershell -NoExit Write-Host 'Hello from the T-Dongle'
ENTER

This opens PowerShell and prints a message with no side effects, illustrating that a payload is just fast keyboard input. It changes nothing on the system.

Common mistakes and troubleshooting