Jump to content

Ducky Scripts w/ Output


SlipperyClock

Recommended Posts

  • 3 months later...

You won't be able to write directly to /root/loot, and I'm guessing you don't actually want to as /root can only be accessed from the BB side (via serial or SSH for example). I'm guessing you mean the root of the BB as it's mounted as a STORAGE device (flashdrive). If you're running firmware 1.3 (IDK about previous ones, I think this works back to 1.1?) there is a variable $SWITCH_POSITION that can be helpful too, for example, in a payload.txt script to put a file (filename) in the loot folder on the root of the flashdrive, you would write to this: /root/udisk/loot/filename if you wanted to write to the switch folder (where you put payload.txt), then write to this: /root/udisk/payloads/$SWITCH_POSITION/loot/filename.

If you are wanting to write to a loot folder on the flashdrive from a Ducky Script instead of from the payload.txt, then you will need to know which OS you are running on. For example, on mac, you can probably write to /Volumes/BashBunny (assuming no major OS changes). On windows, you will need to run some powershell (most common) to figure out what path to write to:

(gwmi win32_volume -f 'label="BashBunny"' | Select-Object -ExpandProperty DriveLetter)

On linux, you may be able to write to write to this, but it depends on the flavor of linux:

/media/`whoami`/BashBunny

 

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.

  • Recently Browsing   0 members

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