From 5de374837d1a9bf78123acdd4a938da5026e8cb1 Mon Sep 17 00:00:00 2001 From: thehermit Date: Sat, 4 Mar 2017 22:19:02 +0000 Subject: [PATCH] Add Boilerplate for Ducky Scripts --- .../library/DuckyTemplate/ducky_script.txt | 9 +++++ payloads/library/DuckyTemplate/payload.txt | 34 +++++++++++++++++++ payloads/library/DuckyTemplate/readme.txt | 25 ++++++++++++++ 3 files changed, 68 insertions(+) create mode 100644 payloads/library/DuckyTemplate/ducky_script.txt create mode 100644 payloads/library/DuckyTemplate/payload.txt create mode 100644 payloads/library/DuckyTemplate/readme.txt diff --git a/payloads/library/DuckyTemplate/ducky_script.txt b/payloads/library/DuckyTemplate/ducky_script.txt new file mode 100644 index 00000000..b0649204 --- /dev/null +++ b/payloads/library/DuckyTemplate/ducky_script.txt @@ -0,0 +1,9 @@ +DELAY 2000 +GUI r +DELAY 1000 +STRING notepad.exe +DELAY 100 +ENTER +DELAY 3000 +STRING https://bunnytoolkit.com running Ducky Script on a Bash Bunny +Enter \ No newline at end of file diff --git a/payloads/library/DuckyTemplate/payload.txt b/payloads/library/DuckyTemplate/payload.txt new file mode 100644 index 00000000..fd568e0e --- /dev/null +++ b/payloads/library/DuckyTemplate/payload.txt @@ -0,0 +1,34 @@ +LED G +ATTACKMODE HID STORAGE + +# Set your language here +LANGUAGE='us' + +LED R G +# Check for switch position to make it easier for us. (can be replaced in the future with bunny helpers) +check_switch() { + switch1=`cat /sys/class/gpio_sw/PA8/data` + switch2=`cat /sys/class/gpio_sw/PL4/data` + switch3=`cat /sys/class/gpio_sw/PL3/data` + echo "--- switch1 = $switch1, switch2 = $switch2, switch3 = $switch3" + if [ "x$switch1" = "x0" ] && [ "x$switch2" = "x1" ] && [ "x$switch3" = "x1" ]; then + SWITCH_POSITION="switch1" + elif [ "x$switch1" = "x1" ] && [ "x$switch2" = "x0" ] && [ "x$switch3" = "x1" ]; then + SWITCH_POSITION="switch2" + elif [ "x$switch1" = "x1" ] && [ "x$switch2" = "x1" ] && [ "x$switch3" = "x0" ]; then + SWITCH_POSITION="switch3" + else + SWITCH_POSITION="invalid" + fi +} + +check_switch + +if [ -f "/root/udisk/payloads/${SWITCH_POSITION}/ducky_script.txt" ]; then + QUACK ${SWITCH_POSITION}/ducky_script.txt + LED G +else + LED R + echo "Unable to load ducky_script.txt" >> /root/debuglog.txt + exit 1 +finotepad.exe diff --git a/payloads/library/DuckyTemplate/readme.txt b/payloads/library/DuckyTemplate/readme.txt new file mode 100644 index 00000000..510b9152 --- /dev/null +++ b/payloads/library/DuckyTemplate/readme.txt @@ -0,0 +1,25 @@ +# Ducky Script Template for Bash Bunnys + +Author: @kevthehermit +Version: Version 1.0 + +## Description + +Boiler Plate for running ducky scripts on the Bash Bunny + +## Configuration + +HID or HID STORAGE + +## Requirements + +Install DuckToolkit payload for extra language support + +## STATUS + +| LED | Status | +| ---------------- | ------------------------------------- | +| Red | Failed to open script file | +| Amber | Script Running | +| Green | Finished | +