MyBB Community Forums

Full Version: Attacked by iFrames
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I don't know if it is considered a DDoS attack but I found my website is being attacked even now ATM. I went in AWStats in cPanel and found that one website had many links referring to my site. I checked and the code of that page had 3 iframes loading my website and the site attacking mines is very active. I had a peak of 6000. So I'm still getting attacked ATM. I have so much bandwidth ATM but the attack is taking it up and making my site slow. is there a way to stop the iframes. I found a JavaScript snipit, but it failed.

So am I screwed...
Try adding this to your website:

<script language="JavaScript">
<!--
if(top.frames.length > 0)
top.location.href=self.location;
//-->
</script>
(2010-12-12, 04:02 AM)Zash Wrote: [ -> ]Try adding this to your website:

<script language="JavaScript">
<!--
if(top.frames.length > 0)
top.location.href=self.location;
//-->
</script>

What does this do?
From what i got out of googling, It forces your page out of any frame and displays it properly.
(2010-12-12, 04:02 AM)Zash Wrote: [ -> ]Try adding this to your website:

<script language="JavaScript">
<!--
if(top.frames.length > 0)
top.location.href=self.location;
//-->
</script>

where would you add this?
(2010-12-12, 11:23 AM)thelonelylife Wrote: [ -> ]
(2010-12-12, 04:02 AM)Zash Wrote: [ -> ]Try adding this to your website:

<script language="JavaScript">
<!--
if(top.frames.length > 0)
top.location.href=self.location;
//-->
</script>

where would you add this?

In the header(or head tags). If it's just mybb I believe the template is header includes or something like that.
The problem with this solution is that it will make your page load every time someone visits that site. So someone goes to that site, your forum detects it is being loaded in an iframe, and forces itself to take the whole window over from the site that is using the iframes.
(2010-12-12, 02:32 PM)Dylan M. Wrote: [ -> ]The problem with this solution is that it will make your page load every time someone visits that site. So someone goes to that site, your forum detects it is being loaded in an iframe, and forces itself to take the whole window over from the site that is using the iframes.
then the site doing the iframe thingy will get annoyed and remove the iframe.
I got the site to stop the attack. with that solution above, the site will looad 3 iframes and then it will reloaded it 3 more time.
(2010-12-12, 02:34 PM)Nayar Wrote: [ -> ]
(2010-12-12, 02:32 PM)Dylan M. Wrote: [ -> ]The problem with this solution is that it will make your page load every time someone visits that site. So someone goes to that site, your forum detects it is being loaded in an iframe, and forces itself to take the whole window over from the site that is using the iframes.
then the site doing the iframe thingy will get annoyed and remove the iframe.

Not really, because of the below:
(2010-12-12, 02:48 PM)Casey S Wrote: [ -> ]I got the site to stop the attack. with that solution above, the site will looad 3 iframes and then it will reloaded it 3 more time.

Which sucks even more for your bandwidth.

The best solution is to ask the site. If they won't fix their page, you contact their host and complain. If that gets you nowhere, you file a complaint with your own host, and if that fails as well you file a legal complaint.
Pages: 1 2