From 82824c294c01c54873205ed53e2f6a060f867eb9 Mon Sep 17 00:00:00 2001 From: 90N45 <79598596+90N45-d3v@users.noreply.github.com> Date: Thu, 9 Nov 2023 12:56:32 +0100 Subject: [PATCH 1/2] Add USB-DriveBy Use an USB storage device to deploy payloads on-demand while the Packe Squirrel is already set up and running. --- payloads/general/USB-DriveBy/README.md | 22 +++++++++++++++ payloads/general/USB-DriveBy/payload.txt | 35 ++++++++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 payloads/general/USB-DriveBy/README.md create mode 100644 payloads/general/USB-DriveBy/payload.txt diff --git a/payloads/general/USB-DriveBy/README.md b/payloads/general/USB-DriveBy/README.md new file mode 100644 index 0000000..46362be --- /dev/null +++ b/payloads/general/USB-DriveBy/README.md @@ -0,0 +1,22 @@ +# USB-DriveBy +* Category: General +* Author: 90N45 +* Version: 1.0 + +### Description +Use an USB storage device to deploy payloads on-demand while the Packe Squirrel is already set up and running. + +### Setup +1. Start your Packet Squirrel with the USB-DriveBy payload. +2. Whenever you want to start any payload on-demand, place the payload file with the name `payload.txt` on any compatible USB storage device. +3. When the LED lights up solid green, you can insert the USB storage into the Squirrel’s USB-A port whenever a new payload is needed. + +### Tip: Add an LED indicator to your payloads to indicate that your payloads have finished. +When finished, the USB-DriveBy payload will wait 10 seconds until it executes the script on your USB storage device again (if it is still present). This means that you should know when your payloads have finished and your USB storage device should be unplugged. + +### Status +| LED | State | +| --- | --- | +| Magenta solid (SETUP) | Default network mode will be established | +| Green 1000ms VERYFAST blink followed by SOLID (FINISH) | Listening for USB storage device. Ready to run scripts. | +| Red slow symmetric blinking (FAIL) | No payload file found on USB storage device | \ No newline at end of file diff --git a/payloads/general/USB-DriveBy/payload.txt b/payloads/general/USB-DriveBy/payload.txt new file mode 100644 index 0000000..0ef131c --- /dev/null +++ b/payloads/general/USB-DriveBy/payload.txt @@ -0,0 +1,35 @@ +#!/bin/bash + +# Title: USB-DriveBy +# Description: Use an USB storage device to deploy payloads on-demand +# Author: 90N45 +# Version: 1.0 +# Category: General + +# Choose your preferred default network mode +NETWORK_MODE="TRANSPARENT" + +LED SETUP + +NETMODE ${NETWORK_MODE} + +LED FINISH + +while true; do + # Check for available USB storage + USB_STORAGE && { + # Check for available payload + if [ -f "/usb/payload.txt" ]; then + # Run payload from USB storage + bash /usb/payload.txt + # Sleep to prevent triggering the payload twice unintended + sleep 10 + else + # LED FAIL if file is not on USB storage + LED FAIL + fi + } || { + # Make sure to restore LED color if USB storage is detached after LED FAIL + LED G + } +done \ No newline at end of file From c3465e6e85aec161b893350c7499cbe0d240e5c9 Mon Sep 17 00:00:00 2001 From: 90N45 <79598596+90N45-d3v@users.noreply.github.com> Date: Thu, 9 Nov 2023 13:49:08 +0100 Subject: [PATCH 2/2] Improve README instructions --- payloads/general/USB-DriveBy/README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/payloads/general/USB-DriveBy/README.md b/payloads/general/USB-DriveBy/README.md index 46362be..3baf333 100644 --- a/payloads/general/USB-DriveBy/README.md +++ b/payloads/general/USB-DriveBy/README.md @@ -4,19 +4,20 @@ * Version: 1.0 ### Description -Use an USB storage device to deploy payloads on-demand while the Packe Squirrel is already set up and running. +Use an USB storage device to deploy payloads on-demand while the Packet Squirrel is already set up and running. ### Setup 1. Start your Packet Squirrel with the USB-DriveBy payload. 2. Whenever you want to start any payload on-demand, place the payload file with the name `payload.txt` on any compatible USB storage device. 3. When the LED lights up solid green, you can insert the USB storage into the Squirrel’s USB-A port whenever a new payload is needed. +4. You can unplug your USB storage device at the moment your payload starts ### Tip: Add an LED indicator to your payloads to indicate that your payloads have finished. -When finished, the USB-DriveBy payload will wait 10 seconds until it executes the script on your USB storage device again (if it is still present). This means that you should know when your payloads have finished and your USB storage device should be unplugged. +When your payload is finished, the USB-DriveBy payload will wait 10 seconds until it executes the script on your USB storage device again (if it is still present). This means that you should know when your payloads have finished and your USB storage device should be unplugged at the latest. ### Status | LED | State | | --- | --- | | Magenta solid (SETUP) | Default network mode will be established | | Green 1000ms VERYFAST blink followed by SOLID (FINISH) | Listening for USB storage device. Ready to run scripts. | -| Red slow symmetric blinking (FAIL) | No payload file found on USB storage device | \ No newline at end of file +| Red slow symmetric blinking (FAIL) | No payload file found on USB storage device |