In this live demo I have used the below device and application to setup my HID hacking device.

DEVICE USED : ATTINY85 USB Development Board

APPLICATION USED : Arduino ( For Scripting the program to be uploaded and executed by the device )

Since I done this testing on my live host machine , I have built a fake script pointing to a wallpaper prank site which executes a fake FBI message. Below is the scripting used for this demonstration.

Untitled

Here's a step-by-step explanation of what each part of the script does:

  1. #include "DigiKeyboard.h": This line includes the Digi Keyboard library, which provides functions for simulating keyboard input using the Digi-Spark board.
  2. void setup(): The setup function is a standard part of Arduino sketches but is left empty in this script. It's typically used for one-time initialization tasks. Since this script only performs keyboard emulation, there's no need for any setup.
  3. void loop(): The loop function contains the main code that will be executed repeatedly.
  4. DigiKeyboard.delay(2000);: This line introduces a 2-second delay using DigiKeyboard.delay. It waits for 2000 milliseconds (2 seconds) before proceeding with the next actions.
  5. DigiKeyboard.sendKeyStroke(0);: This line sends a key code of 0, which doesn't correspond to any specific key. It's essentially sending a "null" key press.
  6. DigiKeyboard.delay(3000);: Another delay of 3000 milliseconds (3 seconds) is introduced here.
  7. DigiKeyboard.sendKeyStroke(KEY_R, MOD_GUI_LEFT);: This line simulates pressing the "R" key with the left Windows key (MOD_GUI_LEFT) held down. This keyboard combination is often used to open the "Run" dialog on Windows systems.
  8. DigiKeyboard.delay(3000);: Another 3-second delay.
  9. DigiKeyboard.print("<https://geekprank.com/fbi-warning/>");: This line simulates typing the URL "**https://geekprank.com/fbi-warning/**" as if it were being entered through a physical keyboard.
  10. DigiKeyboard.sendKeyStroke(KEY_ENTER);: After typing the URL, this line simulates pressing the "Enter" key, which would typically open the URL in a web browser.
  11. DigiKeyboard.delay(2000);: A 2-second delay is introduced.
  12. DigiKeyboard.sendKeyStroke(KEY_F11);: This line simulates pressing the F11 key, which is often used to toggle full-screen mode in web browsers.
  13. while (true) { }: Finally, an infinite loop is entered with while (true) which effectively makes the Digi-Spark board continue running and doing nothing until it is physically disconnected.