yangge Posted May 16, 2017 Share Posted May 16, 2017 geihub address: https://github.com/hak5/bashbunny-payloads/tree/master/payloads/library/remote_access/SingleSecondShell it's say: LED ATTACK if [ -f "/root/udisk/payloads/${SWITCH_POSITION}/ducky_script.txt" ]; then QUACK ${SWITCH_POSITION}/ducky_script.txt LED FINISH else LED FAIL echo "Unable to load ducky_script.txt" >> /root/debuglog.txt exit 1 fi look the /root/debuglog.txt say: Unable to load ducky_script.txt why? Quote Link to comment Share on other sites More sharing options...
Dave-ee Jones Posted May 18, 2017 Share Posted May 18, 2017 (edited) We (well, most of us - not all of us otherwise I wouldn't be replying) don't exactly check this forum thread much for Bash Bunny stuff - you should post Bash Bunny stuff in the Bash Bunny forum thread. Link here. In regards to your question: The reason is staring you in the face. 'Why' is the failure in the if statement. I'll run it through in pseudocode; if file "/root/udisk/payloads/$SWITCH_POSITION/ducky_script.txt" exists then Start "/root/udisk/payloads/$SWITCH_POSITION/ducky_script.txt" SUCCESS! else FAIL! end There are multiple errors I am seeing here. Try this: # Removed {} brackets around $SWITCH_POSITION if [ -f "/root/udisk/payloads/$SWITCH_POSITION/ducky_script.txt" ]; then # Changed the path to the ducky_script.txt to its full path (so there is no path errors) QUACK "/root/udisk/payloads/$SWITCH_POSITION/ducky_script.txt" echo "Success!" >> /root/debuglog.txt LED FINISH else LED FAIL echo "Unable to load ducky_script.txt" >> /root/debuglog.txt exit 1 fi See how that goes. I can't see the whole script so I don't know how many other errors like that there are, but that should give you an idea of what to look for. Edited May 18, 2017 by Dave-ee Jones 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.