New Exploit
#-19
Posted 31 August 2009 - 10:17 PM
As far as I can see this vulnerability is on all osCommerce 2.2 RC2a sites.
A quick way to ensure that you site is not vulnerable is to password protect the /admin directory. This can usually be done with your hosting control panel (such as Cpanel). Alternatively this can be done using htaccess, there are many guides around the internet on how to do this (e.g. http://www.javascriptkit.com/howto/htaccess3.shtml)
Trogan
#-18
Posted 31 August 2009 - 10:47 PM
$admin_path = 'admin/'; $shellcode = "filename=fly.php&file_contents=test<?php%20@eval(\$_POST[aifly]);?>"; $message="POST ".$path.$admin_path."file_manager.php/login.php?action=save HTTP/1.1\r\n";Looks like renaming the admin folder to something else (suggested on this forum all over the place) or removing the osC file manager (also suggested more times than I can count) would also provide immunity.
"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."
- Me -
"Headers already sent" - The definitive help
"Cannot redeclare ..." - How to find/fix it
SSL Implementation Help
Like this post? "Like" it again over there >
#-17
Posted 01 September 2009 - 09:55 AM
but it seems that the login.php has a whole so you can write files on the server.
does anyone know which line we have to correct to fix that security bug?
#-16
Posted 01 September 2009 - 01:09 PM
Quote
Look at tne code example I posted.
It's file_manager.php doing the writing, not login.php
Remove file_manager.php or rename the admin folder (if you rename the admin folder you have to change the configure file too - don't be stupid).
Either one provides you immunity from this exploit.
"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."
- Me -
"Headers already sent" - The definitive help
"Cannot redeclare ..." - How to find/fix it
SSL Implementation Help
Like this post? "Like" it again over there >
#-15
Posted 01 September 2009 - 01:14 PM
yes it's file_manager.php not login.php (i was writing on it during my post... sorry for the mystake)
rename the folder doesn't change anything ...
with a good http scanner we can find easily where is the admin folder
i just asked if there is any bug correction available ... not a "delete file" solution ....
#-14
Posted 01 September 2009 - 01:21 PM
Problem solved.
Edit: AND add .htacess protection as the originator of this thread suggested.
That can't hurt either.
Edited by germ, 01 September 2009 - 01:23 PM.
"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."
- Me -
"Headers already sent" - The definitive help
"Cannot redeclare ..." - How to find/fix it
SSL Implementation Help
Like this post? "Like" it again over there >
#-13
Posted 01 September 2009 - 04:05 PM
germ, on Sep 1 2009, 09:09 AM, said:
Incidentally, setting up your server so that it doesn't allow the web user write access to files would prevent this entire class of exploit (and incidentally break file_manager.php and define_language.php). This is what I mean when I say that requiring 444 permissions for includes/configure.php is less secure than allowing 644 permissions -- the server should not be able to write to any files, not just includes/configure.php. If I was going to pick one file to replace to compromise an osCommerce install, it would not be includes/configure.php. That's the file that I don't want others to read. I would want to write to a different file.
Unfortunately, it has become common to set things up with the account user as the web user. These really should be two separate functions. It used to be that way. The web server ran as apache or whatever and each user had their own account. Then there were problems with users compromising the accounts of other users, so they separated it. However, they took a step back. Instead of creating a new account for each web user, they started using the user account as the web user. As a result, if your user account has the ability to edit a file, so does the web application. It would be better to have a separate account for the web and the ability to chown files and directories (e.g. the images directory) to be owned by the web.
For that matter, for osCommerce purposes, it would be better to have three accounts: a catalog web user account, an admin web user account, and a regular user account. The catalog account could have low permissions, just read on all files in the catalog directory (and its children -- not counting the admin directory, which can be put elsewhere). The admin web account would have higher permissions, which allow writing to image folders and reading the admin directory. The regular user account would have write permissions on all files. By setting ownership and group settings correctly, the system would be secure in general, even in the face of buffer overflow exploits in apache that permit compromise of web users. At worst, such a compromise would allow editing of files in the images directory, which with proper configuration in a <Directory> section in httpd.conf (so that PHP and other CGI scripts do not run from the images directory) is of limited use to a cracker.
#-12
Posted 02 September 2009 - 12:39 PM
i have a client that needs it because he doesn't know anything about FTP and FTP program
so it's easier for him to go thru the file_manager.php
so no solution for him? just learn how to manage a FTP with a FTP program?
file_manager.php is kind of "native" script of OSC and no one can fix it?
fixing a bug by delete a file doesnt fix anything ....
#-11
Posted 02 September 2009 - 01:28 PM
http://www.oscommerce.info/kb/osCommerce/Common_Problems/15
Is it a good idea to let customers use a application that you know could damage the site when they use it.
There are alternatives if u search
Remember, What you think I ment may not be what I thought I ment when I said it.
Contributions:
Auto Backup your Database, Easy way
Multi Images with Fancy Pop-ups, Easy way
Products in columns with multi buy etc etc
Disable any Category or Product, Easy way
Secure & Improve your account pages et al.
#-10
Posted 21 April 2012 - 08:32 AM
#-9
Posted 21 April 2012 - 11:32 AM
To see what more i can do for you check out my profile [click here]
#-8
Posted 25 April 2012 - 04:15 AM
Are there any working links to updating and securing 2.2rc2a?
Mine is a fully functional and heavily modded site so I wont be updating anytime soon....
#-7 ONLINE
Posted 25 April 2012 - 04:22 AM
This is the only link you need to read about Rc2a
http://forums.oscommerce.com/topic/313323-how-to-secure-your-oscommerce-22-site/
Chris
See my Profile to learn more about add ons, templates, support plans and custom coding (click here)
#-6
Posted 25 April 2012 - 08:07 PM
SambaMambo, on 02 September 2009 - 12:39 PM, said:
i have a client that needs it because he doesn't know anything about FTP and FTP program
so it's easier for him to go thru the file_manager.php
so no solution for him? just learn how to manage a FTP with a FTP program?
file_manager.php is kind of "native" script of OSC and no one can fix it?
fixing a bug by delete a file doesnt fix anything ....
Well, osC's File Manager was poorly written and insecure from the get-go. All of its functionality may be found in any hosting service's "control panel" and a good FTP client such as Filezilla. Given the choice of trying to fix osC File Manager's numerous problems, it was easier just to tell people to use their hosting service's built-in tools to accomplish these tasks.









