Windows OS

How Can You Find Out Which Process is Listening on a TCP or UDP Port on Windows

On the Windows system, the Listening ports provide the information about the services and processes waiting to give service to the network requests. TCP and UDP are also used for listening network services. By finding out the port information(port status open or block or data going through which port), the security analyst can find the information about the encrypted data.

This tutorial will look at methods to determine which Windows process is listening on a TCP or UDP port:

So, let’s get started!

Method 1: Find out Which Windows Process is Listening on TCP or UDP Port on Using Resource Monitor

To find out which Windows process is listening on TCP or UDP, follow the below-given procedure.

Step 1: Open Resource Monitor

Firstly, search for “Resource Monitor” in the “Startup” menu and open the highlighted application:

Step 2: Find Listening Ports

Go to the “Network” panel, scroll down to the “Listening port” panel and find out which Windows process is listening on a TCP or UDP port:

Method 2: Find out Which Windows Process is Listening on TCP or UDP Port Using Command Prompt

The Windows command prompt is also used to find out which Windows process is listening to TCP or UDP port. For this purpose, follow up on the steps provided below.

Step 1: Open Command Prompt

Press “Window+R” and type “cmd” in the drop-down menu. Next, click the “OK” button to open the Windows Command Prompt:

Step 2: Find Listening TCP or UDP Port

Utilize the “netstat” command to fetch the list of all ports and pipe out its output to the “find” command as an input using the “|” pipe operator. The “find” command can then filter the “listening” ports with the help of the “/i” option:

>netstat -aon | find /i "listening"

Step 2: Find a Specific Listening Port

You can also provide the port number to get the list of processes listening on the specific port:

>netstat -aon | find /i "listening" |find "1604"

Other netstat command options

Use “netstat” command along with some flags that are listed below:

Option Description
-a Shows all connections and ports that are open.
-b This option displays the program that created each connection or listening port.
-n Addresses and port numbers are shown numerically.
-o The owning process ID for each connection is displayed.

You can also add the combination of the above-given options in the netstat command as follows:

>netstat -abno

We are looking for (PID) process identifiers:

Method 3: Find out Which Windows Process is Listening on TCP or UDP Port Using PowerShell

Windows PowerShell can also be used to determine which process is listening on TCP or UDP port.

Step 1: Find out Which Windows Process is Listening on the TCP port

To confirm which Windows process is listening on that specific TCP port, use the “Get-Process” command and provide the TCP port:

> Get-Process -Id (Get-NetTCPConnection -LocalPort 135).OwningProcess

Step 2: Find out Which Process is Listening on UDP port

Similarly, execute the “Get-Process” command and add the UDP port to find out which process is listening on that UDP port:

> Get-Process -Id (Get-NetUDPEndpoint -LocalPort 137).OwningProcess

Method 4: Find out Which Windows Process is Listening on TCP or UDP Port Using TCPView

TCPView is an online tool that can assist you in fetching the processes listening on TCP or UDP port. Follow the instructions provided below to use TCPView.

Step 1: Download TCPView Installer

First, install the latest version of TCPView:

https://docs.microsoft.com/en-us/sysinternals/downloads/tcpview

Step 2: Install TCPView Tool

Extract and open the TCPView folder and execute the “tcpview.exe” file:

Step 3: View Listening Ports

To check which process is running on TCP ports, select the “TCP v4” and “TCP v6” filters from the toolbar:


If you want to check which process is listening on UDP ports, select the “UDP v4” and “UDP v6” filters:


We have illustrated the easiest methods to find out which port is listening on TCP or UDP port on Windows.

Conclusion

There are many ways to find out which Windows process is listening on a TCP or UDP port. You can either use Resource Monitor or the TCPView GUI applications. Other than that, command line tools can also be utilized for specified purpose, such as Windows PowerShell and Command Prompt. In this tutorial, we have demonstrated the most commonly used approaches to finding out which Windows process is listening on a TCP or UDP port.

About the author

Rafia Zafar

I am graduated in computer science. I am a junior technical author here and passionate about Programming and learning new technologies. I have worked in JAVA, HTML 5, CSS3, Bootstrap, and PHP.