home *** CD-ROM | disk | FTP | other *** search
/ The Hacker's Encyclopedia 1998 / hackers_encyclopedia.iso / hacking / general / cert0068.txt < prev    next >
Encoding:
Text File  |  2003-06-11  |  15.8 KB  |  347 lines

  1.  
  2. -----BEGIN PGP SIGNED MESSAGE-----
  3.  
  4. ===========================================================================
  5. CERT(sm) Advisory CA-93:14
  6. Original issue date: September 30, 1993
  7. Last revised: August 30, 1996
  8.               Information previously in the README was inserted into the
  9.               advisory.
  10.  
  11.               A complete revision history is at the end of this file.
  12.  
  13. Topic: Internet Security Scanner (ISS)
  14. - ---------------------------------------------------------------------------
  15.  
  16. The CERT Coordination Center has received information concerning
  17. software that allows automated scanning of TCP/IP networked computers
  18. for security vulnerabilities.  This software was posted to the
  19. comp.sources.misc Usenet newsgroup.  The software package, known as ISS
  20. or Internet Security Scanner, will interrogate all computers within a
  21. specified IP address range, determining the security posture of each
  22. with respect to several common system vulnerabilities.  The software
  23. was designed as a security tool for system and network administrators.
  24. ISS does not attempt to gain access to a system being tested.
  25. However, given its wide distribution and ability to scan remote
  26. networks, the CERT/CC believes that it is likely ISS will also
  27. be used to locate vulnerable hosts for malicious reasons.
  28.  
  29. While none of the vulnerabilities ISS checks for are new, their
  30. aggregation into a widely available automated tool represents a higher
  31. level of threat to networked machines.  The CERT/CC staff has analyzed
  32. the operation of the program and strongly recommends that administrators
  33. take this opportunity to re-examine systems for the vulnerabilities
  34. described below.  Detailed below are available security tools
  35. that may assist in the detection and prevention of malicious use of
  36. ISS.  Finally, common symptoms of an ISS attack are outlined to allow
  37. detection of malicious use.
  38.  
  39.  
  40. Vulnerabilities probed by ISS
  41. - -----------------------------
  42.  
  43. The following vulnerabilities are currently tested for by the ISS tool.
  44. Administrators should verify the state of their systems and perform
  45. corrective actions as indicated.
  46.  
  47. Default Accounts   The accounts "guest" and "bbs", if they exist, should
  48.                    have non-trivial passwords.  If login access to these
  49.                    accounts is not needed, they should be removed, or
  50.                    disabled by placing a "*" in the password field and the
  51.                    string "/bin/false" in the shell field in /etc/passwd.
  52.                    See the system manual entry for "passwd(1)" for more
  53.                    information on changing passwords and disabling
  54.                    accounts.
  55.  
  56.                    For example, the /etc/passwd entry for a disabled guest
  57.                    account should resemble the following:
  58.  
  59.                    guest:*:2311:50:Guest User:/home/guest:/bin/false
  60.  
  61. lp Account         The account "lp", if it exists, should not allow logins.
  62.                    It should be disabled by placing a "*" in the password
  63.                    field and the string "/bin/false" in the shell field in
  64.                    /etc/passwd.
  65.  
  66. Decode Alias       Mail aliases for decode and uudecode should be disabled
  67.                    on UNIX systems.  If the file /etc/aliases contains
  68.                    entries for these programs, they should be removed, or
  69.                    disabled by placing a "#" at the beginning of the line
  70.                    and then executing the command "newaliases".  Consult
  71.                    the manual page for "aliases(1)" for more information on
  72.                    UNIX mail aliases.
  73.  
  74.                    A disabled decode alias should appear as follows:
  75.  
  76.                    # decode: "|/usr/bin/uudecode"
  77.  
  78. Sendmail           The sendmail commands "wiz" and "debug" should be
  79.                    disabled.  This may be verified by executing the
  80.                    following commands:
  81.  
  82.                    % telnet <hostname> 25
  83.                    220 host Sendmail 5.65 ready at Wed, 29 Sep 93 20:28:46 EDT
  84.                    wiz
  85.                    You wascal wabbit!  Wandering wizards won't win!
  86.                    (or 500 Command unrecognized)
  87.                    quit
  88.  
  89.                    % telnet <hostname> 25
  90.                    220 host Sendmail 5.65 ready at Wed, 29 Sep 93 20:28:46 EDT
  91.                    debug
  92.                    500 Command unrecognized
  93.                    quit
  94.  
  95.                    If the "wiz" command returns "Please pass, oh mighty
  96.                    wizard", your system is vulnerable to attack.  The
  97.                    command should be disabled by adding the following
  98.                    line to the sendmail.cf configuration file containing
  99.                    the string:
  100.  
  101.                    OW*
  102.  
  103.                    For this change to take effect, kill the sendmail
  104.                    process, refreeze the sendmail.cf file, and restart
  105.                    the sendmail process.
  106.  
  107.                    If the "debug" command responds with the string
  108.                    "200 Debug set", you should immediately obtain a newer
  109.                    version of sendmail software from your vendor.
  110.  
  111. Anonymous FTP      Anonymous FTP allows users without accounts to have
  112.                    restricted access to certain directories on the system.
  113.                    The availability of anonymous FTP on a given system may
  114.                    be determined by executing the following commands:
  115.  
  116.                    % ftp hostname
  117.                    Connected to hostname.
  118.                    220 host FTP server ready.
  119.                    Name (localhost:jdoe): anonymous
  120.                    530 User anonymous unknown.
  121.                    Login failed.
  122.  
  123.                    The above results indicate that anonymous FTP is not
  124.                    enabled.  If the system instead replies with the
  125.                    string "331 Guest login ok" and then prompts for a
  126.                    password, anonymous FTP access is enabled.
  127.  
  128.                    The configuration of systems allowing anonymous FTP
  129.                    should be checked carefully, as improperly configured
  130.                    FTP servers are frequently attacked.  Refer to CERT
  131.                    Advisory CA-93:10 for more information.
  132.  
  133. NIS                ISS attempts to guess the NIS domainname.  The program
  134.                    will try to grab the password file from ypserv.
  135.  
  136.                    See CERT Advisory CA-92:13 for more information regarding
  137.                    SunOS 4.x machines using NIS.
  138.  
  139.                    See CERT Advisory CA-93:01 for more information regarding
  140.                    HP machines using NIS.
  141.  
  142. NFS                File systems exported under NFS should be mountable only
  143.                    by a restricted set of hosts.  The UNIX "showmount"
  144.                    command will display the file systems currently exported
  145.                    by a given host:
  146.  
  147.                    % /usr/etc/showmount -e hostname
  148.                    export list for hostname:
  149.                    /usr          hosta:hostb:hostc
  150.                    /usr/local    (everyone)
  151.  
  152.                    The above output indicates that this NFS server is
  153.                    exporting two partitions: /usr, which can be mounted by
  154.                    hosta, hostb, and hostc; and /usr/local which can be
  155.                    mounted by anyone.  In this case, access to the
  156.                    /usr/local partition should be restricted.  Consult the
  157.                    system manual entry for "exports(5)" or "NFS(4P)" for more
  158.                    information.
  159.  
  160. rusers             The UNIX rusers command displays information about
  161.                    accounts currently active on a remote system.  This may
  162.                    provide an attacker with account names or other
  163.                    information useful in mounting an attack.  To check for
  164.                    the availability of rusers information on a particular
  165.                    machine, execute the following command:
  166.  
  167.                    % rusers -l hostname
  168.                    hostname: RPC: Program not registered
  169.  
  170.                    If the above example had instead generated a list of
  171.                    user names and login information, a rusers server is
  172.                    running on the host.  The server may be disabled by
  173.                    placing a "#" at the beginning of the appropriate line
  174.                    in the file /etc/inetd.conf and then sending the SIGHUP
  175.                    signal to the inetd process.  For example, a disabled
  176.                    rusers entry might appear as follows:
  177.  
  178.                    #rusersd/2 dgram rpc/udp wait root /usr/etc/rusersd rusersd
  179.  
  180. rexd               The UNIX remote execution server rexd provides only
  181.                    minimal authentication and is easily subverted.  It
  182.                    should be disabled by placing a "#" at the beginning of
  183.                    the rexd line in the file /etc/inetd.conf and then
  184.                    sending the SIGHUP signal to the inetd process.  The
  185.                    disabled entry should resemble the following:
  186.  
  187.                    #rexd/1 stream rpc/tcp wait root /usr/etc/rexd rexd
  188.  
  189.                    See CERT Advisory CA-92:05 for more information regarding
  190.                    IBM AIX machines using rexd.
  191.  
  192. Available Tools
  193. - ---------------
  194.  
  195. There are several available security tools that may be used to prevent or
  196. detect malicious use of ISS.  They include the following:
  197.  
  198. COPS               The COPS security tool will also detect the
  199.                    vulnerabilities described above.  It is available
  200.                    from ftp://info.cert.org/pub/tools/cops/1.04
  201.  
  202. ISS                Running ISS on your systems will provide you with the
  203.                    same information an attacker would obtain, allowing you
  204.                    to correct vulnerabilities before they can be exploited.
  205.                    Note that the current version of the software is known
  206.                    to function poorly on some operating systems.
  207.  
  208.                    ISS version 3.1 is available from
  209.                    ftp://iss.net/pub/iss/iss13.tar.gz
  210.                    ftp://info.cert.org/pub/tools/iss/
  211.  
  212.                    MD5 checksum for the files:
  213.  
  214.                    MD5 (iss13.tar.gz) = 1caa02756876d41a659a828dae561a92
  215.                    MD5 (iss13.tar) = 793d7a12577de33ba2dac52c2126c938
  216.  
  217.  
  218. TCP Wrappers       Access to most UNIX network services can be more closely
  219.                    controlled using software known as a TCP wrapper.  The
  220.                    wrapper provides additional access control and flexible
  221.                    logging features that may assist in both the prevention
  222.                    and detection of network attacks.  This software is
  223.                    available via anonymous FTP from cert.org in the
  224.                    directory pub/tools/tcp_wrappers.
  225.  
  226.  
  227. Detecting an ISS Attack
  228. - -----------------------
  229.  
  230. Given the wide distribution of the ISS tool, CERT feels that remote
  231. attacks are likely to occur.  Such attacks can cause system warnings
  232. to be generated that may prove useful in tracking down the source of
  233. the attack.  The most probable indicator of an ISS attack is a mail
  234. message sent to "postmaster" on a scanned system similar to the
  235. following:
  236.  
  237.     From: Mailer-Daemon@hostname (Mail Delivery Subsystem)
  238.     Subject: Returned mail: Unable to deliver mail
  239.     Message-Id: <9309291633.AB04591@>
  240.     To: Postmaster@hostname
  241.  
  242.        ----- Transcript of session follows -----
  243.     <<< VRFY guest
  244.     550 guest... User unknown
  245.     <<< VRFY decode
  246.     550 decode... User unknown
  247.     <<< VRFY bbs
  248.     550 bbs... User unknown
  249.     <<< VRFY lp
  250.     550 lp... User unknown
  251.     <<< VRFY uudecode
  252.     550 uudecode... User unknown
  253.     <<< wiz
  254.     500 Command unrecognized
  255.     <<< debug
  256.     500 Command unrecognized
  257.     421 Lost input channel to remote.machine
  258.  
  259.        ----- No message was collected -----
  260.  
  261. According to Eric Allman, the author of sendmail, log information may be
  262. displayed differently depending on the particular configuration and version of
  263. sendmail being used.
  264.  
  265. Typically the most probable indicator of such an attack is a mail message sent
  266. to "postmaster" for the scanned system.  Please note, however, that other
  267. possible indications of an ISS attack for other sendmail configurations may
  268. appear as shown below.
  269.  
  270. For sendmail 8.x, you might see output similar to the following:
  271.  
  272. Apr  8 03:19:17 HOSTNAME sendmail[27374]: wwww.xxx.yyy.zzz [123.456.789.0]: VRFY decode
  273. Apr  8 03:19:18 HOSTNAME sendmail[27375]: wwww.xxx.yyy.zzz [123.456.789.0]: VRFY bbs
  274. Apr  8 03:19:18 HOSTNAME sendmail[27376]: wwww.xxx.yyy.zzz [123.456.789.0]: VRFY lp
  275. Apr  8 03:19:18 HOSTNAME sendmail[27377]: wwww.xxx.yyy.zzz [123.456.789.0]: VRFY uudecode
  276. Apr  8 03:19:18 HOSTNAME sendmail[27372]: "wiz" command from wwww.xxx.yyy.zzz [123.456.789.0]
  277.  
  278. Apr  8 03:19:18 HOSTNAME sendmail[27372]: "debug" command from wwww.xxx.yyy.zzz [123.456.789.0]
  279.  
  280.  
  281. Other versions may display different messages, for example:
  282.  
  283. Apr  8 03:19:19 HOSTNAME ftpd[27378]: FTP LOGIN REFUSED (ftp not in /etc/passwd) FROM wwww.xxx.yyy.zzz [123.456.789.0], anonymous
  284. Apr  8 03:19:19 HOSTNAME ftpd[27378]: USER anonymous
  285. Apr  8 03:19:19 HOSTNAME ftpd[27378]: PASS password
  286. Apr  8 03:19:19 HOSTNAME ftpd[27378]: reply: 503-Login with USER first.
  287. Apr  8 03:19:19 HOSTNAME ftpd[27378]: cmd failure - not logged in
  288. Apr  8 03:19:19 HOSTNAME ftpd[27378]: reply: 530-Please login with USER and PASS.
  289. Apr  8 03:19:19 HOSTNAME ftpd[27378]: PWD
  290. Apr  8 03:19:19 HOSTNAME ftpd[27378]: cmd failure - not logged in
  291. Apr  8 03:19:19 HOSTNAME ftpd[27378]: reply: 530-Please login with USER and PASS.
  292. Apr  8 03:19:19 HOSTNAME ftpd[27378]: MKD test
  293. Apr  8 03:19:19 HOSTNAME ftpd[27378]: cmd failure - not logged in
  294. Apr  8 03:19:19 HOSTNAME ftpd[27378]: reply: 530-Please login with USER and PASS.
  295. Apr  8 03:19:19 HOSTNAME ftpd[27378]: RMD test
  296. Apr  8 03:19:19 HOSTNAME ftpd[27378]: QUIT
  297. Apr  8 03:19:19 HOSTNAME ftpd[27378]: reply: 221-Goodbye.
  298.  
  299.  
  300. - ---------------------------------------------------------------------------
  301. The CERT Coordination Center would like to thank Steve Weeber from
  302. the Department of Energy's CIAC Team for his contribution to this advisory.
  303. - ---------------------------------------------------------------------------
  304.  
  305. If you believe that your system has been compromised, contact the CERT
  306. Coordination Center or your representative in FIRST (Forum of Incident
  307. Response and Security Teams).
  308.  
  309. Internet E-mail: cert@cert.org
  310. Telephone: 412-268-7090 (24-hour hotline)
  311.            CERT personnel answer 8:30 a.m.-5:00 p.m. EST(GMT-5)/EDT(GMT-4),
  312.            and are on call for emergencies during other hours.
  313.  
  314. CERT Coordination Center
  315. Software Engineering Institute
  316. Carnegie Mellon University
  317. Pittsburgh, PA 15213-3890
  318.  
  319. Past advisories, information about FIRST representatives, and other
  320. information related to computer security are available for anonymous FTP
  321. from info.cert.org.
  322.  
  323. Copyright 1993, 1996 Carnegie Mellon University
  324. This material may be reproduced and distributed without permission provided
  325. it is used for noncommercial purposes and the copyright statement is
  326. included.
  327.  
  328. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  329. Revision history
  330.  
  331. Aug. 30, 1996  Information previously in the README was inserted into the
  332.                  advisory.
  333. June 09, 1995  "Available Tools" section - gave pointers to ISS version 3.1
  334. Feb. 02, 1995  "Detecting an ISS Attack" section - added details from the
  335.                  sendmail author about logs
  336.  
  337. -----BEGIN PGP SIGNATURE-----
  338. Version: 2.6.2
  339.  
  340. iQCVAwUBMiNPcXVP+x0t4w7BAQGA5wP9HONeejsQTa2FfZz5CTnPjR4dkm7AOVDa
  341. Xvo7l9CG8YL3+UMGQY0YvIJEbSrLC2DdDdk69JK+6q1IBxFezCuWcCgj1MfLIBPx
  342. Jt8fJFSFzoGI3CGYZdqsIvmXbjW2/f4lE6Ge3JBzMzZfp5t8K4SwaoEHb1dHuS3m
  343. 4WeWXVBmrcw=
  344. =cnXz
  345. -----END PGP SIGNATURE-----
  346.  
  347.