Original issue date: December 19, 1994<BR>
Last revised: Septmeber 23, 1997<BR>
Updated copyright statement

<P>A complete revision history is at the end of this file.

<P>The CERT Coordination Center is experiencing an increase in reports of root
compromises caused by intruders using tools to exploit a number of NFS
(Network File System) vulnerabilities.

<P>CERT recommends limiting your exposure to these attacks by implementing
the security measures described in Section III below.

<P>We will update this advisory as we receive additional information.
Please check advisory files regularly for updates that relate to your site.

<P><HR>
<H2>I. Description</H2>


There are tools being used by intruders to exploit a number of NFS
vulnerabilities. These tools are widely available and widely distributed.

<H2>II. Impact</H2>


The impact varies depending on which vulnerabilities are present.
In the worst case, intruders gain unauthorized root access from a
remote host.

<H2>III. Security Measures</H2>


<H3>A. Filter packets at your firewall/router.</H3>


Filter TCP port 111, UDP port 111 (portmapper), TCP port 2049,
and UDP port 2049 (nfsd).

<P>Note: Some sites may run NFS on a port other than 2049. To determine
which port is running NFS, enter the following command on the
              machine in question:
<PRE>
         rpcinfo -p
</PRE>
If NFS is on a different port, then that is the port number to
block at the firewall.

<P>Consult your vendor or your firewall documentation for detailed
instructions on how to configure the ports.

<P>This measure will prevent access to NFS at your site from outside
your firewall, but it will not protect you from attacks launched from
your local network, behind your firewall.

<H3>B. Use a portmapper that disallows proxy access.</H3>

Be sure that you do this for every host that runs a portmapper.
For Solaris, 2.x, use a version of rpcbind that disallows proxy
access.

<P>A portmapper that disallows proxy access protects all hosts with the
modified portmapper from attacks that originate either inside or
outside your firewall. Because this security measure addresses only
the portmapper vulnerability, we recommend combining it with
measure A above.

Wietse Venema has developed a portmapper that disallows proxy access.
It is available by anonymous FTP from
<PRE>
             ftp.win.tue.nl: /pub/security/portmap_3.shar.Z
             ftp.cert.org:   /pub/tools/nfs_tools/portmap_3.shar.Z
             MD5 checksum:   f6a3ad98772e7a402ddcdac277adc4a6
</PRE>
For Solaris systems, Venema has developed a version of rpcbind that
does not allow proxy access. Solaris users should install this
program, not the portmapper. Rpcbind is available by anonymous FTP
from the same sites as the portmapper:
<PRE>
            ftp.win.tue.nl:/pub/security/rpcbind_1.1.tar.Z
            ftp.cert.org:  /pub/tools/nfs_tools/rpcbind_1.1.tar.Z
            MD5 checksum:  58437adcbea0a55e37d3a3211f72c08b
</PRE>
<H3>C. Check the configuration of the /etc/exports files on your hosts.</H3>

In particular:
<OL>

<LI>Do *not* self-reference an NFS server in its own exports file.

<LI><P>Do not allow the exports file to contain a &quot;localhost&quot; entry.

<LI><P>Export file systems only to hosts that require them.

<LI><P>Export only to fully qualified hostnames.

<LI><P>Ensure that export lists do not exceed 256 characters.
<BR>
If you have aliases, the list should not exceed 256 characters
            *after* the aliases have been expanded.<BR>
(See <A HREF="http://www.cert.org/advisories/CA-94.02.REVISED.SunOS.rpc.mountd.vulnerability.html">CA-94.02.REVISED.SunOS.rpc.mountd.vulnerability</A>)

<LI><P>Use the <I>showmount(8)</I> utility to check that exports are correct.

<LI><P>Wherever possible, mount file systems to be exported read only and
export file systems read only.
</OL>

<H3>D. Ensure that your systems are current with patches and workarounds available from your vendor and identified in CERT advisories.</H3>

The following advisories address problems related to NFS:

<P><A HREF="http://www.cert.org/advisories/CA-91.21.SunOS.NFS.Jumbo.and.fsirand.html">CA-91.21.SunOS.NFS.Jumbo.and.fsirand</A><BR>
CA-92.12.REVISED.SunOS.rpc.mountd.vulnerability <BR>
<A HREF="http://www.cert.org/advisories/CA-93.15.SunOS.and.Solaris.vulnerabilities.html">CA-93.15.SunOS.and.Solaris.vulnerabilities</A><BR>
<A HREF="http://www.cert.org/advisories/CA-94.02.REVISED.SunOS.rpc.mountd.vulnerability.html">CA-94.02.REVISED.SunOS.rpc.mountd.vulnerability</A>

<P>Vendors may have additional patches not covered by a CERT
advisory, so be sure to contact your vendor for further information.

<P><HR>

<P>The CERT Coordination Center thanks Steve Bellovin, Casper Dik, Leendert
van Doorn, and Wietse Venema for their support in responding to this problem.

<P><HR>

<!--#include virtual="/include/footer_nocopyright.html" -->
<P>Copyright 1994, 1995, 1996 Carnegie Mellon University.</P>

<HR>

Revision History
<PRE>
Sep. 23, 1997  Updated copyright statement
Aug. 30, 1996  Information previously in the README was inserted
               into the advisory.
Feb. 02, 1995  Sec. III - Added a note about checking port numbers.

</PRE>