home *** CD-ROM | disk | FTP | other *** search
/ Forum of Incident Response & Security Teams / Forum_of_Incident_Response_and_Security_Teams_FIRST_October_1994.iso / teaminfo / nasirc / nasa9402.txt < prev    next >
Text File  |  1994-07-02  |  17KB  |  393 lines

  1.  
  2.    NASIRC BULLETIN #94-02                                   February 4, 1994
  3.  
  4.           Network Monitoring Vulnerability and System Breakins
  5.        ===========================================================
  6.              __    __      __      ___   ___  ____     ____  
  7.             /_/\  /_/|    /_/     / _/\ /_/| / __/ \  / __/\ 
  8.             | |\ \| ||   /  \ \   | /\/ | || | /\ \/  | | \/ 
  9.             | ||\ \ ||  / /\ \ \   \ \  | || |_\/ /\  | |    
  10.             | || \ \|| / /--\ \ \ /\_\\ | || | |\ \ \ | \_/\ 
  11.             |_|/  \_|//_/    \_\/ \/__/ |_|/ |_| \_\/ \___\/ 
  12.            NASA Automated Systems Incident Response Capability
  13.        ===========================================================
  14.  
  15.       NASIRC has received the following information pertaining to network
  16. monitoring vulnerabilities associated with systems connected to the Internet
  17. or any private TCP/IP network.  NASIRC will continue to monitor the situation 
  18. and post additional information as it becomes available.  The following
  19. guidelines have been extracted (with minor modifications) from the CERT
  20. Coordination Center's Advisory CA-94:01 and CIAC Advisory E-09, and full
  21. credit is given to them. 
  22.  
  23. [Beginning of modified CIAC extract.]
  24.  
  25. NASIRC and other response teams affiliated with the Forum of Incident
  26. Response and Security Teams (FIRST) have observed many compromised systems
  27. surreptitiously monitoring network traffic, obtaining username, password,
  28. host-name combinations (and potentially other sensitive information) as
  29. users connect to remote systems using TELNET, RLOGIN, AND FTP. This is for
  30. both local and wide area network connections. The intruders may (and
  31. presumably do) use this information to compromise new hosts and expand the
  32. scope of their attacks. Once system administrators discover a compromised
  33. host, they must presume monitoring of all network transactions from or to
  34. any host "visible" on the network has taken place for the duration of the
  35. compromise, and that intruders potentially possess any of the information
  36. so exposed. 
  37.  
  38. The attacks proceed as follows:
  39.  
  40.       The intruders gain unauthorized, privileged access to a host that
  41. supports a network interface capable of monitoring the network in "promiscuous
  42. mode," reading every packet on the network whether addressed to the host or
  43. not. They accomplish this by exploiting unpatched vulnerabilities or learning
  44. a username, password, host-name combination from the monitoring log of another
  45. compromised host. 
  46.  
  47.       The intruders then install a network monitoring tool that captures and 
  48. records the initial portion of all network traffic for FTP, TELNET, AND RLOGIN
  49. sessions. They typically also install "Trojan" programs for LOGIN, PS, and
  50. TELNETD to support their unauthorized access and other clandestine
  51. activities.
  52.  
  53. System administrators must begin by determining if intruders have compromised
  54. their systems. The CERT Coordination Center has released a tool to detect
  55. network interface devices in promiscuous mode. Instructions for obtaining and
  56. using the tool appears later in this bulletin--the tool is available via
  57. anonymous ftp. If a site discovers that intruders have compromised their
  58. systems, the site must determine the extent of the attack and perform recovery
  59. as described below.  System administrators must also prevent future attacks as
  60. described below. 
  61.  
  62. NASIRC advises system administrators to follow the steps described below.
  63. The following guidelines have been extracted (with minor modifications) from
  64. the CERT Coordination Center's Advisory CA-94:01, and full credit is given
  65. to them. 
  66.  
  67. [End of modified CIAC extract.]
  68.  
  69. [Beginning of CERT extract.]
  70.  
  71.      A.  Detection
  72.  
  73.          The network monitoring tool can be run under a variety of
  74.          process names and log to a variety of filenames.  Thus, the
  75.          best method for detecting the tool is to look for 1) Trojan
  76.          horse programs commonly used in conjunction with this attack,
  77.          2) any suspect processes running on the system, and 3) the
  78.          unauthorized use of /dev/nit.
  79.  
  80.          1) Trojan horse programs: 
  81.  
  82.          The intruders have been found to replace one or more of the
  83.          following programs with a Trojan horse version in conjunction
  84.          with this attack:
  85.  
  86.            /usr/etc/in.telnetd 
  87.            and /bin/login -  Used to provide back-door access for the
  88.                              intruders to retrieve information
  89.            /bin/ps  - Used to disguise the network monitoring process
  90.            
  91.          Because the intruders install Trojan horse variations of
  92.          standard UNIX commands, CERT recommends not using other
  93.          commands such as the standard UNIX sum(1) or cmp(1) commands
  94.          to locate the Trojan horse programs on the system until these
  95.          programs can be restored from distribution media, run from
  96.          read-only media (such as a mounted CD-ROM), or verified using
  97.          cryptographic checksum information.
  98.          
  99.          In addition to the possibility of having the checksum
  100.          programs replaced by the intruders, the Trojan horse programs
  101.          mentioned above may have been engineered to produce the same
  102.          standard checksum and timestamp as the legitimate version.
  103.          Because of this, the standard UNIX sum(1) command and the
  104.          timestamps associated with the programs are not sufficient to
  105.          determine whether the programs have been replaced.
  106.  
  107.          CERT recommends that you use both the /usr/5bin/sum and
  108.          /bin/sum commands to compare against the distribution media
  109.          and assure that the programs have not been replaced.  The use
  110.          of cmp(1), MD5, Tripwire (only if the baseline checksums were
  111.          created on a distribution system), and other cryptographic
  112.          checksum tools are also sufficient to detect these Trojan
  113.          horse programs, provided these programs were not available
  114.          for modification by the intruder.  If the distribution is
  115.          available on CD-ROM or other read-only device, it may be
  116.          possible to compare against these volumes or run programs off
  117.          these media.
  118.  
  119.          2) Suspect processes: 
  120.  
  121.          Although the name of the network monitoring tool can vary
  122.          from attack to attack, it is possible to detect a suspect
  123.          process running as root using ps(1) or other process-listing
  124.          commands.  Until the ps(1) command has been verified against
  125.          distribution media, it should not be relied upon--a Trojan
  126.          horse version is being used by the intruders to hide the
  127.          monitoring process.  Some process names that have been
  128.          observed are sendmail, es, and in.netd.  The arguments to the
  129.          process also provide an indication of where the log file is
  130.          located.  If the "-F" flag is set on the process, the
  131.          filename following indicates the location of the log file
  132.          used for the collection of authentication information for
  133.          later retrieval by the intruders.
  134.  
  135.          If the network monitoring tool is currently running on your
  136.          system, it is possible to detect this by checking for
  137.          unauthorized use of the /dev/nit interface.  CERT has created
  138.          a minimal tool for this purpose.  The source code for this
  139.          tool is available via anonymous FTP on nasirc.nasa.gov in the
  140.          /toolkits/UNIX/cpm directory as cpm.1.0.tar.Z.  The checksum
  141.          information is:
  142.  
  143.          Filename                Standard UNIX Sum         System V Sum
  144.         --------------           -----------------         ------------
  145.          cpm.1.0.tar.Z:               11097 6                 24453 12 
  146.  
  147.          MD5 Checksum
  148.          MD5 (cpm.1.0.tar.Z) = e29d43f3a86e647f7ff2aa453329a155
  149.  
  150.          This archive contains a readme file, also included at the end
  151.          of this extract, containing instructions on installing and
  152.          using this detection tool.
  153.  
  154.      B.  Prevention
  155.  
  156.          There are two actions that are effective in preventing this
  157.          attack.  A long-term solution requires eliminating
  158.          transmission of clear-text passwords on the network.  For
  159.          this specific attack, however, a short-term workaround
  160.          exists.  Both of these are described below.
  161.  
  162.          1) Long-term prevention:
  163.  
  164.          CERT recognizes that the only effective long-term solution to
  165.          prevent these attacks is by not transmitting reusable
  166.          clear-text passwords on the network.  CERT has collected some
  167.          information on relevant technologies.  This information is
  168.          included as Appendix B in this advisory.  Note: These
  169.          solutions will not protect against transient or remote access
  170.          transmission of clear-text passwords through the network.
  171.  
  172.          Until everyone connected to your network is using the above
  173.          technologies, your policy should allow only authorized users
  174.          and programs access to promiscuous network interfaces.  The
  175.          tool described in Section III.A.3 above may be helpful in
  176.          verifying this restricted access.
  177.  
  178.          2) Short-term workaround:
  179.  
  180.          Regardless of whether the network monitoring software is
  181.          detected on your system, CERT recommends that ALL SITES take
  182.          action to prevent unauthorized network monitoring on their
  183.          systems. You can do this either by removing the interface, if
  184.          it is not used on the system or by attempting to prevent the
  185.          misuse of this interface.
  186.  
  187.          For systems other than Sun and Solbourne, contact your vendor
  188.          to find out if promiscuous mode network access is supported
  189.          and, if so, what is the recommended method to disable or
  190.          monitor this feature.
  191.  
  192.          For SunOS 4.x and Solbourne systems, the promiscuous
  193.          interface to the network can be eliminated by removing the
  194.          /dev/nit capability from the kernel.  The procedure for doing
  195.          so is outlined below (see your system manuals for more
  196.          details).  Once the procedure is complete, you may remove the
  197.          device file /dev/nit since it is no longer functional.
  198.  
  199.          Procedure for removing /dev/nit from the kernel:
  200.  
  201.          1. Become root on the system. 
  202.  
  203.          2. Apply "method 1" as outlined in the System and Network
  204.          Administration manual, in the section, "Sun System
  205.          Administration Procedures," Chapter 9, "Reconfiguring the
  206.          System Kernel."  Excerpts from the method are reproduced
  207.          below:
  208.  
  209.          # cd /usr/kvm/sys/sun[3,3x,4,4c]/conf
  210.          # cp CONFIG_FILE SYS_NAME  
  211.  
  212.          [Note that at this step, you should replace the CONFIG_FILE
  213.          with your system specific configuration file if one exists.]
  214.  
  215.          # chmod +w SYS_NAME
  216.          # vi SYS_NAME
  217.  
  218.             #
  219.             # The following are for streams NIT support.  NIT is used by
  220.             # etherfind, traffic, rarpd, and ndbootd.  As a rule of thumb,
  221.             # NIT is almost always needed on a server and almost never
  222.             # needed on a diskless client.
  223.             #
  224.             pseudo-device   snit            # streams NIT
  225.             pseudo-device   pf              # packet filter
  226.             pseudo-device   nbuf            # NIT buffering module
  227.          
  228.          [Comment out the preceding three lines; save and exit the
  229.          editor before proceeding.]
  230.  
  231.          # config SYS_NAME
  232.          # cd ../SYS_NAME
  233.          # make
  234.  
  235.          # mv /vmunix /vmunix.old
  236.          # cp vmunix /vmunix
  237.  
  238.          # /etc/halt
  239.          > b
  240.  
  241.          [This step will reboot the system with the new kernel.]
  242.  
  243.          [NOTE that even after the new kernel is installed, you need
  244.          to take care to ensure that the previous vmunix.old , or
  245.          other kernel, is not used to reboot the system.]
  246.  
  247.  
  248.      C.  Scope and recovery
  249.  
  250.          If you detect the network monitoring software at your site,
  251.          CERT recommends following three steps to successfully
  252.          determine the scope of the problem and to recover from this
  253.          attack.
  254.  
  255.          1. Restore the system that was subjected to the network
  256.          monitoring software.
  257.  
  258.          The systems on which the network monitoring and/or Trojan
  259.          horse programs are found have been compromised at the root
  260.          level; your system configuration may have been altered.  See
  261.          Appendix A of this advisory for help with recovery.
  262.  
  263.          2. Consider changing router, server, and privileged account
  264.          passwords due to the wide-spread nature of these attacks.
  265.          
  266.          Since this threat involves monitoring remote connections,
  267.          take care to change these passwords using some mechanism
  268.          other than remote telnet, rlogin, or FTP access.
  269.  
  270.          3. Urge users to change passwords on local and remote
  271.          accounts.
  272.  
  273.          Users who access accounts using telnet, rlogin, or FTP either
  274.          to or from systems within the compromised domain should
  275.          change their passwords after the intruder's network monitor
  276.          has been disabled.
  277.          
  278.          4. Notify remote sites connected from or through the local
  279.          domain of the network compromise.
  280.  
  281.          Encourage the remote sites to check their systems for
  282.          unauthorized activity.  Be aware that if your site routes
  283.          network traffic between external domains, both of these
  284.          domains may have been compromised by the network monitoring
  285.          software.
  286.  
  287. ---------------------------------------------------------------------------
  288.                          cpm 1.0 README FILE
  289.  
  290.  
  291.        cpm -  check for network interfaces in promiscuous mode.
  292.  
  293. Copyright (c) Carnegie Mellon University 1994
  294. Thursday Feb 3 1994
  295.  
  296. CERT Coordination Center
  297. Software Engineering Institute
  298. Carnegie Mellon University
  299. Pittsburgh, PA 15213-3890
  300.  
  301.  
  302.    This program is free software; you can distribute it and/or modify
  303.    it as long as you retain the Carnegie Mellon copyright statement.
  304.  
  305.    It can be obtained via anonymous FTP from nasirc.nasa.gov
  306.    in directory ~ftp/toolkits/UNIX/cpm/cpm.1.0.tar.Z. 
  307.  
  308.    This program is distributed WITHOUT ANY WARRANTY; without the IMPLIED
  309.    WARRANTY of merchantability or fitness for a particular purpose.
  310.  
  311.    This package contains:
  312.        README
  313.        MANIFEST
  314.        cpm.1
  315.        cpm.c
  316.  
  317.    To create cpm under SunOS, type:
  318.    % cc -Bstatic -o cpm cpm.c 
  319.  
  320.    On machines that support dynamic loading, such as Sun's, CERT recommends
  321.    that programs be statically linked so that this feature is disabled.
  322.  
  323.    CERT recommends that after you install cpm in your favorite directory,
  324.    you take measures to ensure the integrity of the program by noting
  325.    the size and checksums of the source code and resulting binary.
  326.  
  327.    The following is an example of the output of cpm and its exit status.
  328.  
  329.    Running cpm on a machine where both the le0 and le2 interfaces are
  330.    in promiscuous mode, under csh(1):
  331.  
  332.    % cpm
  333.    le0
  334.    le2
  335.    % echo $status
  336.    2
  337.    %
  338.  
  339.    Running cpm on a machine where no interfaces are in promiscuous 
  340.    mode, under csh(1):
  341.  
  342.    % cpm
  343.    % echo $status
  344.    0
  345.    %
  346.  
  347. [End of CERT extract.]
  348.  
  349.  
  350.   =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  351.   NASIRC ACKNOWLEDGES:  ARPA/CERT and DoE CIAC for their reporting 
  352.   and coordination of solutions to this problem
  353.   =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  354.   The NASIRC online archive system is available via anonymous ftp.
  355.   Just ftp to nasirc.nasa.gov and login as anonymous.  You will be
  356.   required to enter your valid e-mail address.  Once there you can
  357.   access the following information:
  358.  
  359.        /toolkits           ! contains automated toolkit software
  360.        /bulletins          ! contains NASIRC bulletins
  361.        
  362.   Information maintained in these directories will be updated on a
  363.   continuous basis with relevant software and information.  Contact 
  364.   the NASIRC Helpdesk for more information and assistance with 
  365.   toolkits or security measures.
  366.  
  367.  
  368.      ===============================================================
  369.        For further assistance, please contact the NASIRC Helpdesk:
  370.        Phone: 1-800-7-NASIRC                Fax: 1-301-441-1853
  371.        Internet Email: nasirc@nasa.gov
  372.        24 Hour/Emergency Pager: 1-800-759-7243/Pin:2023056
  373.        STU III: 1-301-982-5480
  374.      ===============================================================
  375.      This bulletin may be forwarded without restrictions to sites and 
  376.      system administrators within the NASA community
  377.  
  378.                             -----------------
  379.  
  380.  PLEASE NOTE: Users outside of the NASA community may receive NASIRC
  381.     bulletins.  If you are not part of the NASA community, please contact
  382.     your agency's response team to report incidents.  Your agency's team
  383.     will coordinate with NASIRC, who will ensure the proper internal 
  384.     NASA team(s) are notified. NASIRC is a member of the Forum of Incident
  385.     Response and Security Teams (FIRST), a world-wide organization which 
  386.     provides for coordination between incident response teams in handling 
  387.     computer-security-related issues. 
  388.  
  389.     A list of FIRST member organizations and their constituencies can be
  390.     obtained by sending email to docserver@first.org with an empty subject
  391.     line and a message body containing the line: send first-contacts.
  392.  
  393.