mirror of
https://github.com/hak5/bashbunny-payloads.git
synced 2025-10-29 16:58:25 +00:00
Updated nmapper for Bash Bunny v1.1
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# Title: Nmapper for Bash Bunny
|
# Title: Nmapper for Bash Bunny
|
||||||
# Author: Hak5Darren
|
# Author: Hak5Darren
|
||||||
# Version: 1.0
|
# Version: 1.1
|
||||||
#
|
#
|
||||||
# Scans target with nmap using specified options
|
# Scans target with nmap using specified options
|
||||||
# Saves sequential logs to mass storage loot folder
|
# Saves sequential logs to mass storage loot folder
|
||||||
@@ -13,21 +13,23 @@
|
|||||||
# White..........Switching to Mass Storage (optional)
|
# White..........Switching to Mass Storage (optional)
|
||||||
# Green..........Finished
|
# Green..........Finished
|
||||||
#
|
#
|
||||||
|
|
||||||
# See nmap --help for options. Default "-O --fuzzy" profiles target OS.
|
# See nmap --help for options. Default "-O --fuzzy" profiles target OS.
|
||||||
NMAP_OPTIONS="-O --fuzzy"
|
NMAP_OPTIONS="-O --fuzzy"
|
||||||
LOOTDIR=/root/udisk/loot/nmap
|
LOOTDIR=/root/udisk/loot/nmap
|
||||||
|
|
||||||
# Set LED Red while setting up attack
|
|
||||||
LED R
|
|
||||||
|
|
||||||
|
|
||||||
|
######## INITIALIZATION ########
|
||||||
|
LED SETUP
|
||||||
# Use RNDIS for Windows. Mac/*nix use ECM_ETHERNET
|
# Use RNDIS for Windows. Mac/*nix use ECM_ETHERNET
|
||||||
ATTACKMODE RNDIS_ETHERNET
|
ATTACKMODE RNDIS_ETHERNET
|
||||||
#ATTACKMODE ECM_ETHERNET
|
#ATTACKMODE ECM_ETHERNET
|
||||||
|
GET TARGET_IP
|
||||||
|
GET TARGET_HOSTNAME
|
||||||
|
|
||||||
# Source bunny_helpers.sh to get environment variable TARGET_IP and TARGET_HOSTNAME
|
|
||||||
source bunny_helpers.sh
|
|
||||||
|
|
||||||
|
|
||||||
|
######## MAKE LOOT DIRECTORY ########
|
||||||
# Setup named logs in loot directory
|
# Setup named logs in loot directory
|
||||||
mkdir -p $LOOTDIR
|
mkdir -p $LOOTDIR
|
||||||
HOST=${TARGET_HOSTNAME}
|
HOST=${TARGET_HOSTNAME}
|
||||||
@@ -36,20 +38,27 @@ HOST=${TARGET_HOSTNAME}
|
|||||||
COUNT=$(ls -lad $LOOTDIR/$HOST*.log | wc -l)
|
COUNT=$(ls -lad $LOOTDIR/$HOST*.log | wc -l)
|
||||||
COUNT=$((COUNT+1))
|
COUNT=$((COUNT+1))
|
||||||
|
|
||||||
# Check target IP address. If unset, blink RED and end.
|
|
||||||
|
|
||||||
|
######## ERROR IF NO TARGET IP ########
|
||||||
if [ -z "${TARGET_IP}" ]; then
|
if [ -z "${TARGET_IP}" ]; then
|
||||||
LED R 100
|
LED FAIL
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Set LED, nmap target and sync filesystem before optionally switching to mass storage
|
|
||||||
LED G R
|
|
||||||
|
######## ATTACK ########
|
||||||
|
LED ATTACK
|
||||||
nmap $NMAP_OPTIONS $TARGET_IP >> $LOOTDIR/$HOST-$COUNT.log
|
nmap $NMAP_OPTIONS $TARGET_IP >> $LOOTDIR/$HOST-$COUNT.log
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
######## CLEANUP ########
|
||||||
|
LED CLEANUP
|
||||||
sync
|
sync
|
||||||
|
|
||||||
# Optionally become mass storage when scan completes
|
|
||||||
#LED R G B
|
|
||||||
#ATTACKMODE STORAGE
|
|
||||||
|
|
||||||
# Payload complete. Set LED green
|
|
||||||
LED G
|
######## FINISH ########
|
||||||
|
LED FINISH
|
||||||
|
|||||||
Reference in New Issue
Block a user