Compare commits

...

8 Commits

Author SHA1 Message Date
REDD 3a7c668a15
Merge ae6569125b into dcf527fd86 2024-09-24 16:25:38 -04:00
Peaks dcf527fd86
Merge pull request #65 from BuffBaby253/master
SharkNetSniffer
2024-09-17 18:02:11 -04:00
BuffBaby253 6f8d44d068
Update payload.sh 2024-09-17 12:19:41 -07:00
BuffBaby253 cb64802ff5
Update payload.sh
added variable
2024-09-16 12:25:56 -07:00
BuffBaby253 26040becb0
Create payload.sh 2024-09-15 08:43:02 -07:00
BuffBaby253 4c5fdf62a1
Delete payloads/library/Wireshark PCAP Capture directory 2024-09-15 08:36:23 -07:00
BuffBaby253 4d3431c2e4
Add files via upload 2024-01-11 21:27:04 -08:00
ar1k88 ae6569125b
Fixed issues, added push device.config -
- Fixed Issues with SCP not pushing the correct inputted Variables for FULL PATH's.
- Added Push device.config to Shark Jack.
- Various fixes to prevent wrong files being pushed to the Shark Jack.
2021-01-22 19:19:23 -08:00
2 changed files with 103 additions and 5 deletions

View File

@ -0,0 +1,46 @@
#!/bin/bash
#
# Title: Wireshark PCAP Capture & Examine
# Author: BuffBaby253
# Version: 1.1
#
# Description: uses tcpdump to capture network traffic for 1 minute and saves into pcap
# into loot storage folder for further analysis in Wireshark
#
# Note: If you want to extend the time, change the amount of seconds in line 38
#
# LED SETUP making loot directory and waiting for an ip address from DHCP
# LED ATTACK capturing packets
# LED FINISH the Shark Jack is finished and you can now download saved pcaps to open in Wireshark
LOOT_DIR=/root/loot/pcaps
INTERFACE="eth0"
seconds=60
# preparing for capture
LED SETUP
# setting up loot directory
mkdir -p $LOOT_DIR
COUNT=$(($(ls -l $LOOT_DIR/*.txt | wc -l)+1))
# waiting for ip address
NETMODE DHCP_CLIENT
while [ -z "$IPADDR" ]; do sleep 1 && IPADDR=$(ifconfig eth0 | grep "inet addr"); done
LED ATTACK
# using tcpdump to capture network traffic and save to loot directory
tcpdump -i $INTERFACE -w $LOOT_DIR/net-traffic_$COUNT.txt &
# sleep command will let it run for amount of seconds selected
sleep $seconds
# end capture
killall tcpdump
# the work is done and you can unplug
LED FINISH

View File

@ -121,6 +121,45 @@ function cleanup() {
printf "\n%s\n" "[!] Cleaning up..."
}
function check_suffixdevice(){
if [[ -f $DEVICECONFIGPATH ]]; then
if [[ $DEVICECONFIGPATH != "*/device.config" ]]; then
printf "\n%s\n" "[!] Directory or File was not a valid device.config file."
printf "\n%s\n" "[!] Returning to Main Menu."
main_menu;
fi
fi
if [[ -d $DEVICECONFIGPATH ]]; then
printf "\n%s\n" "[!] Defaulting to device.config since input was a directory."
DEVICECONFIGPATH=$(echo -e "$DEVICECONFIGPATH/device.config")
fi
}
function check_suffixpayload(){
if [[ -f $PAYLOADPATH ]]; then
if [[ $PAYLOADPATH != "*/payload.txt" || $PAYLOADPATH != "*/payload.sh" ]]; then
printf "\n%s\n" "[!] Defaulting to payload.txt since input was a not a normal payload file."
PAYLOADPATH=$(echo -e "$PAYLOADPATH/payload.txt")
fi
fi
if [[ -d $PAYLOADPATH ]]; then
printf "\n%s\n" "[!] Defaulting to payload.txt since input was a directory."
PAYLOADPATH=$(echo -e "$PAYLOADPATH/payload.txt")
fi
}
function get_deviceconfig_path(){
read -p "FULL PATH to the downloaded device.config file (q to return to menu): " DEVICECONFIGPATH
if [[ $DEVICECONFIGPATH == "q" ]]; then
cleart
printf "\n%s\n" "[!] Returning to main menu..."
sleep 2
main_menu
else
[[ ! -e $DEVICECONFIGPATH ]] && printf "\n%s\n" "[!] $DEVICECONFIGPATH does not exist" && sleep 2 && main_menu
fi
}
function get_payload_path(){
read -p "FULL PATH to payload (q to return to menu): " PAYLOADPATH
if [[ $PAYLOADPATH == "q" ]]; then
@ -133,14 +172,25 @@ function get_payload_path(){
fi
}
function push_deviceconfig(){
echo -e "\n [+] Push device.config to Shark Jack"
echo -e "\n----------------------------------------"
get_deviceconfig_path
locate_shark
check_suffixdevice
echo -e "\n [+] Pushing device.config to device..."
scp -r "$DEVICECONFIGPATH" "root@172.16.24.1:/etc/device.config" && echo -e "\n [+] Device.config copied to Shark" || echo -e "\n [!] ERROR copying device.config to Shark"
exitscript 0
}
function push_payload(){
echo -e "\n [+] Push Payload to Shark Jack"
echo -e "\n----------------------------------------"
get_payload_path
locate_shark
check_suffixpayload
echo -e "\n [+] Pushing payload to device..."
EXPANDEDPATH=$(echo $PAYLOADPATH |cd)
scp -r $EXPANDEDPATH root@172.16.24.1:/root/payload/payload.txt && echo -e "\n [+] Payload copied to Shark" || echo -e "\n [!] ERROR copying paylod to Shark"
scp -r "$PAYLOADPATH" "root@172.16.24.1:/root/payload/payload.txt" && echo -e "\n [+] Payload copied to Shark" || echo -e "\n [!] ERROR copying payload to Shark"
exitscript 0
}
@ -329,6 +379,7 @@ function main_menu() {
[$(tput bold)C$(tput sgr0)]onnect - get a shell on your Shark Jack\n\
[$(tput bold)U$(tput sgr0)]pgrade firmware\n\
[$(tput bold)P$(tput sgr0)]ush payload to Shark Jack\n\
Push [$(tput bold)D$(tput sgr0)]evice.config to Shark Jack\n\
[$(tput bold)G$(tput sgr0)]et loot saved on Shark Jack\n\n\
[$(tput bold)R$(tput sgr0)]eset known_hosts keys for the Shark Jack on this system\n\
[$(tput bold)S$(tput sgr0)]etup ssh keys for easy access\n\
@ -342,6 +393,7 @@ function main_menu() {
[gG]) get_loot;;
[rR]) reset_key;;
[sS]) setup_shark;;
[dD]) push_deviceconfig;;
[qQ]) exitscript 0;;
*) main_menu;;
esac