Jump to content

Recommended Posts

Posted (edited)

Here follows a step by step guide to producing your very first working DuckyScript payload and getting your Duck to quack for the first time.

  1. Take the SD card out of the Ducky and place in a MicroSD card reader.
  2. Insert card reader into PC.
  3. Format the SD card as FAT32 if it is not already formatted.
  4. Download the encoder from the sticky thread on this forum and unzip to any directory on your computer, but not on the MicroSD card. For example, C:\Users\<Specific User>\Downloads\DuckyEncoder
  5. Write your first payload in notepad:
    GUI r
    SLEEP 200
    STRING notepad.exe
    ENTER
    SLEEP 500
    STRING Hello World!
    
  6. Save your script as "source.txt" in the same directory as your encoder, i.e. C:\Users\<Specific User>\Downloads\DuckyEncoder.
  7. Open a command prompt and traverse to your encoder directory, i.e. C:\Users\<Specific User>\Downloads\DuckyEncoder.
  8. Run the following command:
    java -jar encoder.jar -i source.txt
    

    This will encode your script with the default settings. The default keyboard map is en-US and the default output file is called "inject.bin" in the same directory as your encoder.

  9. Copy the newly made inject.bin to your MicroSD card, make sure it is on the root directory.

  10. Swap the SD card back into the Duck and place the Duck into the PC.

If Notepad runs and it says "Hello World!" then everything worked ok and you can move on to some more advanced scripts. There are loads of payloads available on here and on the ducky's github and wiki pages.


If there are any problems, let us know and we can help you out. Search the forums first for solutions to your problem and if you can't find anything, start a new thread with any questions or problems. Please use the de-facto prefix of [Question] in the title of your thread. The best way to diagnose problems with scripts is to run the encoder in debug mode. To do this, during step 8, run the following command instead:

java -jar encoder.jar --debug -i source.txt

Copy and paste the stack-trace as well as your script and we should be able to help.

By the end of this guide, you should have a single file (inject.bin) on your MicroSD card, nothing else.

Welcome to DuckClub. Don't break "Rule 9".

Edited by ApacheTech Consultancy
  • 3 weeks later...
Posted (edited)

hey iam new just got the ducky and doesnt start the first run and have red light on plus especific:green board of the rubber ducky running window 7 professional and cant get the encoder to do things properly if someone could help thanks in advance.i was doing the hello world test.ohhh forgot follow the tutorial to the t but doesnt seem to work in my computer if want to try on linux but iam blind in that one

Edited by yamil515

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...