<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Free Tech Support &#187; Topic: How to Prevent iframe Injection</title>
		<link>http://www.amitbhawani.com/help/topic/how-to-pevent-iframe-injection</link>
		<description>Online Support Forum</description>
		<language>en-US</language>
		<pubDate>Sun, 21 Mar 2010 13:06:21 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.2</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://www.amitbhawani.com/help/search.php</link>
		</textInput>
		<atom:link href="http://www.amitbhawani.com/help/rss/topic/how-to-pevent-iframe-injection" rel="self" type="application/rss+xml" />

		<item>
			<title>Nelson on "How to Prevent iframe Injection"</title>
			<link>http://www.amitbhawani.com/help/topic/how-to-pevent-iframe-injection#post-481</link>
			<pubDate>Wed, 01 Jul 2009 04:30:37 +0000</pubDate>
			<dc:creator>Nelson</dc:creator>
			<guid isPermaLink="false">481@http://www.amitbhawani.com/help/</guid>
			<description>&lt;p&gt;Thanks for the tutorial.
&lt;/p&gt;</description>
		</item>
		<item>
			<title>Amit Bhawani on "How to Prevent iframe Injection"</title>
			<link>http://www.amitbhawani.com/help/topic/how-to-pevent-iframe-injection#post-431</link>
			<pubDate>Mon, 08 Jun 2009 04:11:47 +0000</pubDate>
			<dc:creator>Amit Bhawani</dc:creator>
			<guid isPermaLink="false">431@http://www.amitbhawani.com/help/</guid>
			<description>&lt;p&gt;The features of that programs are :&lt;br /&gt;
1.) Hacker injects code, increasing the file size.&lt;br /&gt;
2.) Next request to serve the home page (or other page of your choice) triggers the detector, which compares current file size with that for archived original.&lt;br /&gt;
3.) Detector sends email with file mod timestamp to webmaster.&lt;br /&gt;
4.) Script replaces hacked file with copy of an archived original, exits.&lt;/p&gt;
&lt;p&gt;You need to add the following code on the top of index.php after DOCTYPE declaration and also enter your email address in this code.&lt;/p&gt;
&lt;p&gt;function hackDet () {&lt;br /&gt;
$tst = &quot;&quot;;&lt;br /&gt;
$gzt = &quot;index.php&quot;;&lt;br /&gt;
$stat = stat($gzt);&lt;br /&gt;
$gzt2 = &quot;refz/x_&quot; . $gzt;&lt;br /&gt;
$rstat = stat($gzt2);&lt;br /&gt;
$ref = $rstat[size];&lt;br /&gt;
$rtim = $_SERVER[&#039;REQUEST_TIME&#039;];&lt;br /&gt;
$rtim2 = date(&quot;F d Y H:i:s.&quot;, $rtim) . &quot; Eastern&quot;;&lt;br /&gt;
$mtim = filemtime($gzt);&lt;br /&gt;
$mtim2 = date(&quot;F d Y H:i:s.&quot;, $mtim) . &quot; Eastern&quot;;&lt;/p&gt;
&lt;p&gt;if ($stat[size] &lt;&gt; $ref)&lt;br /&gt;
{&lt;br /&gt;
$fw = &quot;index.php&quot;;&lt;br /&gt;
$hak = file_get_contents($fw);&lt;/p&gt;
&lt;p&gt;$msg = &quot;$gzt has $stat[size] bytes and not $ref as it should.\n\n&quot;;&lt;br /&gt;
$msg .= &quot;FILE MOD TIME $mtim: $mtim2\n&quot;;&lt;br /&gt;
$msg .= &quot;REQUEST_TIME $rtim: $rtim2\n\n&quot;;&lt;br /&gt;
$msg .= &quot;=================\n\n&quot;;&lt;br /&gt;
$msg .= $hak;&lt;/p&gt;
&lt;p&gt;$msg = wordwrap($msg, 70);&lt;br /&gt;
mail(&#039; &lt;a href=&quot;mailto:yourn...@yourdomain.comThis&quot;&gt;yourn...@yourdomain.comThis&lt;/a&gt; e-mail address is being protected from spam bots, you need JavaScript enabled to view it &#039;, &#039;HACK ALERT&#039;, $msg);&lt;/p&gt;
&lt;p&gt;$fr = &quot;refz/x_index.php&quot;;&lt;br /&gt;
$str = file_get_contents($fr);&lt;br /&gt;
$tst = file_put_contents($fw, $str);&lt;br /&gt;
}&lt;br /&gt;
return $tst;&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;$tst = hackDet(); // calls the hack detection function&lt;br /&gt;
?&gt;
&lt;/p&gt;</description>
		</item>
		<item>
			<title>knmurthy on "How to Prevent iframe Injection"</title>
			<link>http://www.amitbhawani.com/help/topic/how-to-pevent-iframe-injection#post-430</link>
			<pubDate>Mon, 08 Jun 2009 00:28:38 +0000</pubDate>
			<dc:creator>knmurthy</dc:creator>
			<guid isPermaLink="false">430@http://www.amitbhawani.com/help/</guid>
			<description>&lt;p&gt;Hi Amit,&lt;br /&gt;
Today morning i got a site, which is giving the email alerts code , which will give alerts to our email when the code is attacked. The theory behind the code is simple, it keep on compares the size of index.php file. When it is hacked or iframe injected the size of file will vary. So, it will send the email alert. But i am confusing where to keep that code in our files? please clarify me. The ref site: &lt;a href=&quot;http://badmalweb.com/bad-mal-web-extracts/bad-mal-web-extracts/injection-hack-detection-method---php-code.html&quot; rel=&quot;nofollow&quot;&gt;http://badmalweb.com/bad-mal-web-extracts/bad-mal-web-extracts/injection-hack-detection-method---php-code.html&lt;/a&gt;
&lt;/p&gt;</description>
		</item>
		<item>
			<title>Amit Bhawani on "How to Prevent iframe Injection"</title>
			<link>http://www.amitbhawani.com/help/topic/how-to-pevent-iframe-injection#post-419</link>
			<pubDate>Fri, 05 Jun 2009 08:33:46 +0000</pubDate>
			<dc:creator>Amit Bhawani</dc:creator>
			<guid isPermaLink="false">419@http://www.amitbhawani.com/help/</guid>
			<description>&lt;p&gt;i)But is there any plugin / software, which can send alert message immediately when the iframes are injected to our site?&lt;/p&gt;
&lt;p&gt;I dont think there are any alert plugins which can get this job done.&lt;/p&gt;
&lt;p&gt;ii) Is there any plugin / software which will automatically reject the iframe injection?&lt;/p&gt;
&lt;p&gt;Most security plugins would notify you in the backend for insecure folders and script problems. Need to find any scripts like the one you asked for.&lt;/p&gt;
&lt;p&gt;iii)Will WP Security Scan plugin stop the iframe injection? or it will do just scanning like exploit-scanner plugin?&lt;br /&gt;
As i said it wont be able to stop it completely.
&lt;/p&gt;</description>
		</item>
		<item>
			<title>knmurthy on "How to Prevent iframe Injection"</title>
			<link>http://www.amitbhawani.com/help/topic/how-to-pevent-iframe-injection#post-413</link>
			<pubDate>Thu, 04 Jun 2009 07:18:38 +0000</pubDate>
			<dc:creator>knmurthy</dc:creator>
			<guid isPermaLink="false">413@http://www.amitbhawani.com/help/</guid>
			<description>&lt;p&gt;I have added exploit-scanner plugin in this site after experiencing the first iframe attack. It is useful for scanning, and for showing the places, where the iframes are existing in the codes.&lt;br /&gt;
i)But is there any plugin / software, which can send alert message immediately when the iframes are injected to our site?&lt;br /&gt;
ii) Is there any plugin / software which will automatically reject the iframe injection?&lt;br /&gt;
iii)Will WP Security Scan plugin stop the iframe injection? or it will do just scanning like exploit-scanner plugin?
&lt;/p&gt;</description>
		</item>
		<item>
			<title>Amit Bhawani on "How to Prevent iframe Injection"</title>
			<link>http://www.amitbhawani.com/help/topic/how-to-pevent-iframe-injection#post-407</link>
			<pubDate>Thu, 04 Jun 2009 05:08:23 +0000</pubDate>
			<dc:creator>Amit Bhawani</dc:creator>
			<guid isPermaLink="false">407@http://www.amitbhawani.com/help/</guid>
			<description>&lt;p&gt;Regarding the hosting companies, we have backend virus scanners and scripts, permissions checkers which keep working in the background but the hackers keep finding ways to get into our servers. No one can help you secure and backup your data even though promised, you need to have your own copies for sure.
&lt;/p&gt;</description>
		</item>
		<item>
			<title>Amit Bhawani on "How to Prevent iframe Injection"</title>
			<link>http://www.amitbhawani.com/help/topic/how-to-pevent-iframe-injection#post-406</link>
			<pubDate>Thu, 04 Jun 2009 05:06:04 +0000</pubDate>
			<dc:creator>Amit Bhawani</dc:creator>
			<guid isPermaLink="false">406@http://www.amitbhawani.com/help/</guid>
			<description>&lt;p&gt;Excellent post with detailed instructions how you removed the iframe injection and prevention tips.&lt;/p&gt;
&lt;p&gt;I would also recommend using the plugins listed in this post which can help you for more security.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.amitbhawani.com/blog/remove-harmful-website-warning/&quot; rel=&quot;nofollow&quot;&gt;http://www.amitbhawani.com/blog/remove-harmful-website-warning/&lt;/a&gt;
&lt;/p&gt;</description>
		</item>
		<item>
			<title>knmurthy on "How to Prevent iframe Injection"</title>
			<link>http://www.amitbhawani.com/help/topic/how-to-pevent-iframe-injection#post-404</link>
			<pubDate>Thu, 04 Jun 2009 02:04:37 +0000</pubDate>
			<dc:creator>knmurthy</dc:creator>
			<guid isPermaLink="false">404@http://www.amitbhawani.com/help/</guid>
			<description>&lt;p&gt;Hi Amit, today early morning around 4.00AM, i found that 0 people on &lt;a href=&quot;http://www.andhrapradeshstate.in&quot; rel=&quot;nofollow&quot;&gt;http://www.andhrapradeshstate.in&lt;/a&gt;. It can happen, when Google keep the site in Sand box or Ban. Or it can happen some one hack the site. So, opened my site, to confirm whether my site is working properly, and found &#039;Unknown characters at XXXXX.php in line No. 17&#039;. &lt;/p&gt;
&lt;p&gt;Earlier also all my sites faced with iframe injection. So, I went to all index files and replaced the original code. I have observed that this iframe virus is deleting letter by letter in the codes. That means if we identify damage lately the deleted characters will be more. Mainly these iframe code are belongs to &#039;.cn&#039; sites. I searched many forums, got information like these iframe virus was introduced by anti-virus people for their busines growth, now SEO people are using these iframe injections to grab the high PR site&#039;s link juice. &lt;/p&gt;
&lt;p&gt;And I found prevention methods&lt;br /&gt;
i) keep changing cpanel passwords regularly,&lt;br /&gt;
ii) ask you hosting people about the security of cpanel, iii)whenever you work with ftp, after that change passwords. So, I have tried to change my cpanel passwords in my cpanel. But it is rejecting. Earlier, my host people done these at their end. But I can&#039;t disturb them  whenever I want to change the password. So, I have requested my hosting people to facilitate me to change my cpanel password in my cpanel itself. &lt;/p&gt;
&lt;p&gt;And my another doubt How the hosting people can help in these matters? Is there any other better prevention method?
&lt;/p&gt;</description>
		</item>

	</channel>
</rss>
