Rubber Ducky - Arduino UNO

Configuration for Arduino UNO Board:


  1. Download and install the Latest version of Arduino (Recommended: Linux/Mac)
  2. Download Boot-loader Sketch(INO) from reference URL
  3. Open the INO file in the Arduino IDE
  4. Connect a Plain(no other wire connection) Arduino UNO to Laptop via USB cable
  5. In Arduino IDE, Select Tools->Board->Arduino/Genuino UNO
  6. In Arduino IDE, Select Tools->Port->ttyACM0 [Yours could be different. Use dmesg command to identify]
  7. Verify and Upload the Code
  8. Wait for the message “Upload Done” and Disconnect the USB cable 
  9. Make the cable connection as per the below screenshot attached
  10. Connect the USB cable again back to laptop and the boot loader will install by itself
  11. Wait for 1 to 2 min till the boot-loader get installed
  12. Disconnect USB cable from the laptop and disconnect all the jump wire and make the board plain

Configuration for Arduino IDE:


  1. Connect the Board to laptop via USB cable
  2. Navigate File->Preference->Settings->Additional Boards Manager URLs
  3. Enter the URL mentioned in the reference for Addition Board and click OK
  4. Navigate Tools->Board->Boards Manager
  5. Search for “HoodLoader2” and install the latest version
  6. Navigate to Sketch->Include Library->Add a .ZIP Library
  7. Downloaded HID-Library from reference and provide as input

Configuration Final:


  1. Download the Ducky2Arduino code converted from the reference URL
  2. Convert the sample file present inside the folder 
    • [./ducky2arduino.py helloword_ducky.txt helloword_arduino.txt ]
  3. Copy paste the helloworld_arduino in Arduino IDE
  4. Compile and Upload the sketch
  5. Once Upload unplug from the linux/mac and plug it in windows machine to view the output

Note: Windows should be in unlocked state. Not Locked


Arduino Script to Upload(sample):

#include "HID-Project.h"

void setup() {
Keyboard.begin();
delay(500);

// Payload
delay(3000);
Keyboard.press(KEY_LEFT_GUI);
Keyboard.press(KEY_R);
Keyboard.releaseAll();
delay(500);
Keyboard.print("cmd.exe");
delay(500);
Keyboard.write(KEY_ENTER);
delay(750);
Keyboard.print("ipconfig");
Keyboard.write(KEY_ENTER);
}

void loop() { }


Wire Connection Screenshot:





Download Reference:

Latest Version of Arduino:

Bootloader Sketch ino:

Addition Boards Manager:

HID-Library:

Ducky to Arduino:

Reference URL's:





Comments

  1. when compiling the INO code, there is an error which says that:

    duckie_setup:304:25: error: bootloaders.h: No such file or directory

    compilation terminated.

    exit status 1
    bootloaders.h: No such file or directory

    ReplyDelete
    Replies
    1. you just have to download the whole github repository, not just the single sketch

      Delete
  2. Unable to find hoodloader2 in board manager??

    ReplyDelete
  3. /home/kali/Bureau/HoodLoader2-master/avr/examples/Installation_Sketch/Installation_Sketch.ino:511:56: warning: narrowing conversion of '(int)(((unsigned char)((int)(((unsigned char)((int)b)) & 15))) | 48)' from 'int' to 'char' inside { } [-Wnarrowing]
    char buf [4] = { ((b >> 4) & 0x0F) | '0', (b & 0x0F) | '0', ' ' , 0

    ReplyDelete
  4. Arduino:1.8.13 (Windows Store 1.8.42.0) (Windows 10), Scheda:"Arduino Uno"

    In file included from C:\Users\Utente\Documents\Arduino\sketch_mar18a\sketch_ducky2arduino\sketch_ducky2arduino.ino:1:0:

    C:\Users\Utente\Documents\Arduino\libraries\HID-Project\src/HID-Project.h:35:2: error: #error HID Project can only be used with an USB MCU.

    #error HID Project can only be used with an USB MCU.

    ^~~~~

    exit status 1

    Errore durante la compilazione per la scheda Arduino Uno.



    Questo report potrebbe essere più ricco di informazioni abilitando l'opzione
    "Mostra un output dettagliato durante la compilazione"
    in "File -> Impostazioni"

    why??

    ReplyDelete
  5. Does not work on Arduino UNO 😿

    ReplyDelete
  6. UPLOAD A VIDEO ON THIS

    ReplyDelete
  7. What is the purpose of jumper wires? can you explain the circuit please?

    ReplyDelete
  8. Great article, I hope that you will going to post another one.
    JTAG

    ReplyDelete
  9. i dont understand how to do this "Convert the sample file present inside the folder
    [./ducky2arduino.py helloword_ducky.txt helloword_arduino.txt ]"could you please advise how to ...thank you

    ReplyDelete
    Replies
    1. nevermind figured it out but get no keyboard error

      Delete

Post a Comment

Popular posts from this blog

JTAG PIN Identification

CWE vs CVE