Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am not sure that this sort of question is appropriate here, so forgive me if I'm wrong.

Here is a problem: I want to see what a specific program is sending to the internet, but the thing is that on the computer there are lot's of applications and services which are using internet. So it is impossible to figure out what packets where sent by an app I am interested in.

One way is to try to close all other applications, but this is impossible.

So is there a way to isolate a specific application? I am working on windows7 and capturing packets with wireshark

share|improve this question
up vote 7 down vote accepted

Given that you are using Wireshark, your port numbers aren't automatically resolved to an application name, so you will need to do a little more to refine the information you are looking for. Every application using TCP/IP to communicate across a network will be using ports, so that the network stack knows where to deliver segments to (I like to call it an application address).

Clients connecting to a server application on a specific port will be dynamically allocated a port number from a dynamic range. So you first need to find out what TCP/UDP connections your application has open:

netstat -b

at the command line will give you a list of connections with the name of the executable that created the connection. Each executable has one or more connections listed as, where X is the local port number for the connection.

Now in wireshark, you need to tell it to display packets that originated from or are destined to that port by using one or more of the these filters:

tcp.port == xxxxx or udp.port == xxxxx

Add an additional or tcp.port == xxxxx for each connection you want to show.

This will allow you to see all the traffic for the connections your application has open and Wireshark will not include just raw TCP/UDP segments but it will include the various application layer protocols (eg. HTTP) that used those port numbers too.

If your application appears to be communicating with just one server, you could just use the IP address of that server to filter by:

ip.addr == x.x.x.x
share|improve this answer
The biggest problem with sockets (using unreserved ports) is that a socket being opened and closed by an application are very dynamic in nature. When you run netstat -b command it will give u different outcomes for every listed application even if u run it in interval of 5 seconds. So it is very difficult to notice all the port numbers which are getting allocated to my application. I was observing the same for my application in "TCPView" tool (sysInternals suite). I saw that in a span of 10 seconds roughly 15 TCP socket connections were opened by my application and many of them got killed also – RBT Mar 17 at 9:56
This is where Microsoft Network Monitor comes in handy, because it can trace the process that the network communication originates from and groups it under that process. However, since this was written a new major version of Wireshark has been released. It may be the case that such a grouping is also possible using Wireshark, but I haven't used it in a while. – john Mar 20 at 19:27

If you use Process Monitor from Microsoft, you can change the filters to show only network communications from specific processes. It doesn't give you the contents of the packets, but it does show what hosts the app is talking to.

share|improve this answer
? He wanted to see the packets. – Pacerier Jul 24 '15 at 17:56

Microsoft Network Monitor will show you the process responsible for the traffic flow.

share|improve this answer

Just replace My_Application with your application's PNAME or PID

netstat --programs | grep "My_Application"

I don't test it on windows 7. but it works on Linux.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.