Jump to content

Live TCPDUMP


AndrewP

Recommended Posts

Posted

Hello,

For context I am very new to this and might be missing/saying something very obvious. I would like to connect my Packet Squirrel in between my laptop and my router to capture the traffic on my laptop. I would like to then send this data to Wireshark via SSH on my PC. I am currently attempting the following code:

#!/bin/bash

# Payload configuration
INTERFACE="wlan0" # Replace with your identified network interface
REMOTE_USER="user" # Replace with your remote machine's username
REMOTE_HOST="PC IPv4" # Replace with your remote machine's IP address
REMOTE_PORT="22" # Replace with your SSH port if it's not the default 22

LED ATTACK

# Start TCPDUMP and pipe the output to SSH
nohup tcpdump -i $INTERFACE -s 0 -U -w - 2>/tmp/tcpdump_error.log | ssh -p $REMOTE_PORT $REMOTE_USER@$REMOTE_HOST "wireshark -k -i -"

Currently I am able to SSH into the packet squirrel on my laptop but not my PC. Am I on the right track/is what I am attempting even possible?

Thank you for any advice. 

Posted

As an alternative method, you could pipe the tcpdump output to netcat on the Squirrel. Then listen on the PC using netcat and pipe that to Wireshark. 

Remember to use a relevant NETMODE on the Squirrel.

Also use a relevant interface to run tcpdump against.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...