[../_includes/Default.htm]

 
  [../_includes/left_top.htm]  

 

Ports - The Doorways to Your Computer

When thinking about securing your machine from unauthorized access or use, considering using the analogy of trying to keep burglars out of a warehouse.  Your first step would be to seal off those entrances that are not essential to the operation of the warehouse, thereby allowing you to focus your attention on specific entrances, rather than the entire building.

Using the above analogy, substitute the word "doorways" for "ports."  Ports are entrances to your machine.  For instance, whenever you go to a website, you are connecting to that company's server on port 80 (unless remapped).  Don't believe me? Try these two links:

bullet http://www.yahoo.com
  • http://www.yahoo.com:80

    Now let's look at what "doors" are open on your computer.  In order to do this we will be using a utility called Netstat.  Netstat provides its user with the network status of the computer from which the command is being sent. Netstat is very comprehensive; below you will find its usage stanza:

    Displays protocol statistics and current TCP/IP network connections.

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

    -a Displays all connections and listening ports.
    -e Displays Ethernet statistics. This may be combined with the -s
    option.
    -n Displays addresses and port numbers in numerical form.
    -p proto Shows connections for the protocol specified by proto; proto may be TCP or UDP. If used with the -s option to display
    per-protocol statistics, proto may be TCP, UDP, or IP.
    -r Displays the routing table.
    -s Displays per-protocol statistics. By default, statistics are
    shown for TCP, UDP and IP; the -p option may be used to specify
    a subset of the default.
    interval Redisplays selected statistics, pausing interval seconds
    between each display. Press CTRL+C to stop redisplaying
    statistics. If omitted, netstat will print the current
    configuration information once.

    There are a lot of options listed, but we are only concerned with the first one:

    -a Displays all connections and listening ports.

    Translation:

    -a Shows you who's in the "warehouse" and and which "doors" are open.

    Now let's do a little.....hacking?  Follow these steps.


    STEP 1 - Launch DOS or Command Prompt

    1. Click on the Start button on the bottom left of your screen.

    2. Next click on the Run.

    3. You will be presented with the Run window which allows you to type in commands.  The command we want to run is cmd to bring up the command prompt or DOS. Type cmd in the window, and click the OK button.

    STEP 2 - Execute netstat -a command

    1. Now you should be looking at the command prompt or DOS window.  This where we can type in our command: netstat -a After you type this command, press Enter.

    STEP 3 - Reading the output

    You should see fours columns on your screen: