Jump to content

bshbunny payload SingleSecondShell not work


yangge
 Share

Recommended Posts

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?

Link to comment
Share on other sites

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 by Dave-ee Jones
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...