In this project i used an arduino mini with a usb rubber ducky to try a HID Attack using a keyboard to start a reverse shell in the victime machine for Windows and Linux but wait what's HID and HID Attack ?
- HID
Human Interface Device, simply it's something that takes input and give output from/to humans like a keyboard or mouse or ..., it's simple right ? XD
- HID-ATTACK
It's a scenario where an attacker uses a keyboard or a mouse to physically attack a machine. As in this project i used a keyboard to lunch a reverse shell, You can use a keyboard to type stuff that makes you control the victim machine or extract data.
- In your machine (Attack Machine)
- Setup a netcat listener using this command
nc -lvnp 4444
- in the code, don't forget to modify the IP and PORT parameters (Attack Machine's IP and PORT)
Some Stupid Instructions that you might forget !
- I recommend using Arduino IDE Choose your version depending on your operation system and Download it
- Connect your arduino board
- To verify the connection go to
Tools > Port You will see "COM4" in windows or "/dev/tty0/ACM0" in Linux
- Choose Your Board go to
Tools > Board and choose your board (Arduino UNO or Arduino Mini)
- If you wanna test your code and debug it go to
Sketch > Verify/Compile
if you wanna send it directlySketch > Upload
For this project you will need an external library that's called Keyboard.h
- For the older version of Arduino
- Download it as a zip file from the github page
- Go to
Sketch > Include a Library > ADD .ZIP Library
- and upload the library
- For the newer versions of Arduino
- Go to
Sketch > Include a Library > Manage Libraries > Search for "Keyboard"
and install it
Arduino Mini any other compatible board
Cable USB A Male To Micro B
Mini Breadboard (Optional)