Fortunately, there??™s a way to scan your computer for
open ports so you know which holes to patch.
Start by opening a Command Prompt window (cmd.exe). Then, run the
Active Connections utility by typing:
netstat /a /o
The /a option tells netstat to show all open ports; without it, only ports participating
in active connections would appear. And the /o option shows the
owning process of each port (explained shortly). The report will be displayed
in the Command Prompt window, and will look something like this:
Active Connections
Proto Local Address Foreign Address State PID
TCP annoy:pop3 localhost:4219 TIME_WAIT 0
TCP annoy:3613 javascript-of-unknown:0 LISTENING 1100
TCP annoy:3613 localhost:3614 ESTABLISHED 1100
TCP annoy:3614 localhost:3613 ESTABLISHED 1100
UDP annoy:1035 *:* 1588
UDP annoy:1036 *:* 1588
UDP annoy:1037 *:* 1588
UDP annoy:1038 *:* 1588
UDP annoy:1039 *:* 1588
The width of the Command Prompt window is typically
limited to 80 characters, causing some pretty ugly wordwrapping.
To send the report to a text file (say, report.txt) for
easier viewing, type netstat /a /o > report.txt at the prompt.
426 | Chapter 7: Networking and Internet
The Active Connections utility displays its information in these five columns:
Proto
This will either be TCP or UDP, representing the protocol being used
(see Appendix B).
Local Address
This column has two components, separated by a colon. The first part is
the computer name, which will typically be the name of your computer.
Pages:
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596