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

  1.  
  2. -----BEGIN PGP SIGNED MESSAGE-----
  3.  
  4. =============================================================================
  5. CERT(sm) Advisory CA-97.04
  6. Original issue date: January 27, 1997
  7. Last revised: May 8, 1997
  8.               Appendix A - updated vendor information for Hewlett-Packard.
  9.  
  10.               A complete revision history is at the end of this file.
  11.  
  12. Topic: talkd Vulnerability
  13. - -----------------------------------------------------------------------------
  14.  
  15. The CERT Coordination Center has received reports of a vulnerability in
  16. talkd(8) program used by talk(1). By constructing DNS data with particular
  17. characteristics, an intruder can remotely execute arbitrary commands with root
  18. privileges.
  19.  
  20. An exploitation script for this problem has been made publicly available,
  21. and we have received reports of successful root compromises involving the use
  22. of this script.
  23.  
  24. You may be aware of advisories that have been published by other response
  25. teams about this problem. Note that this advisory contains additional material
  26. and covers additional aspects of the vulnerability related to a broader set of
  27. problems of which this particular problem is only a specific instance.
  28.  
  29. The CERT/CC team recommends taking steps to solve the general problem
  30. (Sec. III.A) and installing a vendor patch to address this particular instance
  31. of the problem (Sec. III.B). Until you can install a patch, we urge you to
  32. disable the talkd program(s) at your site.
  33.  
  34. We will update this advisory as we receive additional information.
  35. Please check advisory files regularly for updates that relate to your site.
  36.  
  37. - -----------------------------------------------------------------------------
  38.  
  39. I.   Description
  40.  
  41.      The CERT Coordination Center has received information of a vulnerability
  42.      in the talkd(8) program used by talk(1). talk is a communication program
  43.      that copies text from one user's terminal to that of another, possibly
  44.      remote, user. talkd is the daemon that notifies a user that someone else
  45.      wishes to initiate a talk conversation.
  46.  
  47.      As part of the talk connection, talkd does a DNS lookup for the name
  48.      of the host that the connection is being initiated from. Because there
  49.      is insufficient bounds checking on the buffer where the hostname is
  50.      stored, it is possible to overwrite the internal stack space of talkd.
  51.  
  52.      It is possible to force talkd to execute arbitrary commands by carefully
  53.      manipulating the hostname information. As talkd runs with root
  54.      privileges, this may allow intruders to remotely execute arbitrary
  55.      commands with these privileges.
  56.  
  57.      This attack requires an intruder to be able to make a network connection
  58.      to a vulnerable talkd program and provide corrupt DNS information to that
  59.      host.
  60.  
  61.      This type of attack is a particular instance of the problem described in
  62.      CERT advisory CA-96.04, "Corrupt Information from Network Servers,"
  63.      available from
  64.  
  65.      ftp://info.cert.org/pub/cert_advisories/CA-96.04.corrupt_info_from_servers
  66.  
  67.      Sites that use BIND 4.9.4 Patch Level 1 or later are NOT vulnerable to
  68.      the general class of hostname/ip-address-based buffer overflow attacks
  69.      (including this specific problem).
  70.  
  71.      Be aware that there are different versions of the talkd program.
  72.      Depending on your system, the program may have any of the following
  73.      names: talkd, otalkd, ntalkd.
  74.  
  75.      To determine whether your site allows talk sessions, check
  76.      /etc/inetd.conf:
  77.  
  78.                 # grep -i "^[a-z]*talk" /etc/inetd.conf
  79.  
  80.      Note: An exploitation script for this problem has been made publicly
  81.            available. The CERT/CC has received reports of successful root
  82.            compromises involving the use of this script.
  83.  
  84. II.  Impact
  85.  
  86.      Intruders may be able to remotely execute arbitrary commands with root
  87.      privileges. They do not need access to an account on the system to
  88.      exploit this vulnerability.
  89.  
  90. III. Solution
  91.  
  92.      There are several options available to avoid this problem. We recommend
  93.      that all sites defend against the general class of problem (Sec. A) and
  94.      also install a patch from your vendor (Sec. B). Until you can install a
  95.      patch, we urge you to disable the talkd program(s) at your site (Sec C).
  96.  
  97.      Note that disabling the talkd program will defend against the
  98.      particular attack described in this advisory, but will not defend
  99.      against the general class of network-based attacks that manipulate
  100.      hostname/ip-address information to exploit a vulnerability.
  101.  
  102.  
  103.      A. Defend against the general class of problem
  104.  
  105.         In the general case, the problem described in this advisory is one
  106.         in which the attacker uses particular hostname/ip-address data to
  107.         exploit a vulnerability. The exploitation script mentioned above
  108.         uses the specific case of DNS attacks, but attackers can use other
  109.         hostname/ip-address resolution methods, such as NIS, /etc/hosts,
  110.         and so on.
  111.  
  112.         If the following measures are in place for all hostname/address
  113.         transformation techniques on your system, then your system would be
  114.         immune not only to this particular talkd exploit, but also to the
  115.         general class of hostname/ip-address-based buffer overflow attacks.
  116.  
  117.         1. DNS-Based Attacks
  118.  
  119.         To defend against a DNS-based attack, we encourage you to upgrade to
  120.         BIND 4.9.4 Patch level 1 or later (or your vendor's equivalent). The
  121.         reason is that BIND 4.9.4 Patch Level 1 conforms to the RFC (RFC 952)
  122.         defining valid hostname syntax (described in CERT advisory CA-96.04,
  123.         "Corrupt Information from Network Servers").
  124.  
  125.         Keep in mind that an upgrade to 4.9.5 may require a sendmail upgrade
  126.         because of the POSIX extensions in the latest version of BIND
  127.         (described in CA-96.04). For the latest available version of sendmail,
  128.         please consult the file
  129.  
  130.                 ftp://info.cert.org/pub/latest_sw_versions/sendmail
  131.  
  132.         2. Other Network Information Services
  133.  
  134.         For systems that rely on additional name/address transformation
  135.         techniques (such as NIS, netinfo, and flat files like /etc/hosts),
  136.         using the recommended version of BIND may be insufficient since DNS
  137.         lookups--and therefore hostname/ip-address validation--may be bypassed
  138.         in favor of the alternative technique (NIS, netinfo, etc). Thus, we
  139.         also encourage sites and vendors to include in the suite of resolution
  140.         techniques the same code that BIND uses to validate hostnames and IP
  141.         addresses. This code is described in the next section.
  142.  
  143.         3. In-house Software
  144.  
  145.         Use the hostname and IP address validation subroutines available
  146.         at the locations listed below. Include them in all programs that
  147.         use the result of the hostname lookups in any way.
  148.  
  149.           ftp://info.cert.org/pub/tools/ValidateHostname/IsValid.c
  150.           ftp://ftp.cert.dfn.de/pub/tools/net/ValidateHostname/IsValid.c
  151.  
  152.         The IsValid.c file contains code for the IsValidHostname and
  153.         IsValidIPAddress subroutines. This code can be used to check host
  154.         names and IP addresses for validity according to RFCs 952 and 1123,
  155.         as well as names containing characters drawn from common practice,
  156.         namely "_" and "/".
  157.  
  158.         The following files are in the directory (from the README):
  159.  
  160.         IsValid.l       The lex/flex file containing the code for
  161.                         IsValidHostname and IsValidIPAddress
  162.                         MD5 (IsValid.l) = 2d35040aacae4fb12906eb1b48957776
  163.  
  164.         IsValid-raw.c   The C file created by running flex
  165.                         on IsValid.l
  166.                         MD5 (IsValid-raw.c) = 367c77d3ef84bc63a5c23d90eeb69330
  167.  
  168.         IsValid.c       The edited file created by internalizing
  169.                         variable and function definitions in
  170.                         IsValid-raw.c
  171.                         MD5 (IsValid.c) = ffe45f1256210aeb71691f4f7cdad27f
  172.  
  173.         IsValid.diffs   The set of diffs between IsValid-raw.c
  174.                         and IsValid.c
  175.                         MD5 (IsValid.diffs) = 3619022cf31d735151f8e8c83cce3744
  176.  
  177.         htest.c         A main routing for testing IsValidHostname
  178.                         and IsValidIPAddress
  179.                         MD5 (htest.c) = 2d50b2bffb537cc4e637dd1f07a187f4
  180.  
  181.  
  182.      B. Install a patch from your vendor
  183.  
  184.         Below is a list of the vendors who have provided information. Details
  185.         are in Appendix A of this advisory; we will update the appendix as we
  186.         receive additional information.
  187.  
  188.         If your vendor's name is not on this list, we have not received any
  189.         information. Please contact the vendor directly.
  190.  
  191.            Berkeley Software Design, Inc. (BSDI)
  192.            Cisco Systems
  193.            Data General Corporation
  194.            FreeBSD, Inc.
  195.            Hewlett-Packard Company
  196.            IBM Corporation
  197.            Linux
  198.            NEC Corporation
  199.            The Santa Cruz Operation, Inc. (SCO)
  200.            Silicon Graphics Inc. (SGI)
  201.            Solbourne (Grumman System Support)
  202.            Sun Microsystems, Inc.
  203.  
  204.      C. Disable the talkd program(s)
  205.  
  206.         Until you can install a vendor patch, disable any talkd programs found
  207.         in /etc/inetd.conf by commenting out those lines and restarting inetd.
  208.  
  209.         Example commands executed as root:
  210.  
  211.         # grep -i talk /etc/inetd.conf
  212.         talk    dgram   udp     wait    root  /usr/etc/in.talkd     in.talkd
  213.  
  214.         Comment out *all* references to talkd, otalkd or ntalkd.
  215.         (Comments in /etc/inetd.conf begin with "#".)
  216.  
  217.         After editing /etc/inetd.conf, restart inetd. On many Unix systems,
  218.         this is done by sending the inetd process a HUP signal.
  219.  
  220.         For SYSV:
  221.  
  222.                  # ps -ef | grep inetd | grep -v grep
  223.                  # kill -HUP {inetd PID}
  224.  
  225.         For BSD:
  226.  
  227.                 # ps -aux | grep inetd | grep -v grep
  228.                 # kill -HUP {inetd PID}
  229.  
  230.      Note that disabling talkd will solve the specific problem discussed in
  231.      this advisory. However it will not solve the general problem of
  232.      network-based attacks that manipulate hostname/ip-address information
  233.      to exploit a vulnerability.
  234.  
  235.  
  236. ...........................................................................
  237.  
  238. Appendix A - Vendor Information
  239.  
  240. Below is a list of the vendors who have provided information for this
  241. advisory. We will update this appendix as we receive additional information.
  242. If you do not see your vendor's name, please contact the vendor directly.
  243.  
  244.  
  245. Berkeley Software Design, Inc. (BSDI)
  246. =====================================
  247.    We have released an official patch (U210-035). It's available from our
  248.    patches@BSDI.COM mail-back server or via anonymous ftp at:
  249.  
  250.         ftp://ftp.bsdi.com/bsdi/patches/patches-2.1/U210-035
  251.  
  252.  
  253. Cisco Systems
  254. =============
  255.    Cisco MultiNet for OpenVMS - not vulnerable.
  256.  
  257.  
  258. Data General Corporation
  259. ========================
  260.    Data General is not vulnerable.
  261.  
  262.  
  263. FreeBSD, Inc.
  264. =============
  265.    We have released an advisory dated 1997-01-18, FreeBSD-SA-96:21.
  266.  
  267.   The advisory can be found at:
  268.         ftp://freebsd.org/pub/CERT/advisories/FreeBSD-SA-96:21.talkd.asc
  269.  
  270.    Patches are available at:
  271.         ftp://freebsd.org/pub/CERT/patches/SA-96:21
  272.  
  273.  
  274.  
  275. Hewlett-Packard Company
  276. =======================
  277.   HPSBUX9704-061
  278.   HEWLETT-PACKARD SECURITY BULLETIN: #00061
  279.  
  280.   Description: Security Vulnerability in talkd 
  281.  
  282.   Security Bulletins are available from the HP Electronic 
  283.   Support Center via electronic mail.
  284.  
  285.   User your browser to get to the HP Electronic Support 
  286.   Center page at:
  287.  
  288.            http://us-support.external.hp.com
  289.            (for US, Canada, Asia-Pacific, & Latin-America)
  290.  
  291.            http://europe-support.external.hp.com 
  292.            (for Europe)
  293.  
  294.  
  295.  
  296. IBM Corporation
  297. ===============
  298.    The version of talkd shipped with AIX is vulnerable to the conditions
  299.    described in this advisory.  The APARs listed below will be available
  300.    shortly.  It is recommended that the talkd daemon be turned off until
  301.    the APARs are applied.
  302.  
  303.     AIX 3.2:   APAR IX65474
  304.     AIX 4.1:   APAR IX65472
  305.     AIX 4.2:   APAR IX65473
  306.  
  307.   To Order
  308.   --------
  309.     APARs may be ordered using Electronic Fix Distribution (via FixDist)
  310.     or from the IBM Support Center.  For more information on FixDist,
  311.     reference URL:
  312.  
  313.        http://service.software.ibm.com/aixsupport/
  314.  
  315.     or send e-mail to aixserv@austin.ibm.com with a subject of "FixDist".
  316.  
  317.  
  318.    IBM and AIX are registered trademarks of International Business Machines
  319.    Corporation.
  320.  
  321.  
  322. Linux
  323. ======
  324.    This bug was fixed in Linux NetKit 0.08 which is shipped with all reasonably
  325.    up to date Linux distributions. Linux users using NetKit 0.07 or earlier
  326.    should upgrade to NetKit 0.09. NetKit 0.09 has fixed other bugs and it is
  327.    strongly recommended Linux users upgrade from NetKit 0.08 to NetKit
  328.    0.09. This is available from
  329.       ftp://ftp.uk.linux.org/pub/linux/Networking/base/NetKit-0.09.tar.gz
  330.  
  331.    Some vendors have opted to issue NetKit 0.08 with additional fixes rather
  332.    than 0.09. Consult your vendor for detailed information.
  333.  
  334.    The Linux community would like to thank David A Holland for his continuing
  335.    work on Linux network security.
  336.  
  337.  
  338. NEC Corporation
  339. ===============
  340.         UX/4800             Vulnerable for all versions.
  341.         EWS-UX/V(Rel4.2MP)  Vulnerable for all versions.
  342.         EWS-UX/V(Rel4.2)    Vulnerable for all versions.
  343.         UP-UX/V(Rel4.2MP)   Vulnerable for all versions.
  344.  
  345.    Patches for these vulnerabilities are in progress.
  346.  
  347.    Contacts for further information by e-mail:
  348.  
  349.    UX48-security-support@nec.co.jp
  350.  
  351.  
  352. The Santa Cruz Operation, Inc. (SCO)
  353. ====================================
  354.    SCO is investigating the problem with talkd and will provide updated
  355.    information for this advisory as it becomes available. At this time SCO
  356.    recommends disabling talkd on your SCO system as described herein.
  357.  
  358.  
  359. Silicon Graphics Inc. (SGI)
  360. ===========================
  361.    We are investigating.
  362.  
  363.  
  364. Solbourne (Grumman System Support)
  365. ==================================
  366.    We have examined the Solbourne implementation and found that
  367.    it is vulnerable. Solbourne distributed the Sun application
  368.    under license. We will distribute a Solbourne patch based
  369.    on the Sun patch when it becomes available. For the latest
  370.    information on our patches go to http://ftp.nts.gssc.com/solbourne.html
  371.  
  372.    The workaround of disabling in.talkd can be used.
  373.    as root:
  374.  
  375.         /etc/inetd.conf - comment out the talkd program
  376.         # ps -aux | grep inetd | grep -v grep
  377.         # kill -HUP {inetd PID listed in output of last command}
  378.  
  379.  
  380. Sun Microsystems, Inc.
  381. ======================
  382.    The talkd buffer overflow vulnerability appears to affect at least
  383.    some supported versions of SunOS. Sun therefore expects to release
  384.    patches for all affected versions of SunOS within the next few
  385.    weeks.
  386.  
  387.  
  388. - -----------------------------------------------------------------------------
  389. The CERT Coordination Center thanks AUSCERT for their contribution to this
  390. advisory, including the bulk of the problem description (which appeared in
  391. AUSCERT advisory AA-97.01), and thanks the vendors listed in Appendix A for
  392. their contributions.
  393. - -----------------------------------------------------------------------------
  394.  
  395. If you believe that your system has been compromised, contact the CERT
  396. Coordination Center or your representative in the Forum of Incident Response
  397. and Security Teams (see ftp://info.cert.org/pub/FIRST/first-contacts).
  398.  
  399.  
  400. CERT/CC Contact Information
  401. - ----------------------------
  402. Email    cert@cert.org
  403.  
  404. Phone    +1 412-268-7090 (24-hour hotline)
  405.                 CERT personnel answer 8:30-5:00 p.m. EST(GMT-5) / EDT(GMT-4)
  406.                 and are on call for emergencies during other hours.
  407.  
  408. Fax      +1 412-268-6989
  409.  
  410. Postal address
  411.          CERT Coordination Center
  412.          Software Engineering Institute
  413.          Carnegie Mellon University
  414.          Pittsburgh PA 15213-3890
  415.          USA
  416.  
  417. Using encryption
  418.    We strongly urge you to encrypt sensitive information sent by email. We can
  419.    support a shared DES key or PGP. Contact the CERT/CC for more information.
  420.    Location of CERT PGP key
  421.          ftp://info.cert.org/pub/CERT_PGP.key
  422.  
  423. Getting security information
  424.    CERT publications and other security information are available from
  425.         http://www.cert.org/
  426.         ftp://info.cert.org/pub/
  427.  
  428.    CERT advisories and bulletins are also posted on the USENET newsgroup
  429.         comp.security.announce
  430.  
  431.    To be added to our mailing list for advisories and bulletins, send your
  432.    email address to
  433.         cert-advisory-request@cert.org
  434.  
  435. - ---------------------------------------------------------------------------
  436. Copyright 1997 Carnegie Mellon University
  437. This material may be reproduced and distributed without permission provided
  438. it is used for noncommercial purposes and the copyright statement is
  439. included.
  440.  
  441. CERT is a service mark of Carnegie Mellon University.
  442. - ---------------------------------------------------------------------------
  443.  
  444. This file: ftp://info.cert.org/pub/cert_advisories/CA-97.04.talkd
  445.            http://www.cert.org
  446.                click on "CERT Advisories"
  447.  
  448.  
  449. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  450. Revision history
  451.  
  452. May 8, 1997   Appendix A - updated patch information for Hewlett-Packard.
  453.  
  454. Feb. 7, 1997  Appendix A - added an entry for Cisco Systems.
  455.  
  456. -----BEGIN PGP SIGNATURE-----
  457. Version: 2.6.2
  458.  
  459. iQCVAwUBM3HTz3VP+x0t4w7BAQEiFAP/cVnLXhIGKi69mGMuPNpLpbdnPWckHHSi
  460. jky0GaSyG/pYyrFEPg8qn8F77pRxNBGwohD8lA5VxMJfoPW62XkEEkeOYwyLBdNj
  461. JD7tSGPwQRVzJOrfjcgZa7PQkeINmsTOc89BeM2+8CgI8cmCyQKuJ7jlPbJpaM5A
  462. YD1nxyUkRaw=
  463. =JU7+
  464. -----END PGP SIGNATURE-----
  465.  
  466.