-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HashSlingingStasher (HSS) Submission #667
base: master
Are you sure you want to change the base?
Conversation
HSS Version 1.0 commit to theSW4n repo
Fixed support for target directories with spaces in the path
QUACK STRING "n" | ||
QUACK ENTER | ||
QUACK DELAY 500 | ||
QUACK STRING "udisksctl mount -b /dev/disk/by-label/`ls /dev/disk/by-label/ | grep -i BashBunny`" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would recommend using a variable assignment for the drive label as not everyone's configuration will have the default BashBunny
drive label. This makes user configuration much easier.
You can do this by adding it to the top of your payload. For example with line:
DRIVE_LABEL="BashBunny"
QUACK STRING "udisksctl mount -b /dev/disk/by-label/`ls /dev/disk/by-label/ | grep -i $DRIVE_LABEL`"
this will result in the bash bunny injecting
udisksctl mount -b /dev/disk/by-label/BashBunny
If you want the Bash Bunny to also inject | grep -i BashBunny
you need to add escapes. Otherwise the bunny bunny will interpret it as bash. For example:
QUACK STRING "udisksctl mount -b /dev/disk/by-label/\`ls /dev/disk/by-label/ | grep -i $DRIVE_LABEL\`"
this line will result in the bash bunny injecting
udisksctl mount -b /dev/disk/by-label/`ls /dev/disk/by-label/ | grep -i BashBunny`
Assuming you modify it to use the variable DRIVE_LABEL
for the drive label. Please go through and ensure everything is properly escaped and the variable for DRIVE_LABEL
is added.
# Attackmodes: HID, Storage | ||
|
||
# Options | ||
hss_target_directory=/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want to use this variables inside of your other script, you use use export
exporting the variable allows other scripts to call this variable. for example:
hss_target_directory=/
export hss_target_directory
and then you can call it in anther script like normal
$hss_target_directory
# Variables (defined by user in payload.txt) | ||
mountpt=$(mount | grep -i BashBunny | cut -d ' ' -f 3) | ||
lootdir=$mountpt/loot/hss | ||
target_directory=$(grep -hi hss_target_directory $mountpt/HSS/payload.txt | cut -c 22-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Referencing my comment you use use export
exporting the variable inside payload.txt
allows other scripts to call this variable. for example you can modify payload.txt
with:
hss_target_directory=/
export hss_target_directory
and then you can call it in this script like like any other variable.
$hss_target_directory
Please update your variables to use export
Version 1.0 submission of the HashSlingingStasher. This is an exfiltration payload for MacOS, Ubuntu, Manjaro and Kali Linux.