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

📄 241-243.html

📁 linux-unix130.linux.and.unix.ebooks130 linux and unix ebookslinuxLearning Linux - Collection of 12 E
💻 HTML
字号:
<HTML>

<HEAD>

<TITLE>Special Edition Using Linux, Fourth Edition:Improving System Security</TITLE>

<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<SCRIPT>
<!--
function displayWindow(url, width, height) {
        var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>

 -->




<!--ISBN=0789717468//-->

<!--TITLE=Special Edition Using Linux, Fourth Edition//-->

<!--AUTHOR=Jack Tackett//-->

<!--AUTHOR=Jr.//-->

<!--AUTHOR=Steve Burnett//-->

<!--PUBLISHER=Macmillan Computer Publishing//-->

<!--IMPRINT=Que//-->

<!--CHAPTER=12//-->

<!--PAGES=241-243//-->

<!--UNASSIGNED1//-->

<!--UNASSIGNED2//-->



<CENTER>

<TABLE BORDER>

<TR>

<TD><A HREF="239-241.html">Previous</A></TD>

<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>

<TD><A HREF="244-246.html">Next</A></TD>

</TR>

</TABLE>

</CENTER>

<P><BR></P>

<H4 ALIGN="LEFT"><A NAME="Heading13"></A><FONT COLOR="#000077">SUID and SGID Programs</FONT></H4>

<P>Two additional permission bits are associated with a file: the SUID and SGID bits. SUID stands for <I>Set User ID</I>, and SGID is <I>Set Group ID</I>. Programs with these permissions behave as though they were owned by different UIDs when they&#146;re run. When an SUID program is run, its effective UID is set the same as the user that owns the program on the file system, regardless of who is actually running the program. SGID is similar except that it changes the group ID instead.</P>

<P>Although the SUID/SGID feature can be useful, it can present a big security hole. SUID programs are generally used when a program needs special permissions, such as root permission, to run.</P>

<P>Programmers usually go to great lengths to ensure that their SUID programs are secure. Most security holes in SUID programs occur when the program executes a command line, activates a shell, or runs a file that users can change to contain their own commands. Although some SUID programs are necessary, you should try to keep them to a minimum. You should also regularly scan your file systems to check for new SUID programs by using the <TT>find</TT> command (refer to the man page for the exact syntax).</P>

<H3><A NAME="Heading14"></A><FONT COLOR="#000077">Avoiding Social Engineering Threats</FONT></H3>

<P>With all the different security features available on a Linux system, the biggest security hole is typically your users. After all, your users already have valid accounts.

</P>

<P>But what does this have to do with social engineering? What is social engineering, anyway? <I>Social engineering</I> is about convincing people to do what you want, either by playing on their assumptions or behavior, or by outright misrepresentation and lying. People, in general, want to be helpful. And, if given the opportunity, they usually try to help out as much as possible. Crackers with good social engineering skills play on this characteristic.</P>

<P>Assume that you have a computer user named Mr. Jones. He&#146;s just your average user&#151;not a guru at all. One day, Mr. Jones gets a call at the office that goes something like this:</P>

<CENTER>

<TABLE WIDTH="90%"><TR>

<TD WIDTH="20%" ALIGN="LEFT"><B>Mr. Jones:</B>

<TD WIDTH="70%" ALIGN="LEFT">Hello?

<TR>

<TD VALIGN="TOP"><B>Caller:</B>

<TD>Hello, Mr. Jones. This is Fred Smith in tech support. Due to some disk space constraints, we&#146;re going to be moving some user home directories to another disk at 5:30 this evening. Your account will be part of this move and will be temporarily unavailable.

<TR>

<TD><B>Mr. Jones:</B>

<TD>Uh, okay. I&#146;ll be home by then, anyway.

<TR>

<TD VALIGN="TOP"><B>Caller:</B>

<TD>Good. Be sure to log out before you go. I just need to check a couple of things. What was your login ID again&#151;jones?

<TR>

<TD VALIGN="TOP"><B>Mr. Jones:</B>

<TD>Yes, it&#146;s jones. None of my files will get lost during the move, will they?

<TR>

<TD VALIGN="TOP"><B>Caller:</B>

<TD>No sir. But I&#146;ll check your account just to make sure. What was the password on that account so I can get in to check your files?

<TR>

<TD><B>Mr. Jones:</B>

<TD>My password is tuesday.

<TR>

<TD VALIGN="TOP"><B>Caller:</B>

<TD>Okay, Mr. Jones. Thanks for your help. I&#146;ll be sure to check your account and verify that all the files are there.

<TR>

<TD><B>Mr. Jones:</B>

<TD>Thank you. Bye.

</TABLE>

</CENTER>

<P>So what just happened here? Someone called one of your users on the phone and managed to get both a valid user name and password in the course of the conversation. And you guessed it&#151;if Mr. Jones calls tech support tomorrow, he&#146;ll probably find that no Fred Smith is working there!

</P>

<P>How do you prevent things like this from happening? Educate your users. Your users should never give out a password over the phone to a caller. They should never leave one on e-mail or voice mail. Crackers use social engineering by convincing users to give them what they want; they don&#146;t even have to try to break into your system.</P>

<H3><A NAME="Heading15"></A><FONT COLOR="#000077">Recording Use of the <I>su</I> Command

</FONT></H3>

<P>Linux verifies your identity by your login ID/password combination. As you log in, your process is tagged with an ID that identifies you to the system. It&#146;s this UID that&#146;s checked for file and directory access.

</P>

<P>Linux offers the capability to switch to another UID while you&#146;re working. When users use the <TT>su</TT> command, they can become root or another user. They must know the password of the user that they&#146;re changing to. For example, for a user to change user ID to that of user ernie, the command is</P>

<!-- CODE SNIP //-->

<PRE>

su ernie

</PRE>

<!-- END CODE SNIP //-->

<P>The user is then prompted for the password associated with the login ID ernie.

</P>

<P>To change to root, the command is</P>

<!-- CODE SNIP //-->

<PRE>

su root

</PRE>

<!-- END CODE SNIP //-->

<P>The user is then prompted for the root password.

</P>

<P>Typically, all attempts at using <TT>su</TT> are automatically logged in a system logfile, such as /var/adm/syslog. Examine this file periodically to check on this sort of activity.</P>

<H3><A NAME="Heading16"></A><FONT COLOR="#000077">Developing a Secure System</FONT></H3>

<P>Along with power comes responsibility. If not handled carefully, Linux&#146;s power to share information, processing resources, and peripherals can leave your system open to abuse. Your job is to set up system security so that only the right users and systems can connect to yours, and that they can use only the parts of your computer you want to share.

</P>

<H4 ALIGN="LEFT"><A NAME="Heading17"></A><FONT COLOR="#000077">Security Threats</FONT></H4>

<P>You can monitor your system for security threats. To determine who is using your system and the type of work they&#146;re doing, use the <TT>ps</TT> command.</P>

<P>Be wary of jobs that seem to be running a very long time or users who seem to be using more resources than normal. These can be an indication that a login has been compromised and an unauthorized user is running a program to guess passwords.</P><P><BR></P>

<CENTER>

<TABLE BORDER>

<TR>

<TD><A HREF="239-241.html">Previous</A></TD>

<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>

<TD><A HREF="244-246.html">Next</A></TD>

</TR>

</TABLE>

</CENTER>





</td>
</tr>
</table>

<!-- begin footer information -->





</body></html>

⌨️ 快捷键说明

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