How to Make USB Rubber Ducky at Home?

USB Rubber ducky is an HID device that looks similar to a USB Pen drive. It may be used to inject keystroke into a system, used to hack a system, steal victims essential and credential data can inject payload to the victim’s computers. The main important thing about USB Rubber ducky is that it cannot be detected by any Anti-Virus or Firewall as it acts as an HID device. 

How To Make A USB Rubber Ducky?

Android mobiles can also be used to make a USB rubber ducky, if an Android device is rooted we may use it as a Rubber ducky device. And can perform all the operations that an original ducky can perform. 

To Make USB rubber ducky from android : 

  • Android mobile must be rooted
  • Kali net hunter installed on the device

In this article, we must be using some other components to create a USB Rubber Ducky at home. 

Material Requirements

  1. Arduino based board
  2. USB connector
  3. Arduino IDE

Step 1: First of all download Arduino IDE from the link, and install the software like any other software you install on windows. 

Download and Install Arduino IDE


Download and Install Arduino IDE

Step 2: Connect the Arduino board to the computer using the USB connector and open the IDE. 

Step 3: Now from the Payload list choose according to your task. 

Step 4: Convert the code that you have chosen to make executable in Arduino here. 

Script for turning off the Windows Defender 

REM turn off windows defender then clear action center
REM author:geeksforgeeks
REM You take responsibility for any laws you break with this, I simply point out the security flaw
REM start of script
REM let the HID enumerate
DELAY 2000
STRING Windows Defender Settings
DELAY 2000
REM why TAB and HOME?
DELAY 3200
REM windows + a = ????
GUI a 

Convert code to executable

Step 5:In the Arduino IDE creates a new project, by clicking on File–> New project

Create a new Project

Step 6: After converting to new code adding to the Arduino IDE, now select the board which you are using. Tools–>Board–>Your board. 

Select the board

Step 7: Click on the project and choose the port, where Arduino is connected. Tools–>Port–>Your Port. 

Choose the Port on Arduino

Step 8: Now when the board is connected, enter the code or payload you want to work with. 

Enter the code or payload

Step 9: Now verify and compile your code. Sketch–>verify/compile. 

Verify and Compile the code

Step 10: After compiling, upload the code to the Arduino device. 

Upload the code to Arduino Device

Whenever you will Connect this board with any computer it works as a USB rubber ducky and executes the payload written. You can Check about USB rubber ducky in Details Here.

My Personal Notes arrow_drop_up

Check this out nerdboinet

If you like GeeksforGeeks and would like to contribute, you can also write an article using or mail your article to See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

Article Tags :


Please write to us at to report any issue with the above content.