securityissues.html
来自「一本完整的描述Unix Shell 编程的工具书的所有范例」· HTML 代码 · 共 272 行
HTML
272 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><HTML><HEAD><TITLE>Security Issues</TITLE><METANAME="GENERATOR"CONTENT="Modular DocBook HTML Stylesheet Version 1.57"><LINKREL="HOME"TITLE="Advanced Bash-Scripting Guide"HREF="index.html"><LINKREL="UP"TITLE="Miscellany"HREF="miscellany.html"><LINKREL="PREVIOUS"TITLE="Assorted Tips"HREF="assortedtips.html"><LINKREL="NEXT"TITLE="Portability Issues"HREF="portabilityissues.html"><METAHTTP-EQUIV="Content-Style-Type"CONTENT="text/css"><LINKREL="stylesheet"HREF="common/kde-common.css"TYPE="text/css"><METAHTTP-EQUIV="Content-Type"CONTENT="text/html; charset=iso-8859-1"><METAHTTP-EQUIV="Content-Language"CONTENT="en"><LINKREL="stylesheet"HREF="common/kde-localised.css"TYPE="text/css"TITLE="KDE-English"><LINKREL="stylesheet"HREF="common/kde-default.css"TYPE="text/css"TITLE="KDE-Default"></HEAD><BODYCLASS="SECT1"BGCOLOR="#FFFFFF"TEXT="#000000"LINK="#AA0000"VLINK="#AA0055"ALINK="#AA0000"STYLE="font-family: sans-serif;"><DIVCLASS="NAVHEADER"><TABLEWIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><THCOLSPAN="3"ALIGN="center">Advanced Bash-Scripting Guide: An in-depth exploration of the art of shell scripting</TH></TR><TR><TDWIDTH="10%"ALIGN="left"VALIGN="bottom"><AHREF="assortedtips.html">Prev</A></TD><TDWIDTH="80%"ALIGN="center"VALIGN="bottom">Chapter 33. Miscellany</TD><TDWIDTH="10%"ALIGN="right"VALIGN="bottom"><AHREF="portabilityissues.html">Next</A></TD></TR></TABLE><HRALIGN="LEFT"WIDTH="100%"></DIV><DIVCLASS="SECT1"><H1CLASS="SECT1"><ANAME="SECURITYISSUES">33.8. Security Issues</A></H1><DIVCLASS="SECT2"><H2CLASS="SECT2"><ANAME="INFECTEDSCRIPTS">33.8.1. Infected Shell Scripts</A></H2><P>A brief warning about script security is appropriate. A shell script may contain a <ICLASS="EMPHASIS">worm</I>, <ICLASS="EMPHASIS">trojan</I>, or even a <ICLASS="EMPHASIS">virus</I>. For that reason, never run as root a script (or permit it to be inserted into the system startup scripts in <TTCLASS="FILENAME">/etc/rc.d</TT>) unless you have obtained said script from a trusted source or you have carefully analyzed it to make certain it does nothing harmful.</P><P>Various researchers at Bell Labs and other sites, including M. Douglas McIlroy, Tom Duff, and Fred Cohen have investigated the implications of shell script viruses. They conclude that it is all to easy for even a novice, a <SPANCLASS="QUOTE">"script kiddie"</SPAN>, to write one. <ANAME="AEN15781"HREF="#FTN.AEN15781">[1]</A> </P><P>Here is yet another reason to learn scripting. Being able to look at and understand scripts may protect your system from being hacked or damaged.</P></DIV><DIVCLASS="SECT2"><H2CLASS="SECT2"><ANAME="HIDINGSOURCE">33.8.2. Hiding Shell Script Source</A></H2><P>For security purposes, it may be necessary to render a script unreadable. If only there were a utility to create a stripped binary executable from a script. Francisco Rosales' <AHREF="http://www.datsi.fi.upm.es/~frosal/sources/"TARGET="_top">shc - generic shell script compiler</A> does exactly that.</P><P>Unfortunately, according to <AHREF="http://www.linuxjournal.com/article/8256"TARGET="_top">an article in the October, 2005 <ICLASS="EMPHASIS">Linux Journal</I></A>, the binary can, in at least some cases, be decrypted to recover the original script source. Still, this could be a useful method of keeping scripts secure from all but the most skilled hackers.</P></DIV></DIV><H3CLASS="FOOTNOTES">Notes</H3><TABLEBORDER="0"CLASS="FOOTNOTES"WIDTH="100%"><TR><TDALIGN="LEFT"VALIGN="TOP"WIDTH="5%"><ANAME="FTN.AEN15781"HREF="securityissues.html#AEN15781">[1]</A></TD><TDALIGN="LEFT"VALIGN="TOP"WIDTH="95%"><P>See Marius van Oers' article, <AHREF="http://www.virusbtn.com/magazine/archives/200204/malshell.xml"TARGET="_top">Unix Shell Scripting Malware</A>, and also the <ICLASS="EMPHASIS">Denning</I> reference in the <AHREF="biblio.html#BIBLIOREF">bibliography</A>.</P></TD></TR></TABLE><DIVCLASS="NAVFOOTER"><HRALIGN="LEFT"WIDTH="100%"><TABLEWIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top"><AHREF="assortedtips.html">Prev</A></TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="index.html">Home</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top"><AHREF="portabilityissues.html">Next</A></TD></TR><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top">Assorted Tips</TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="miscellany.html">Up</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top">Portability Issues</TD></TR></TABLE></DIV></BODY></HTML>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?