📄 201-205.html
字号:
<!-- 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=""> <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=201-205//-->
<!--UNASSIGNED1//-->
<!--UNASSIGNED2//-->
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="198-201.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="205-206.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>
<P><BR></P>
<P>The path through which an activity occurs could be very elaborate, and not all IDSs can detect the full range of conditions. For example, you might log in under your normal user ID and run a program that opens a socket to background daemon. When you send commands to the daemon through the socket, one consequence could be that the daemon reads a file that you could not normally access and then sends data about the file to you through the socket. The OS is happy because the access control decision for the read operation succeeded because the daemon had sufficient authority to access the file. In this case, if the security policy is violated, it is because the daemon did not perform enough checking to verify that your program had the necessary privileges. Hopefully, weak security programming such as this does not exist at your site.
</P>
<P>What would an IDS need to track to detect the policy violation? Here is a partial list of what the IDS must know about <I>you</I>:</P>
<DL>
<DD><B>•</B> The login event generated by you
<DD><B>•</B> The process or thread create event emitted when you ran your program
<DD><B>•</B> The socket events for your program— create, read, write, and possibly bind
</DL>
<P>For the daemon process, the IDS would need to know the following:
</P>
<DL>
<DD><B>•</B> The identity of the process—its UIDs, GIDs, and other privileges
<DD><B>•</B> Socket events
<DD><B>•</B> Resource accesses, such as files created, deleted, read, or written
</DL>
<P>Knowing these two sets of events is useful but not sufficient. What else is missing? Assume for the moment that your program is the only one communicating with this daemon. How would the system know that you were somehow given access to data in a file that is normally unavailable to you? The IDS might watch for a sequence such as the following:
</P>
<DL>
<DD><B>•</B> A write socket event from your program
<DD><B>•</B> A read socket event from the daemon
<DD><B>•</B> A read file event from the daemon, of which the file is one that your UID or GIDs cannot access
<DD><B>•</B> A write socket event from the daemon
<DD><B>•</B> A read socket event from the daemon
</DL>
<P>Not only would these individual events need to be monitored, but the IDS would need to somehow correlate the events into a higher abstraction such as a <I>session</I>. Correlating events is not difficult when they share data values. In this case, its the socket endpoints that define the relation between the event records in the audit trail or system log. Because the session is defined as the 4-tuple <source address, source port, destination address, destination port>, and your program and the daemon share these four values, events on these sockets can be clumped together logically.</P>
<P>Still, this sequence of events is not proof of a problem. Many background daemons and programs regularly access privileged files on your behalf without disclosing information in the files. The only way to know for sure that you were allowed to read data that you should not have access to is to monitor some lower level operations, such as the following:</P>
<DL>
<DD><B>1.</B> The daemon program reads from a file into a buffer.
<DD><B>2.</B> Your UID and GIDs do not have access to this file.
<DD><B>3.</B> The buffer is written to the socket by the daemon.
<DD><B>4.</B> You read the socket.
</DL>
<P>Aha! Now we’re getting somewhere. Here is clear proof that the daemon read some data and dumped it into the socket that you read. What happens if the buffer is manipulated by the program? Can that be tracked, too?
</P>
<DL>
<DD><B>1.</B> The daemon reads from a file into a buffer.
<DD><B>2.</B> Your UID and GIDs do not have access to this file.
<DD><B>3.</B> The buffer is copied into <I>N</I> different smaller buffers.
<DD><B>4.</B> The secondary buffers are written to the socket by the daemon.
<DD><B>5.</B> You read the socket.
</DL>
<P>OK. This most likely can be tracked, too, but the IDS probably is getting a bit tired and frustrated. More complications are on the way:
</P>
<DL>
<DD><B>1.</B> The daemon reads from a file into a buffer.
<DD><B>2.</B> Your UID and GIDs do not have access to this file.
<DD><B>3.</B> The buffer is transformed though any number of operations into <I>N</I> other buffers.
<DD><B>4.</B> These secondary memory buffers are further convoluted and transformed.
<DD><B>5.</B> The secondary buffers are written to the socket by the daemon.
<DD><B>6.</B> You read the socket.
</DL>
<P>Still, this seems to be something that an IDS can track. As long as a <I>path</I> can be found from the source buffer to the final memory storage location written to the socket, the IDS will be able to detect that data has been compromised. Before you get another cup of coffee or tea, consider a more complex scenario. The daemon’s first two steps are the same as before. Instead of transforming or copying the buffer as the next step, the daemon follows an algorithm:</P>
<DL>
<DD><B>1.</B> Grab the first byte of the buffer and store it as an integer in temporary variable <I>X</I>.
<DD><B>2.</B> Compute the <I>X<SUP>th</SUP></I> Fibonacci number and write it to the socket.
<DD><B>3.</B> Your program reads the socket and computes Fibonacci numbers until you find the same result, and now you know <I>X</I>.
</DL>
<P>This is really getting hard. Of course, you could have picked a more efficient algorithm. The point is that the path is getting harder to follow. The compromised data is becoming more <I>obscured</I>. Now instead of the path being based on memory copies and elementary transformations, all we know is that part of the buffer was used in computing some function <I>f(x)</I>. The result of the function then was written to the buffer. There is more to consider before drawing some conclusions:</P>
<DL>
<DD><B>1.</B> Grab the first <I>bit</I> of the buffer and store it in temporary variable <I>X</I>.
<DD><B>2.</B> If X=1, write an odd number to the socket, else write an even number to the socket.
<DD><B>3.</B> Your program reads the socket and inverts the previous step.
</DL>
<P>In this case, the <I>action</I> the daemon took by inspecting the buffer indicates a problem, and not the fact that the buffer itself or some derivative of it was communicated to your program. This is a simple case of a <I>covert channel</I>. Anytime one program can <I>leak</I> at least one bit of information to another program, there is a threat that a read constraint will be violated. Any number of operations not related to the socket could have been performed to leak the bit of information contained in X:</P>
<DL>
<DD><B>•</B> The daemon could create a file in directory A that is readable by your program when X=1, and create a file in directory B otherwise (where B also is readable by you).
<DD><B>•</B> The daemon could write data into a file that you are allowed to read. Then the daemon reads data back from this file into a buffer. The buffer then is written to the socket for you to read. The IDS would not know, without detailed knowledge of the file’s history, whether the data sent to you was allowed or not. Note that an MLS OS will not permit this operation because it does not allow write down when the operation violates sensitivity labels.
<DD><B>•</B> If X=1, the daemon runs the /bin/true program, else it runs /bin/ls.
</DL>
<P><BR></P>
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="198-201.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="205-206.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> | <a href="/contactus.html"><font color="#006666">Contact Us</font></a> | <a href="/aboutus.html"><font color="#006666">About Us</font></a> | <a href="http://www.earthweb.com/corporate/privacy.html" target="_blank"><font color="#006666">Privacy</font></a> | <a href="http://www.itmarketer.com/" target="_blank"><font color="#006666">Ad Info</font></a> | <a href="/"><font color="#006666">Home</font></a></b>
<br><br>
Use of this site is subject to certain <a href="/agreement.html">Terms & Conditions</a>, <a href="/copyright.html">Copyright © 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 + -