<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Web Cash &#187; shell</title>
	<atom:link href="http://www.earn-web-cash.com/tag/shell/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.earn-web-cash.com</link>
	<description>Writing, Designing, and Making Money Online</description>
	<lastBuildDate>Sun, 04 Dec 2011 22:52:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2</generator>
		<item>
		<title>Protect Against Shell Script Hacks</title>
		<link>http://www.earn-web-cash.com/2008/01/12/protect-shell-script/</link>
		<comments>http://www.earn-web-cash.com/2008/01/12/protect-shell-script/#comments</comments>
		<pubDate>Sat, 12 Jan 2008 14:57:11 +0000</pubDate>
		<dc:creator>Walkere</dc:creator>
				<category><![CDATA[Redirected]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://www.earn-web-cash.com/2008/01/12/protect-shell-script/</guid>
		<description><![CDATA[While browsing through Technorati, I just stumbled on a post about a shell script attack. It seems the poor chap got a shell script uploaded to his server, and the attacker used it to create a bunch of bogus files full of hyperlinks. The original post has some header information about this particular hack (a [...]]]></description>
			<content:encoded><![CDATA[<p>While browsing through Technorati, I just stumbled on a post about a <a href="http://cocaman.ch/wp/2008/01/websites-injected-cool-little-tool/" title="Post about Shell Script Attack, by Geekness">shell script attack</a>.  It seems the poor chap got a shell script uploaded to his server, and the attacker used it to create a bunch of bogus files full of hyperlinks.</p>
<p>The original post has some header information about this particular hack (a modified c100 shell), as well as a link to some search results about the file.  I looked through the <a href="http://www.leetupload.com/database/UNIX/shell.txt">source code for the shell script</a> and tested it out on my local server &#8211; getting some link-filled files is the least that this script could do.<br />
<span id="more-31"></span><br />
Once the script is loaded on your server, anyone can access it remotely and have full access to your system.</p>
<p>The script allows you to navigate through the server&#8217;s directories like any remote file-manager.  I noticed that it could even go up out of the web server root and into my local folders as well.</p>
<p><a href='http://www.earn-web-cash.com/wp-content/uploads/2008/01/shell_script_utils.png' title='Screenshot of Shell Script Utilities'><img class='alignright' src='http://www.earn-web-cash.com/wp-content/uploads/2008/01/shell_script_utils.thumbnail.png' alt='Screenshot of Shell Script Utilities' /></a>The script gathers up all the details on your computer &#8211; like operating system build, running processes, ip address, etc.  The user can run shell commands, create files, upload files, and do other kinds of nasty things.</p>
<p>It would be pretty easy for someone to use this to find the mysql username/password, hack your database, do whatever they want, and pretty wreck your entire site.  Or worse, they could use this to do some nasty things to the server itself &#8211; potentially wrecking other peoples&#8217; sites.</p>
<p>So how do you protect against this?  Well, I&#8217;m not sure what you would do to protect against the shell script once it&#8217;s loaded up.  It looks like it&#8217;s built to bypass most security precautions and give the hacker access to whatever he or she wants.</p>
<p>Your best bet is to be vigilant in restricting front-end uploads to your site.  If you&#8217;ve got an upload script, be sure you restrict what file extensions can be uploaded.  </p>
<p>This script needs to be named with a file extension that is read as php &#8211; so you should never allow users to upload php files (or html if you set up your server to execute those as php).</p>
<p>Being more restrictive is better than less restrictive &#8211; so ban all file extensions <strong>except</strong> the ones you know are safe.  So, for example, you might allow &#8220;.jpg, .gif, .png&#8221; for pictures, and &#8220;.doc, .odt, .pdf, .txt, .rtf&#8221; for documents.</p>
<p>If you&#8217;ve got any other suggestions for security against this sort of thing, please comment away.  Otherwise, take a look at the script so that you are aware of what it can do.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.earn-web-cash.com/2008/01/12/protect-shell-script/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

