<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.0.7" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: How to find a compromised script on shared virtual webhost</title>
	<link>http://spamhuntress.com/2006/07/21/how-to-find-a-compromised-script-on-shared-virtual-webhost/</link>
	<description>Just another WordPress weblog</description>
	<pubDate>Fri, 22 Aug 2008 04:34:17 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.7</generator>

	<item>
		<title>by: admin</title>
		<link>http://spamhuntress.com/2006/07/21/how-to-find-a-compromised-script-on-shared-virtual-webhost/#comment-29230</link>
		<pubDate>Wed, 02 Aug 2006 21:33:38 +0000</pubDate>
		<guid>http://spamhuntress.com/2006/07/21/how-to-find-a-compromised-script-on-shared-virtual-webhost/#comment-29230</guid>
					<description>You know Not-Not, I think you've hit the problem on the head.

The anti-spam community figured out how to teach sys-admins the pain of allowing mail spammers on their services when they figured out they could use blocklists.

But so far we don't have anything to punish providers who sell services to webspammers.

If we can figure out something that really hurts, but that isn't seen as unfair, we might actually get somewhere.

Hostgator still hasn't figured out how to stop the referrer spamming script. Frankly, I don't think they even tried. It cost too much.

So, in terms of providers, the pain would have to be: It costs more to keep the spammers or the compromised script than to fix it.

When we solve that one, we can get somewhere with webspam.</description>
		<content:encoded><![CDATA[<p>You know Not-Not, I think you&#8217;ve hit the problem on the head.</p>
<p>The anti-spam community figured out how to teach sys-admins the pain of allowing mail spammers on their services when they figured out they could use blocklists.</p>
<p>But so far we don&#8217;t have anything to punish providers who sell services to webspammers.</p>
<p>If we can figure out something that really hurts, but that isn&#8217;t seen as unfair, we might actually get somewhere.</p>
<p>Hostgator still hasn&#8217;t figured out how to stop the referrer spamming script. Frankly, I don&#8217;t think they even tried. It cost too much.</p>
<p>So, in terms of providers, the pain would have to be: It costs more to keep the spammers or the compromised script than to fix it.</p>
<p>When we solve that one, we can get somewhere with webspam.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Not-Not</title>
		<link>http://spamhuntress.com/2006/07/21/how-to-find-a-compromised-script-on-shared-virtual-webhost/#comment-29225</link>
		<pubDate>Wed, 02 Aug 2006 21:09:51 +0000</pubDate>
		<guid>http://spamhuntress.com/2006/07/21/how-to-find-a-compromised-script-on-shared-virtual-webhost/#comment-29225</guid>
					<description>Egad .... has the world gone mad?!?!?!  Knowing everyone's business is a risky affair and is better left for the politicians.  It's better to set early expectations that misbehavior results in immediately degraded QOS.  So, if a sysadmin is going to do a good job she/he has to be willing to enforce some basic, behavioral rules.  Rules like ... "If you get caught spamming you'll find yourself set with a 64k or smaller QOS until the spam complaints stop."  As I see it, spammers, or any miscreant for that matter, behave the way they do because the perceived pain related so said behavior is less than what they understand as reward.  The trick is to make the realized pain (in this case degraded QOS to the spammer) higher than the spammer's ability to achieve reward.  For instance, a child sees a paperclip and an electrical wall socket.  The first time this combination is realized the child thinks "hey, inserting Mr. Paperclip into Mr. Wall socket might make a cool spark."  Thus, the perceived reward is higher than the unknown pain.  The first time the child sticks said paper clip into said electrical socket, their perception of the reward of seeing the magical spark wanes and is replaced by the realization that electricity is for electrical engines and light bulbs and NOT for human consumption. </description>
		<content:encoded><![CDATA[<p>Egad &#8230;. has the world gone mad?!?!?!  Knowing everyone&#8217;s business is a risky affair and is better left for the politicians.  It&#8217;s better to set early expectations that misbehavior results in immediately degraded QOS.  So, if a sysadmin is going to do a good job she/he has to be willing to enforce some basic, behavioral rules.  Rules like &#8230; &#8220;If you get caught spamming you&#8217;ll find yourself set with a 64k or smaller QOS until the spam complaints stop.&#8221;  As I see it, spammers, or any miscreant for that matter, behave the way they do because the perceived pain related so said behavior is less than what they understand as reward.  The trick is to make the realized pain (in this case degraded QOS to the spammer) higher than the spammer&#8217;s ability to achieve reward.  For instance, a child sees a paperclip and an electrical wall socket.  The first time this combination is realized the child thinks &#8220;hey, inserting Mr. Paperclip into Mr. Wall socket might make a cool spark.&#8221;  Thus, the perceived reward is higher than the unknown pain.  The first time the child sticks said paper clip into said electrical socket, their perception of the reward of seeing the magical spark wanes and is replaced by the realization that electricity is for electrical engines and light bulbs and NOT for human consumption.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: admin</title>
		<link>http://spamhuntress.com/2006/07/21/how-to-find-a-compromised-script-on-shared-virtual-webhost/#comment-28991</link>
		<pubDate>Tue, 01 Aug 2006 17:16:34 +0000</pubDate>
		<guid>http://spamhuntress.com/2006/07/21/how-to-find-a-compromised-script-on-shared-virtual-webhost/#comment-28991</guid>
					<description>Hi again Not-Not,
I have (to start with) no idea what kind of "ship" the sys admin in question is running. Let's just say I don't think he's on first name terms with and IDS of any color. They're probably running cpanel or some other control panel, and have up to 100 users on one box. Webhosting.info shows 480 domains on that specific box (though that data is out of sync - it might be significantly less or more). Loads of them look spammy too, so management is probably lax to start with.

But the problem that host is facing could be faced by any webhost that sells virtual webhosting, if they don't know what they're doing.

The box you're describing sounds like a very different kind of ship. The admin knows everybody's business before they're allowed on the box, eh?</description>
		<content:encoded><![CDATA[<p>Hi again Not-Not,<br />
I have (to start with) no idea what kind of &#8220;ship&#8221; the sys admin in question is running. Let&#8217;s just say I don&#8217;t think he&#8217;s on first name terms with and IDS of any color. They&#8217;re probably running cpanel or some other control panel, and have up to 100 users on one box. Webhosting.info shows 480 domains on that specific box (though that data is out of sync - it might be significantly less or more). Loads of them look spammy too, so management is probably lax to start with.</p>
<p>But the problem that host is facing could be faced by any webhost that sells virtual webhosting, if they don&#8217;t know what they&#8217;re doing.</p>
<p>The box you&#8217;re describing sounds like a very different kind of ship. The admin knows everybody&#8217;s business before they&#8217;re allowed on the box, eh?
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Not-Not</title>
		<link>http://spamhuntress.com/2006/07/21/how-to-find-a-compromised-script-on-shared-virtual-webhost/#comment-28979</link>
		<pubDate>Tue, 01 Aug 2006 15:53:03 +0000</pubDate>
		<guid>http://spamhuntress.com/2006/07/21/how-to-find-a-compromised-script-on-shared-virtual-webhost/#comment-28979</guid>
					<description>From what I hastily read it seemed like you were wondering how to remedy a compromised script and/or how to track down said script.  It seems that Blog/CMS type systems many times fall prey to compromised scripts because they allow posts with  tags (think AJAX here) OR because they allow posts with header redirect tags that fire spam runs on a target machine elsewhere.  If, on the other hand you were talking about a script that was compromised via an OS path (think rootkit) then I'd say the box is Pwn3d anyway and the problem resides with a lackadaisical sys admin.  Said sys admin should, of course, be barred from cheap beer distribution for at least 48 hours as penance for her/his transgression :-).  If the CMS/Blog install was compromised via a file upload allowed by the software interface / web interface the person running CMS/Blog has chosen, well the person running CMS/Blog should be barred from cheap beer distribution AND spatula use for at least 48 hours as penance for her/his transgression :-).  Insofar as connecting to port 80 on the remote machine, maybe and maybe not.  One can run a web server or java application container on any port not already bound to by another process.  One way to keep this kind of thing under wraps is to smear on a healthy dose of IpTables to allow only in and out bound traffic on ports to which the sys admin agrees.  For example, if there were a box called, err hemm, the “mighty amigo” the SA might set up the IpTables to only allow inbound traffic on TCP-22, TCP-80, TCP-25 and nothing else.  Further, said SA might also only allow outbound connections on the same ports.  If a user on the “mighty Amigo” wanted a daemon to run on some other port, they’d have to clear that with the SA.  This way even if the compromised script tried to form its connection on 80 or even some other port you’d see it in the syslog.  Insofar as inbound “zombie” control traffic … that’s a bit more difficult.  The reason being that the spam controller already knows you’re compromised and, if they’re smart, they’ve already figured out what your TCP allowed infrastructure looks like.  So, in this case one could use mod_throttle to choke inbound traffic the apache instance.  This is because a web server should be doing most of its work going outbound anyway (small inbound requests, fat outbound replies).  If these were not the paths of compromise you intended then pay no attention to me.

Not-Not</description>
		<content:encoded><![CDATA[<p>From what I hastily read it seemed like you were wondering how to remedy a compromised script and/or how to track down said script.  It seems that Blog/CMS type systems many times fall prey to compromised scripts because they allow posts with  tags (think AJAX here) OR because they allow posts with header redirect tags that fire spam runs on a target machine elsewhere.  If, on the other hand you were talking about a script that was compromised via an OS path (think rootkit) then I&#8217;d say the box is Pwn3d anyway and the problem resides with a lackadaisical sys admin.  Said sys admin should, of course, be barred from cheap beer distribution for at least 48 hours as penance for her/his transgression <img src='http://spamhuntress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> .  If the CMS/Blog install was compromised via a file upload allowed by the software interface / web interface the person running CMS/Blog has chosen, well the person running CMS/Blog should be barred from cheap beer distribution AND spatula use for at least 48 hours as penance for her/his transgression <img src='http://spamhuntress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> .  Insofar as connecting to port 80 on the remote machine, maybe and maybe not.  One can run a web server or java application container on any port not already bound to by another process.  One way to keep this kind of thing under wraps is to smear on a healthy dose of IpTables to allow only in and out bound traffic on ports to which the sys admin agrees.  For example, if there were a box called, err hemm, the “mighty amigo” the SA might set up the IpTables to only allow inbound traffic on TCP-22, TCP-80, TCP-25 and nothing else.  Further, said SA might also only allow outbound connections on the same ports.  If a user on the “mighty Amigo” wanted a daemon to run on some other port, they’d have to clear that with the SA.  This way even if the compromised script tried to form its connection on 80 or even some other port you’d see it in the syslog.  Insofar as inbound “zombie” control traffic … that’s a bit more difficult.  The reason being that the spam controller already knows you’re compromised and, if they’re smart, they’ve already figured out what your TCP allowed infrastructure looks like.  So, in this case one could use mod_throttle to choke inbound traffic the apache instance.  This is because a web server should be doing most of its work going outbound anyway (small inbound requests, fat outbound replies).  If these were not the paths of compromise you intended then pay no attention to me.</p>
<p>Not-Not
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: admin</title>
		<link>http://spamhuntress.com/2006/07/21/how-to-find-a-compromised-script-on-shared-virtual-webhost/#comment-28825</link>
		<pubDate>Mon, 31 Jul 2006 20:24:25 +0000</pubDate>
		<guid>http://spamhuntress.com/2006/07/21/how-to-find-a-compromised-script-on-shared-virtual-webhost/#comment-28825</guid>
					<description>Hey Not-Not, fancy seeing you here ;-)

Are you talking about comment spamming here? Because disallowing html and tags is a fine thing, but would it help with securing scripts against injection and other misuses?</description>
		<content:encoded><![CDATA[<p>Hey Not-Not, fancy seeing you here <img src='http://spamhuntress.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Are you talking about comment spamming here? Because disallowing html and tags is a fine thing, but would it help with securing scripts against injection and other misuses?
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Not-Not</title>
		<link>http://spamhuntress.com/2006/07/21/how-to-find-a-compromised-script-on-shared-virtual-webhost/#comment-28759</link>
		<pubDate>Mon, 31 Jul 2006 13:54:34 +0000</pubDate>
		<guid>http://spamhuntress.com/2006/07/21/how-to-find-a-compromised-script-on-shared-virtual-webhost/#comment-28759</guid>
					<description>An easy, but fairly boring pseudo fix is, if one is runing a Nuke derivitive (phpNuke, PostNuke, Xooops, etc.), disallow all html and  tags in posts.  I know this is defeatable, but it is a fine way to make ye ole' spammer work harder.</description>
		<content:encoded><![CDATA[<p>An easy, but fairly boring pseudo fix is, if one is runing a Nuke derivitive (phpNuke, PostNuke, Xooops, etc.), disallow all html and  tags in posts.  I know this is defeatable, but it is a fine way to make ye ole&#8217; spammer work harder.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: admin</title>
		<link>http://spamhuntress.com/2006/07/21/how-to-find-a-compromised-script-on-shared-virtual-webhost/#comment-28221</link>
		<pubDate>Sat, 29 Jul 2006 11:51:42 +0000</pubDate>
		<guid>http://spamhuntress.com/2006/07/21/how-to-find-a-compromised-script-on-shared-virtual-webhost/#comment-28221</guid>
					<description>To Vasily:
How about a webhost, after being notified that something like this is happening, wants to monitor outbound connections. These will look different from responses to inbound connections. So it should be possible to monitor them, at least for a while. Have you thought out exactly what would be needed?

Ethereal with some filter rules?

How much load increase would running Ethereal in this way introduce?

BTW, clever nickname. A rewrite on the old Russian John Doe!</description>
		<content:encoded><![CDATA[<p>To Vasily:<br />
How about a webhost, after being notified that something like this is happening, wants to monitor outbound connections. These will look different from responses to inbound connections. So it should be possible to monitor them, at least for a while. Have you thought out exactly what would be needed?</p>
<p>Ethereal with some filter rules?</p>
<p>How much load increase would running Ethereal in this way introduce?</p>
<p>BTW, clever nickname. A rewrite on the old Russian John Doe!
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Vasily Pumpkin</title>
		<link>http://spamhuntress.com/2006/07/21/how-to-find-a-compromised-script-on-shared-virtual-webhost/#comment-28216</link>
		<pubDate>Sat, 29 Jul 2006 11:36:47 +0000</pubDate>
		<guid>http://spamhuntress.com/2006/07/21/how-to-find-a-compromised-script-on-shared-virtual-webhost/#comment-28216</guid>
					<description>A small correction of my comment:

"...Actually you could even realise a script, that automatically updates its proxy list by contacting a remote server..."

This wasn't very thought well by me :-). A smarter way of updating proxies would be to contact a couple of proxy sites, fetch their updates and extract the servers replacing the old list.</description>
		<content:encoded><![CDATA[<p>A small correction of my comment:</p>
<p>&#8220;&#8230;Actually you could even realise a script, that automatically updates its proxy list by contacting a remote server&#8230;&#8221;</p>
<p>This wasn&#8217;t very thought well by me <img src='http://spamhuntress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> . A smarter way of updating proxies would be to contact a couple of proxy sites, fetch their updates and extract the servers replacing the old list.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Vasily Pumpkin</title>
		<link>http://spamhuntress.com/2006/07/21/how-to-find-a-compromised-script-on-shared-virtual-webhost/#comment-28210</link>
		<pubDate>Sat, 29 Jul 2006 11:22:51 +0000</pubDate>
		<guid>http://spamhuntress.com/2006/07/21/how-to-find-a-compromised-script-on-shared-virtual-webhost/#comment-28210</guid>
					<description>A spam script can easily inserted by scanning hosts for vulnerable scripts /content management systems. It may take a couple of weeks if not months before these scripts will be used (waiting till the dust has settled). Also, if a spammer isn't silly, he won't select servers which only host a few domains, but rather go with overcrowded servers run by cheapo hosting companies. This is a strategy used by many phishing sites, rather than registering domains, which would require a bullet proof hosting company, which likely is already on someone's black list.

Unlike inbound traffic (which will be recorded in server logs) outbound traffic remains uncontrolled, so it's quite a lot of work to determine whose script out of hundreds of virtual hosts is actually responsible for spamming. But you may as well never see the source of the spam as it's pretty trivial for an experienced programmer to have his spam tool used proxy server. And if those proxies are located in mainland China or Korea, your odds at finding someone telling you who's actually responsible for the spam are fairly slim.

Actually you could even realise a script, that automatically updates its proxy list by contacting a remote server (ideally bulletproof like netcathosting or inhoster). Since that's again outbound, you won't find any records of the connection. Silly scripts would require manual interaction, which means the spammer needed to contact the server and insert the update -&#62; inbound connection -&#62; present in server logs. But then you'll have the problem of finding the compromised virtual host out of hundreds on the server.

So as a summary, your luck in squashing a spammer largely depends on his stupidity ;-)</description>
		<content:encoded><![CDATA[<p>A spam script can easily inserted by scanning hosts for vulnerable scripts /content management systems. It may take a couple of weeks if not months before these scripts will be used (waiting till the dust has settled). Also, if a spammer isn&#8217;t silly, he won&#8217;t select servers which only host a few domains, but rather go with overcrowded servers run by cheapo hosting companies. This is a strategy used by many phishing sites, rather than registering domains, which would require a bullet proof hosting company, which likely is already on someone&#8217;s black list.</p>
<p>Unlike inbound traffic (which will be recorded in server logs) outbound traffic remains uncontrolled, so it&#8217;s quite a lot of work to determine whose script out of hundreds of virtual hosts is actually responsible for spamming. But you may as well never see the source of the spam as it&#8217;s pretty trivial for an experienced programmer to have his spam tool used proxy server. And if those proxies are located in mainland China or Korea, your odds at finding someone telling you who&#8217;s actually responsible for the spam are fairly slim.</p>
<p>Actually you could even realise a script, that automatically updates its proxy list by contacting a remote server (ideally bulletproof like netcathosting or inhoster). Since that&#8217;s again outbound, you won&#8217;t find any records of the connection. Silly scripts would require manual interaction, which means the spammer needed to contact the server and insert the update -&gt; inbound connection -&gt; present in server logs. But then you&#8217;ll have the problem of finding the compromised virtual host out of hundreds on the server.</p>
<p>So as a summary, your luck in squashing a spammer largely depends on his stupidity <img src='http://spamhuntress.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />
</p>
]]></content:encoded>
				</item>
</channel>
</rss>
