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

  1.  
  2. -----BEGIN PGP SIGNED MESSAGE-----
  3.  
  4. =============================================================================
  5. CERT(sm) Advisory CA-95:15
  6. Original issue date: November 8, 1995
  7. Last revised: August 30, 1996
  8.               Information previously in the README was inserted
  9.               into the advisory.
  10.  
  11.               A complete revision history is at the end of this file.
  12.                     
  13. Topic: SGI lp Vulnerability
  14. - -----------------------------------------------------------------------------
  15.  
  16. The CERT Coordination Center has had several security incidents reported to us
  17. involving the lp account on the Silicon Graphics, Inc. (SGI) IRIX system. As
  18. distributed by SGI, the lp account, as well as other accounts, has no password
  19. on a newly installed system. The lp account, which is used by the lp(1)
  20. program for remote printing, and other accounts are initially configured
  21. without passwords to provide easy "plug-and-play" install and operation.
  22. However, these password-less accounts are well known by intruders and allow
  23. unintended access to your system.
  24.  
  25. In the documentation that SGI distributes with their systems, these
  26. password-less accounts are specifically addressed in the "IRIX Advanced Site
  27. and Server Administrative Guide" in the chapter on System Security. The
  28. documentation recommends disabling the login for the lp account. It also
  29. recommends that you create passwords for the following accounts immediately:
  30. demos, guest, lp, nuucp, root, tour, tutor, and 4Dgifts. The documentation
  31. includes guidelines for choosing good passwords.
  32.  
  33. To determine if your system is vulnerable, use the following command as
  34. root to display the status of all password-less accounts:
  35.  
  36.         # /bin/passwd -sa | /bin/awk '$2 == "NP" {print $0}'
  37.  
  38. If this command displays any accounts, especially the lp account, then
  39. your system is vulnerable. To address this vulnerability, we recommend
  40. using the workarounds in Section III below.
  41.  
  42. We will update this advisory as we receive additional information.
  43. Please check advisory files regularly for updates that relate to your site.
  44. - -----------------------------------------------------------------------------
  45.  
  46. I.   Description
  47.  
  48.      The SGI IRIX system as distributed has some accounts without
  49.      passwords. Among the accounts that are password-less is the lp
  50.      account. This account is used in part by the lp(1) program to manage
  51.      object and spooled data files in the /var/spool/lp directory (for IRIX
  52.      4.X, this directory is /usr/spool/lp). The account is created without a
  53.      password because lp(1) uses rsh(1) to transfer files from print clients
  54.      to print servers.
  55.  
  56. II.  Impact
  57.  
  58.      Remote users can gain access to systems without authentication. The level
  59.      of privilege gained depends on the password-less account used to access a
  60.      system. 
  61.  
  62.      Although the scope of this advisory is the lp account, keep in mind that
  63.      any account without a password (or with an easy-to-guess password) is a
  64.      point for access without authentication. 
  65.  
  66. III. Solution
  67.  
  68.      The general solution is to lock all accounts that do not have
  69.      passwords. Section A below describes how to do that.
  70.      
  71.      Section B suggests one way to re-enable print client to print server
  72.      communication.
  73.      
  74.      A. Lock each password-less account.
  75.          
  76.         Store the following script in /tmp/CheckPasswords for example and
  77.         then run it as root on your machine to lock each password-less
  78.         account. The password installed will not allow the accounts to be 
  79.         used as login accounts. See the passwd(1) manual page for more
  80.         details. Note that this script only locks accounts on the local 
  81.         machine. If there are password-less accounts in NIS, those accounts 
  82.         will not be locked by this script.
  83.  
  84.         ------------------------cut here--8<------------------------
  85.         #!/bin/sh
  86.         for account in `/bin/passwd -sa | /bin/awk '$2 == "NP" {print $1}'`
  87.         do
  88.                 /bin/echo Locked the $account account
  89.                 /bin/passwd -l $account
  90.         done
  91.         ------------------------cut here--8<------------------------
  92.  
  93.         The first time the script is run, it should display something
  94.         similar to the following:
  95.  
  96.                 # sh /tmp/CheckPasswords
  97.                 Locked the tutor account
  98.                 Locked the tour account
  99.                 Locked the lp account
  100.                 ...
  101.  
  102.         If the script locked an account, run the script again. This
  103.         time it should produce no output because all password-less
  104.         accounts have now been locked.
  105.  
  106.      B. Re-enable print client to print server communication.
  107.  
  108.         (We have verified with SGI that you can use the script in this section
  109.         to re-enable the print client to print server communication. SGI has
  110.         asked us to make it clear, however, that they do not have the
  111.         resources to handle issues relating to the use of wrappers.) 
  112.  
  113.         Note that, in general, the CERT Coordination Center recommends
  114.         that the rlogin and rsh services be blocked at your Internet
  115.         routers and turned off on all of your machines. If you have turned
  116.         the rsh service off on your print server, you will need to turn it
  117.         back on on that machine. If you decide to do this, we strongly
  118.         recommend that you install and use a TCP/IP wrapper program to
  119.         restrict the set of machines that can connect to your print server's
  120.         rsh service. A TCP/IP wrapper program is available from
  121.  
  122.           ftp://info.cert.org/pub/tools/tcp_wrappers/tcp_wrappers_7.2.tar.Z
  123.         
  124.           MD5 (tcp_wrappers_7.2.tar.Z) = 883d00cbd2dedd9bfc783b7065740e74
  125.  
  126.  
  127.         Once the rsh service is turned on on your print server and a TCP/IP
  128.         wrapper program installed and configured, you then need to define
  129.         the set of machines that can communicate with your print server.
  130.  
  131.         For each IRIX system that controls a printer, the lp account
  132.         needs to be changed to re-enable print client to print server
  133.         communication. To do this, the lp account on each print server
  134.         needs a .rhosts file in lp's home directory, typically
  135.         /var/spool/lp (for IRIX 4.X, this directory is /usr/spool/lp).
  136.         The owner and group of this file must be the same as that of the
  137.         lp account. Its contents are lines of the form:
  138.  
  139.                 print_client_name       lp
  140.  
  141.         Each line identifies the name of the print client and indicates
  142.         that the lp account is the account that is allowed to rsh from 
  143.         the print client to the print server.
  144.         
  145.         The following shows an example of configuring communication from
  146.         a print client (named "client") to a print server. This
  147.         configuration need only be done on a print server. The ping
  148.         command is used to determine the print client's formal name
  149.         according to whatever host resolution scheme is in place.
  150.         That name is stored in the .rhosts file. The last two lines,
  151.         the ping and the echo, need to be repeated for each client of
  152.         a print server.
  153.  
  154.         # /bin/awk -F: '$1 == "lp" {print $0}' /etc/passwd
  155.         lp:*LK*:9:9:Print Spooler Owner:/var/spool/lp:/bin/sh
  156.         # cd `/bin/awk -F: '$1 == "lp" {print $6}' /etc/passwd`
  157.         # /bin/touch .rhosts
  158.         # /bin/chown lp .rhosts
  159.         # /bin/chgrp lp .rhosts
  160.         # /bin/chmod 600 .rhosts
  161.         # /usr/etc/ping -c 1 client | /bin/awk '$1 == "PING" {print $2}'
  162.         client.YourDomain
  163.         # /bin/echo client.YourDomain lp >> .rhosts
  164.  
  165.  
  166. - ---------------------------------------------------------------------------
  167. The CERT Coordination Center staff thanks Silicon Graphics Inc. and
  168. Christopher Kranz of Princeton University for their support in responding to
  169. this problem. 
  170. - ---------------------------------------------------------------------------
  171.  
  172. If you believe that your system has been compromised, contact the CERT
  173. Coordination Center or your representative in the Forum of Incident
  174. Response and Security Teams (FIRST).
  175.  
  176. If you wish to send sensitive incident or vulnerability information to
  177. CERT staff by electronic mail, we strongly advise that the email be
  178. encrypted. The CERT Coordination Center can support a shared DES key, PGP
  179. (public key available via anonymous FTP on info.cert.org), or PEM (contact
  180. CERT staff for details).
  181.  
  182. Internet email: cert@cert.org
  183. Telephone: +1 412-268-7090 (24-hour hotline)
  184.            CERT personnel answer 8:30 a.m.-5:00 p.m. EST(GMT-5)/EDT(GMT-4),
  185.            and are on call for emergencies during other hours.
  186. Fax: +1 412-268-6989
  187.  
  188. Postal address:  CERT Coordination Center
  189.                  Software Engineering Institute
  190.                  Carnegie Mellon University
  191.                  Pittsburgh, PA 15213-3890
  192.                  USA
  193.  
  194. CERT advisories and bulletins are posted on the USENET newsgroup
  195. comp.security.announce. If you would like to have future advisories and
  196. bulletins mailed to you or to a mail exploder at your site, please send mail
  197. to cert-advisory-request@cert.org.
  198.  
  199. Past CERT publications, information about FIRST representatives, and
  200. other information related to computer security are available for anonymous
  201. FTP from info.cert.org. 
  202.  
  203.  
  204. Copyright 1995, 1996 Carnegie Mellon University
  205. This material may be reproduced and distributed without permission provided it
  206. is used for non commercial purposes and the copyright statement is included.
  207.  
  208. CERT is a service mark of Carnegie Mellon University.
  209.  
  210. =============================================================================
  211. UPDATES
  212.  
  213. Silicon Graphics, Inc. have issued a Security Advisory
  214. concerning this vulnerability (19951002-01-I). Their advisory
  215. can be obtained from
  216.  
  217.         ftp://sgigate.sgi.com/security
  218.  
  219. We have received additional information from one member of our
  220. constituency regarding the vulnerability in the SGI printing system
  221. and the accounts without passwords. The supercomputer NEC SX-3 running
  222. "SUPER-UX unix 5.10 1 SX-3" (which is very similar to IRIX) also has
  223. the same vulnerability.
  224.  
  225. (As far as we are aware there are only about 30 machines [in the world]
  226. running this OS.)
  227.  
  228. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  229. Revision history
  230.  
  231. Aug. 30, 1996  Information previously in the README was inserted
  232.                into the advisory.
  233. Dec. 20, 1995  Updates section - Added a pointer to SGI advisory and a note
  234.                about the supercomputer NEC SX-3.
  235.  
  236. -----BEGIN PGP SIGNATURE-----
  237. Version: 2.6.2
  238.  
  239. iQCVAwUBMiS7C3VP+x0t4w7BAQEEdQP+M1ZEdVG24vtpzRDBOG2lV7sekEwvb4Ms
  240. ljSiK2bTiBZHHI8llWeP5PS7DbiyLHo+ZV+dGdFOYdygWvpHgEZPdxb4s8ZhZf7X
  241. RCBuckD7/dY4LfUGqSH2Z+09eJDr+FdCVXTms5eGmp7d/v4OEiB8VmSOhKUjGOlg
  242. c/xD4a2EWnE=
  243. =eQd0
  244. -----END PGP SIGNATURE-----
  245.  
  246.