⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 183-186.html

📁 入侵检测的相关教程
💻 HTML
📖 第 1 页 / 共 2 页
字号:
			<option value="/reference/dir.productivityapplications1.html">Prod Apps
			<option value="/reference/dir.programminglanguages.html">Programming
			<option value="/reference/dir.security1.html">Security	
			<!-- <option value="/reference/dir.ewtraining1.html">Training Guides -->
			<option value="/reference/dir.userinterfaces.html">UI
			<option value="/reference/dir.webservices.html">Web Services
			<option value="/reference/dir.webmasterskills1.html">Webmaster
			<option value="/reference/dir.y2k1.html">Y2K
			<option value="">-----------
			<option value="/reference/whatsnew.html">New Titles
			<option value="">-----------
			<option value="/reference/dir.archive1.html">Free Archive		
			</SELECT>
			</font></td>
	</tr>
	</table>
	</form>
<!-- LEFT NAV SEARCH END -->

		</td>
		
<!-- PUB PARTNERS END -->
<!-- END LEFT NAV -->

<td rowspan="8" align="right" valign="top"><img src="/images/iswbls.gif" width=1 height=400 alt="" border="0"></td>
<td><img src="/images/white.gif" width="5" height="1" alt="" border="0"></td>
<!-- end of ITK left NAV -->

<!-- begin main content -->
<td width="100%" valign="top" align="left">


<!-- END SUB HEADER -->

<!--Begin Content Column -->

<FONT FACE="Arial,Helvetica" SIZE="-1">
To access the contents, click the chapter and section titles.
</FONT>
<P>
<B>Intrusion Detection: Network Security beyond the Firewall</B>
<FONT SIZE="-1">
<BR>
<I>(Publisher: John Wiley & Sons, Inc.)</I>
<BR>
Author(s): Terry Escamilla
<BR>
ISBN: 0471290009
<BR>
Publication Date: 11/01/98
</FONT>
<P>
<form name="Search" method="GET" action="http://search.earthweb.com/search97/search_redir.cgi">

<INPUT TYPE="hidden" NAME="Action" VALUE="Search">
<INPUT TYPE="hidden" NAME="SearchPage" VALUE="http://search.earthweb.com/search97/samples/forms/srchdemo.htm">
<INPUT TYPE="hidden" NAME="Collection" VALUE="ITK">
<INPUT TYPE="hidden" NAME="ResultTemplate" VALUE="itk-full.hts">
<INPUT TYPE="hidden" NAME="ViewTemplate" VALUE="view.hts">

<font face="arial, helvetica" size=2><b>Search this book:</b></font><br>
<INPUT NAME="queryText" size=50 VALUE="">&nbsp;<input type="submit" name="submitbutton" value="Go!">
<INPUT type=hidden NAME="section_on" VALUE="on">
<INPUT type=hidden NAME="section" VALUE="http://www.itknowledge.com/reference/standard/0471290009/">

</form>


<!-- Empty Reference Subhead -->

<!--ISBN=0471290009//-->
<!--TITLE=Intrusion Detection: Network Security Beyond the Firewall//-->
<!--AUTHOR=Terry Escamilla//-->
<!--PUBLISHER=John Wiley & Sons, Inc.//-->
<!--IMPRINT=Wiley Computer Publishing//-->
<!--CHAPTER=6//-->
<!--PAGES=183-186//-->
<!--UNASSIGNED1//-->
<!--UNASSIGNED2//-->

<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="181-183.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="186-190.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>
<P><BR></P>
<P>Most UNIX systems now contain user limits to prevent some of these attacks. The Berkeley quota system is designed to prevent someone from consuming too much free disk space. If the quota is large, and the amount of free disk space in /tmp is small, you can still launch a denial-of-service attack. Other limits include those for memory, the number of simultaneously opened files, the number of concurrent processes, and similar constraints for commonly used resources. Unfortunately, these checks are made against the <I>effective UID</I> (EUID), and a user can bypass checking by running SUID or SGID programs that can cause resource exhaustion.</P>
<P><FONT SIZE="+1"><B>Internal Privilege Escalation</B></FONT></P>
<P>UNIX and NT systems both provide ways for users to gain increased privileges through program execution. NT uses its access rights mechanism, and UNIX relies on the now familiar SUID or SGID concepts. Even if the privileged program does not give the user access to <I>everything</I> on the system, even a little privilege boost can help. For one thing, if the average UNIX user can gain privileges of the mail group by exploiting a SGID mail program, then that user will have access to the mail spool directory. Denial-of-service attacks, or worse, are then possible.</P>
<P>Privileged programs are compromised in a number of ways:</P>
<DL>
<DD><B>&#149;</B>&nbsp;&nbsp;The program does not check buffer limits and is subject to a buffer overflow attack.
<DD><B>&#149;</B>&nbsp;&nbsp;The program does not check input parameters and is tricked into executing one of the parameters as a command (test.cgi hack).
<DD><B>&#149;</B>&nbsp;&nbsp;The program makes invalid assumptions about its environment.
<DD><B>&#149;</B>&nbsp;&nbsp;The program is tricked into operating on a different resource because of poor programming practices.
</DL>
<P>The first two attacks have been discussed previously. A program that makes invalid environment assumptions is poorly written. The classic example is a program that does not set its own PATH environment variable or does not use fully qualified path names for the programs it calls. If a privileged program contains an instruction that tells it to run another program, such as the following, the hacker will install a program with the desired behavior into a writable directory and then invoke the privileged program:
</P>
<!-- CODE SNIP //-->
<PRE>
system (&#147;ls -l&#148;);
</PRE>
<!-- END CODE SNIP //-->
<P>Instead of running /bin/ls, the privileged program runs the bogus version planted. This problem is so well known that you would expect it to be rare. However, if you were to spend some time digging in commercial operating systems, you might be surprised at how often this poor programming practice still occurs.
</P>
<P>UNIX programs also are impacted by inheritance. When a child process is created, it inherits the environment of its parent. If a user&#146;s UMASK setting results in the creation of world writable files, and the user runs a SUID or SGID program that does not reset UMASK, files created by the program will be world writable. If the program treats the file as a cache, writing values into it and reading values from it, then any user will be able to supply chosen data values to the program.</P>
<P>This last type of compromise of privileged programs is especially fun. The idea is really simple. A program reads a parameter, such as a file name, that tells the program which resource to access. The program has a <I>handle</I> to the resource. Before the program accesses the resource, an adversary is somehow able to replace the resource with a different target. Here is a practical example.</P>
<P>The first line of a shell script in UNIX tells the system which shell interpreter to use. A race condition exists in that the kernel looks at this first line and picks out the shell interpreter. The kernel then starts the interpreter with UID and GID according to the SUID and SGID permission bit settings for the file. Before the kernel feeds the script&#146;s statements to the interpreter, the file&#146;s contents can be replaced. This is a well-known race condition. You might think this last step is impossible unless you have write access to the shell script file. However, you can create a symbolic link from the SUID or SGID shell script in your current directory, start the script, and replace the file in your current directory with anything of your choosing before the commands are fed to the interpreter. You can use other tricks to broaden the window of opportunity for exploiting the race condition. If the shell script is not privileged, this hack does nothing exciting. For shell scripts with SUID or SGID bits set, the result is that the hacker will be able to run any shell commands with the EUID and EGID of the owner of the symbolic link. As a general rule, you should not have SUID or SGID shell scripts on your systems.</P>
<P><FONT SIZE="+1"><B>Internal Superuser Privileges</B></FONT></P>
<P>The biggest threat to a system is when a user gains superuser or complete administrative privileges. The same kinds of attacks and problems mentioned previously apply for root or administrator privileged programs. Buffer overflow attacks, data-driven attacks, spoofed resources, and spoofed network packets have all been exploited by normal users to gain privileged access to a system.
</P>
<P>Will a firewall prevent these privilege escalations from happening? Well, if the network attack is like the test.cgi attack, and the Web server is running as root or Administrator, then the firewall will not help. Do people actually run Web servers as root?</P>
<P>Many systems now support HTML interfaces for system administrator tasks. The HTML pages launch CGI programs that <I>must</I> run with root privileges because they do things the root user normally would do from the command line. The only way to accomplish this is by running the httpd daemon as root so that it can spawn CGI processes with these same privileges. If a user on the internal network is able to send in an HTTP packet to the Web server running as root, the server can be tricked into executing arbitrary commands.</P>
<P>If you have seen any of these privileged Web servers, you know that as a first step, the person connecting to the server must authenticate using a user ID and password. The Web pages are protected with standard Web server access control rules. When authentication is complete, the httpd daemon will respond to requests without requiring additional authentication. An attacker can spoof the IP address of the administrator&#146;s station and send arbitrary HTTP commands to the privileged Web server. This attack is hopefully not possible from the outside because a properly configured network will not permit external access to a Web server running as root. However, because this same node might be an internal data server, most users will have access to it, meaning that the threat of forged packets is real. To avoid attacks against Web servers running as root, use SSL or IPsec to prevent network node impersonation.</P><P><BR></P>
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="181-183.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="186-190.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>


<!-- all of the reference materials (books) have the footer and subfoot reveresed -->
<!-- reference_subfoot = footer -->
<!-- reference_footer = subfoot -->

<!-- BEGIN SUB FOOTER -->
		<br><br>
		</TD>
    </TR>
	</TABLE>

		
	<table width="640" border=0 cellpadding=0 cellspacing=0>
		<tr>
		<td align="left" width=135><img src="/images/white.gif" width=100 height="1" alt="" border="0"></td>
		
		
<!-- END SUB FOOTER -->

<!-- all of the books have the footer and subfoot reveresed -->
<!-- reference_subfoot = footer -->
<!-- reference_footer = subfoot -->

<!-- FOOTER -->
			
		<td width="515" align="left" bgcolor="#FFFFFF">
<font face="arial, helvetica" size="1"><b><a href="/products.html"><font color="#006666">Products</font></a>&nbsp;|&nbsp; <a href="/contactus.html"><font color="#006666">Contact Us</font></a>&nbsp;|&nbsp; <a href="/aboutus.html"><font color="#006666">About Us</font></a>&nbsp;|&nbsp; <a href="http://www.earthweb.com/corporate/privacy.html" target="_blank"><font color="#006666">Privacy</font></a> &nbsp;|&nbsp; <a href="http://www.itmarketer.com/" target="_blank"><font color="#006666">Ad Info</font></a> &nbsp;|&nbsp; <a href="/"><font color="#006666">Home</font></a></b>
		<br><br>
		
		Use of this site is subject to certain <a href="/agreement.html">Terms &amp; Conditions</a>, <a href="/copyright.html">Copyright &copy; 1996-1999 EarthWeb Inc.</a><br> 
All rights reserved.  Reproduction whole or in part in any form or medium without express written permision of EarthWeb is prohibited.</font><p>
</td>
		</tr>
</table>
</BODY>
</HTML>

<!-- END FOOTER -->

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -