SlipperyClock Posted March 6, 2017 Share Posted March 6, 2017 New to the Ducky scripts, I have found a few that I would love to run from the bash bunny. I noticed that some of the scripts want to write to a file. How do we get the scripts to write to /root/loot on the bunny? Quote Link to comment Share on other sites More sharing options...
unixnerd777 Posted July 3, 2017 Share Posted July 3, 2017 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.