Answer the question
In order to leave comments, you need to log in
Please tell me an application that can view TCP packets of a specific process
I've been thinking about this for a long time, but now I decided to ask a question. In short, you need a utility that can monitor the traffic driven by some process in the system. Preferably under Linux (but you can also get acquainted with the windows version).
Answer the question
In order to leave comments, you need to log in
The first option is to find the ports and protocols used by the process, and then send wireshark/tcpdump to them
View process ports
sudo netstat -pan | grep <PID>
strace -p <PID> -f -e trace=network -s 10000
For Windows there is Microsoft Network Monitor
Here is an example of usage.
Can it be like this
iptables -A OUTPUT -m owner --gid-owner nflog -j CONNMARK --set-mark 1 iptables -A INPUT -m connmark --mark 1 -j NFLOG --nflog-group 30 iptables -A OUTPUT -m connmark --mark 1 -j NFLOG --nflog-group 30 sudo -g nflog /usr/bin/application dumpcap -i nflog:30 -w uid-1000.pcap
For Windows, there is Local Network Monitor . There you can select a process by PID or process name.
it is possible that I am wrong.
however, in my memory for iptables, there are at least:
- a module that allows you to track the application that is the source of the local package;
- a module that allows you to mark (not by adding information to packets, but only in RAM) packets in accordance with some arbitrary criterion.
With manuals, I'm afraid I can not help.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question