Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.


This topic is now archived and is closed to further replies.


Security problems

Recommended Posts

Hello! My web store OSC 2.2 is exist about 8 years. Week ago I have moved to new hosting and found 2 problems:


1. I can see files and browse in folders inside of main catalog directory (excluding admin folder). For example, if I put in browser this address http://mywebsite.com/includes, I can see all files and browse folders inside it. Files content I can't see. All this folders have permissions 0755.

2. Yesterday I saw in "who's online" strange queries from 5 different IP's, like this:








Can you help me with this please?

Share this post

Link to post
Share on other sites

You may need to add an .htaccess file to your includes directory with the following code in it:

Options -Indexes

The rest of the URL request strings are blind database injection attempts probably from an automated attack server that trolls the net looking for osCommerce sites. Decodes to the following:

and(select 1 from(select count(*),concat((select (select (SELECT distinct concat(file_priv,0x27,0x7e) FROM mysql.user  LIMIT 0,1)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) and 1=1

You can either ignore these database injection attempts, or install osC_Sec ( link is in my signature ) which will easily block these requests.

- Stop Oscommerce hacks dead in their tracks with osC_Sec (see discussion here)
- Another discussion about infected files ::here::
- A discussion on file permissions ::here::
- Site hacked? Should you upgrade or not, some thoughts ::here::
- Fix the admin login bypass exploit here
- Pareto Security: New security addon I am developing, a remake of osC_Sec in PHP 5 with a number of fixes
- BTC:1LHiMXedmtyq4wcYLedk9i9gkk8A8Hk7qX

Share this post

Link to post
Share on other sites

Taipo, thank you, after adding Options -Indexes I can't browse them. This code I need to add to all directories inside main catalog, like /cache, /tmp ?

Ok, I will install this module.

Share this post

Link to post
Share on other sites

Your .htaccess settings (e.g., Options -Indexes) apply to all lower level (child) directories beneath the .htaccess file's directory, so there's no need to add more .htaccess files. A couple of things to note:

  1. More and more hosts are banning the use of Options, as a security problem. If your host should do this, you will probably see "500" errors on your site, and you will have to remove the Options -Indexes and do something else (such as putting an empty index.html file in every directory which does not already have an "index" file).
  2. If you have a Windows server (IIS, etc.), not an Apache ("Linux") server, .htaccess files are normally ignored.

Another thing: osC 2.2 is really ancient, and hackers know how to exploit it. Your site probably already has been hacked. You should be immediately moving towards 2.3.4, which is the current version, and make an effort to stay reasonably current.

Share this post

Link to post
Share on other sites