Arduino-Based HID Keyboard Attack
To create a true BadUSB (HID keyboard attack) using the Social-Engineer Toolkit (SET), the process focuses on generating "keystroke payloads" rather than infected files.
This requires a specific microcontroller (like an Arduino or Teensy) that can emulate a keyboard.
Open your terminal and type:
sudo setoolkit
Then follow this path:
Option 1: Social-Engineering Attacks
→ Option 6: Arduino-Based Attack Vector
SET will offer several ways to compromise the system via "typing."
Common Choice: Option 1 (Windows Shellcode/Meterpreter)
This tells SET to generate a script that will automatically open a command prompt on the target machine and type out a command to download and execute your malware.
LHOST (IP Address):
Enter your VPS IP so the computer knows where to "call home."
LPORT (Port):
Use 443 (HTTPS) to help bypass firewalls.
SET will now generate a block of C++ code (called a "sketch").
What This Means:
This code is NOT a file you copy to a drive; it is the instructions that tell the USB hardware exactly what keys to press (e.g., Press Windows+R, type 'cmd', press Enter...).
Step A: Open the Arduino IDE
→ Copy the code SET generated into the Arduino programming software
Step B: Connect the Device
→ Plug in your specialized USB hardware (Teensy 3.2, Arduino Leonardo, etc.)
Step C: Set Board Type
→ In the IDE, select the specific board you are using
Step D: Upload
→ Click the "Upload" button
This flashes the code directly onto the USB's firmware
When you plug the BadUSB into a victim's computer:
DISCLAIMER
This information is for educational purposes only. Unauthorized access to computer systems is illegal.