Windows XP: Figure Out What Service is Running on a Specific Port

Finding out what application is running on a specific port in Windows XP is easy by using two command line utilities. By using netstat with the proper switches you can list out all of the ports that are being used and then use Tasklist to list all of the applications that are running. The combination of the two utilities will allow you to figure out which application us using which port. As an example you can use the below directions to figure out what application is using port 80 for instance.

  1. Open Command Prompt: Click Start in the lower left hand corner of your PC and then select Run from the pop up. Type command in the Run window and click Enter to open up the command prompt.
  2. List Ports: Now use the below netstat command to list all of the applications using port 80 for instance. I have cygwin installed which also allows me to use grep. If you do not have this installed simply remove the | grep after the netstat command.

    1. netstat -ano | grep 80

    Example Output:
    C:\>netstat -aon | grep 80
    TCP ESTABLISHED 3260As you can see the local computer is listening to port 80 on every available IP. The last number indicates the PID of the application running on port 80. So you will need to remember that for the next command.

  3. List Running Applications: Now use Tasklist as shown below to list the running applications and their coresponding PID (Process ID). We will be locating whatever application is running using PID 3000.

    1. Tasklist | grep 3000

    Example Output:
    C:\>Tasklist | grep 3000
    Skype.exe 3000 Console 0 9,960 KAs you can see the application using PID 3000 and running on port 80 is Skype.

    Windows Forensic Analysis Including DVD Toolkit (Paperback)

    List Price: $59.95
    New From: $47.10 USD In Stock
    Used from: $0.01 USD In Stock

    Microsoft® Windows® XP Professional Resource Kit (Paperback)

    List Price: $59.99
    New From: $64.80 USD In Stock
    Used from: $0.57 USD In Stock