bg-wa Posted March 30, 2017 Share Posted March 30, 2017 (edited) So after a week of clean testing I managed to break my bash bunny, somehow messing up the mount point /root/udisk/ (It would not auto-mount and was read-only when manually mounted)... Thanks to @Foxtrot I was able to regain access by re-mounting and changing the permissions: mount -o sync /dev/nandf /root/udisk chown root:root /root/udisk -R chmod 777 /root/udisk -R I still can't write to my individual payload switch folders like I previously could, so I've updated my debug helper to reflect a more accessible directory (/root/udisk/debug): https://github.com/bg-wa/bashbunny-payloads/blob/bunny_debug_helpers/payloads/library/bunny_debug_helpers.sh Again, to use this script: 1.) Include the helper at the top of your script: source bunny_debug_helpers.sh 2.) Pepper your script with log entries to see where events succeed. debug_log "Attack Mode Set" #ln. 41 debug_log "IP Address : ${TARGET_IP}" #ln 92 3.) Plug in Bunny... bash bash bash... 4) When finished, set the Bunny to arming mode and view your debug logs in the newly created "Debug" folder (/root/udisk/debug). Edited March 30, 2017 by bg-wa Quote Link to comment Share on other sites More sharing options...
Dave-ee Jones Posted March 30, 2017 Share Posted March 30, 2017 I'm confused. Is it fixed or no? Quote Link to comment Share on other sites More sharing options...
bg-wa Posted March 31, 2017 Author Share Posted March 31, 2017 (edited) 1 hour ago, Dave-ee Jones said: I'm confused. Is it fixed or no? Yes. When I took the time to write a test, it makes more sense... Basically I had locked myself out of the BashBunny partition where the loot and payload folders live. I couldn't sudo chmod them from the machines I tried, so I had to reset them on the Bunny itself... Somewhere along the lines of the hundreds of times I plugged and unplugged this device, into everything in my house that has a USB port, permissions got changed. Here is a script I wrote after the fact in case it happens again: # At this point I could not write to /root/udisk/loot # or /root/udisk/debug as I could before LED G mkdir /root/udisk/debug touch /test # File 'test' written touch /root/test # File 'test' written touch /root/udisk/test # File NOT written touch /root/udisk/loot/test # File NOT written touch /root/udisk/debug/test # File NOT written touch /root/udisk/payloads/test # File NOT written touch /root/udisk/payloads/switch1/test # File NOT written # Then I ran: # mount -o sync /dev/nandf /root/udisk # chown root:root /root/udisk -R # chmod 777 /root/udisk -R touch /test # File 'test' written touch /root/test # File 'test' written touch /root/udisk/test # File 'test' written touch /root/udisk/loot/test # File 'test' written touch /root/udisk/debug/test # File 'test' written touch /root/udisk/payloads/test # File 'test' written touch /root/udisk/payloads/switch1/test # File 'test' written # Here I could write to my Bunny again LED R G B https://github.com/bg-wa/bashbunny-payloads/blob/bunny_permissions_checker/payloads/library/bunny_permissions_checker/payload.txt Hope that helps someone else along the line. Edited March 31, 2017 by bg-wa 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.