How to Use NETSTAT to Locate TCP Socket Connections
Overview
Locating an application that is using a TCP Socket is vital to troubleshooting a conflict. NETSTAT is a built in Windows tool.
Requirements
- Local Administrator Rights
- Experience with Command Prompt
Using NETSTAT
- Open an elevated Command Prompt
- Run the following command: netstat -ano | find "[socketnumber]"

- The above example shows PID 1952 is listening on TCP socket 1024
- This will return the process ID (PID) of the application using the TCP socket
- Run the following command: tasklist | find "[pid]"

- The above example shows PID 1952 is PDNC.exe
- In conclusion, we now know TCP Socket 1024 is being used by PDNC.exe