Thursday, January 6, 2011

Determine listening ports (and associaeted processes)

Scenario: You want to determine which ports are listening on an Microsoft server and the belonging process

Run the command netstat -ano |find /i "listening"

The last column shows the PID (ProcessID) the port belongs to. Use Process Explorer (http://technet.microsoft.com/en-us/sysinternals/bb896653) to find out the name of the executable that belongs to the PID .