11

Something is serving content on my port 80, but I don't know what process is doing this. Is there any way to find out what process is bound to which port(s)?

Update: This is the output of netstat... sadly, nothing appears to be binding port 80. Though my port 80 is still serving information. Is this impossible, or am I missing something? (see below)

Update: After running netstat -anbo and cross-referencing with the processes in the taskmanager, I've found out that skypekit.exe is binding my port 80. However, any further exploration of this problem will probably fall outside of the scope of this question. Just to add, Trillian was using ports 80 and 443 for skypekit.exe and its traffic.

PS D:\> netstat -anbo

Active Connections

  Proto  Local Address          Foreign Address        State           PID
  TCP    0.0.0.0:80             0.0.0.0:0              LISTENING       6664
 [skypekit.exe]
  TCP    0.0.0.0:135            0.0.0.0:0              LISTENING       1280
  RpcSs
 [svchost.exe]
  TCP    0.0.0.0:443            0.0.0.0:0              LISTENING       6664
 [skypekit.exe]
  TCP    0.0.0.0:445            0.0.0.0:0              LISTENING       4
 Can not obtain ownership information
  TCP    0.0.0.0:1025           0.0.0.0:0              LISTENING       916
 [wininit.exe]
  TCP    0.0.0.0:1026           0.0.0.0:0              LISTENING       1480
  eventlog
 [svchost.exe]
  TCP    0.0.0.0:1027           0.0.0.0:0              LISTENING       1568
  Schedule
 [svchost.exe]
  TCP    0.0.0.0:1028           0.0.0.0:0              LISTENING       980
 [lsass.exe]
  TCP    0.0.0.0:1029           0.0.0.0:0              LISTENING       568
 [spoolsv.exe]
  TCP    0.0.0.0:1030           0.0.0.0:0              LISTENING       956
 [services.exe]
  TCP    0.0.0.0:2987           0.0.0.0:0              LISTENING       308
3
  • Something is serving content on my port 80 ... my port 80 is still serving information What's telling you / giving you the impression you're serving content from that port?
    – Bob
    Apr 27, 2012 at 14:30
  • See my answer, you need -anb not -b only! (a gives listening ports) Apr 27, 2012 at 15:02
  • @RedGrittyBrick: I've updated it (though I had to add the -o flag to get PID's)...
    – wen
    Apr 27, 2012 at 19:53

4 Answers 4

17

Try netstat -anb

C:\> netstat -anb

Active Connections

  Proto  Local Address          Foreign Address        State           PID
  TCP    0.0.0.0:80             0.0.0.0:0              LISTENING       1724
  [Apache.exe]

Update: That a in -anb is there for a reason!

C:\> netstat /?

Displays protocol statistics and current TCP/IP network connections.

NETSTAT [-a] [-b] [-e] [-n] [-o] [-p proto] [-r] [-s] [-v] [interval]

  -a            Displays all connections and listening ports.
                                         ^^^^^^^^^^^^^^^^^^^^
                                         ||||||||||||||||||||
5
  • Where is netstat located? Because it's probably not on my PATH.
    – wen
    Apr 27, 2012 at 13:52
  • @Pepijn: %windir%/System32 ? Apr 27, 2012 at 13:55
  • Right... something nuked my PATH... so I guess I found part of my problem. Thanks. ^^
    – wen
    Apr 27, 2012 at 13:58
  • @Pepijn If system32 is out of your path, how did you run cmd? That's a little confusing.
    – Bob
    Apr 27, 2012 at 14:31
  • 1
    @BOb: by Start search, where it just locates the cmd.exe file... I guess? ^^
    – wen
    Apr 27, 2012 at 19:51
4

For future reference, Sysinternals has a lot of great tools for discovering what is happening on your machine. tcpview, for example, gives you real-time monitoring of TCP/UDP sockets, filemon can show you activity related to file accesses ... the list goes on.

2

Just run this PowerShell command and you'll see the name of the process listening on e.g. 443.

Get-Process -Id (Get-NetTCPConnection -LocalPort 443).OwningProcess

Handles NPM(K)    PM(K)     WS(K)     CPU(s)     Id SI ProcessName
------- ------    -----     -----     ------     -- -- -----------
    143     15     3448     11024             4572 0 MySuperServer
0
0

One way is to use netstat -anbo

Active Connections

  Proto  Local Address          Foreign Address        State           PID
  TCP    0.0.0.0:21             0.0.0.0:0              LISTENING       7908
 [filezillaserver.exe]
  TCP    0.0.0.0:135            0.0.0.0:0              LISTENING       468
  RpcSs
 [svchost.exe]
  TCP    0.0.0.0:443            0.0.0.0:0              LISTENING       4588
 [vmware-hostd.exe]

after stopping the vmware-hostd it should be up.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .