Lecture 3. Scanners


Scanners

  1. What Is a Scanner?

    A scanner is a program that automatically detects security weaknesses in a remote or local host.

  2. How Do Scanners Work?

    Scanners are programs that attack TCP/IP ports and services (Telnet, FTP, ...) and record the response from the target. In this way, they glean valuable information about the target host (for instance, can an anonymous user log in?).

  3. What Will a Scanner Tell Me?

    A scanner might reveal certain inherent weaknesses within the target host. Interpretation of data is usually user's responsibility.

  4. What Won't a Scanner Tell Me?

  5. Are Scanners Legal?

    (?) Do not use it against unauthorized hosts.

  6. Why Are Scanners Important to Internet Security?

    Scanners are important to Internet security because they reveal weaknesses in the network. This information will eventually strengthen Internet security.


Historical Background

Scanner's strengths are in the fact that they are fast, versatile, and accurate. More importantly, they are freely available on the Internet.


The Attributes of a Scanner

The primary attributes of a scanner are

The process with SGI machine as an example


Network Utilities

Some of these are not standard UNIX commands.
  1. host: displays a comprehensive list of hosts within a specified domain.
  2. traceroute: traces the route between two machines. This utility can be used to identify the location of a machine:

  3. finger

  4. showmount: reveals some very interesting information about remote hosts. Most importantly, invoked with the -e command line option, showmount can provide a list of all exported directories on a given target. These directories might or might not be mountable from anywhere on the Internet.


The Scanners

  1. NSS (Network Security Scanner)

    NSS (Network Security scanner) is a very obscure scanner.
    The basic value of NSS is its speed. It is extremely fast. Routine checks that it can perform include the following:


    NOTE: NSS will not allow you to perform Hosts.equiv unless you have root privileges. If this is a critical issue and you do not currently have root, you might want to acquire a copy of Linux, Solaris X86, or FreeBSD. By getting one of these operating systems and installing it at home, you can become root. This is a common problem with several scanners, including SATAN and certain implementations of Internet Security Scanner.

  2. SATAN (Security Administrator's Tool for Analyzing Networks)

  3. Jakal

    Jakal is a stealth scanner. That is, it will scan a domain (behind a firewall) without leaving any trace of the scan.

  4. IdentTCPscan

    IdentTCPscan has the added functionality of picking out the owner of a given TCP port process.

    Port:   7    Service:        (?)    Userid:  root
    Port:   9    Service:        (?)    Userid:  root
    ....
    Port:  80    Service:        (?)    Userid:  root
    ....
    Port: 6000    Service:        (?)    Userid:  root
    By finding the UID of the process, misconfigurations can be quickly identified. The above output shows that shows a serious misconfiguration. Port 80 is running a service as root. It happens that it is running HTTPD. This is a security problem because any attacker who exploits weaknesses in your CGI can run his or her processes as root as well.

  5. CONNECT

    CONNECT is a bin/sh script. Its purpose is to scan subnets for TFTP servers. (These are difficult to find. TFTP is almost always disabled these days.)

  6. ISS Scanners


Some sample scans

  1. Sample scan with target system Linux 1.2.13 (Slackware) using SAFEsuite from Internet Security Systems

  2. Sample scan with target system SunOS 4.1.3 using SATAN from command-line

  3. Sample scan with target system SunOS 4.1.3 using SATAN with Netscape interface

  4. /var/adm/messages of the scanned system shows the trace.
    ....
    Nov 10 21:34:17 SamsHack ps[265]: connect from pm7-6.pacificnet.net
    Nov 10 21:34:17 SamsHack netstat[266]: connect from pm7-6.pacificnet.net
    Nov 10 21:34:17 SamsHack wu.ftpd[268]: connect from pm7-6.pacificnet.net
    Nov 10 21:34:22 SamsHack ftpd[268]: FTP session closed
    Nov 10 21:34:22 SamsHack in.telnetd[269]: connect from pm7-6.pacificnet.net
    Nov 10 21:34:23 SamsHack in.fingerd[271]: connect from pm7-6.pacificnet.net
    Nov 10 21:34:23 SamsHack uucico[275]: connect from pm7-6.pacificnet.net
    Nov 10 21:34:23 SamsHack in.pop3d[276]: connect from pm7-6.pacificnet.net
    Nov 10 21:34:23 SamsHack in.rlogind[277]: connect from pm7-6.pacificnet.net
    Nov 10 21:34:23 SamsHack in.rshd[278]: connect from pm7-6.pacificnet.net
    Nov 10 21:34:23 SamsHack in.nntpd[279]: connect from pm7-6.pacificnet.net
    Nov 10 21:34:28 SamsHack telnetd[269]: ttloop:  read: Broken pipe
    Nov 10 21:34:28 SamsHack nntpd[279]: pm7-6.pacificnet.net connect
    Nov 10 21:34:28 SamsHack nntpd[279]: pm7-6.pacificnet.net refused connection
    Nov 10 21:34:33 SamsHack rlogind[277]: Connection from 207.171.17.199 on illegal port
    ....