First I like to thank the osCommerce team, you have given all a change to get there own online shop without spending a lot of money.
But now to the point of this post, I find it very sad that V3 seams to be at high risk site, I am no pro, but I do know that if you are building an online shop Security must be at the highest level.
If someone ask about V3 in this forum nothing happen, except answer like “you should know it is a demo, and bla bla bla”
Ore they are referred to the security threat on V2, and there are many scripts on the V2 security, who do not work on V3, and I think that V2 is also running with security problems.
But anyway stop crossing these 2 different sites. V2 and V3 are not the same sites, that is why osCommerce made two forums.
I know V3 is a demo site, but it is out, and can be downloaded by the enterer world, and people are tempted to try it, and are using it.
If it is not safe, someone must take responsibility, you can’t just built a site give it to the whole world, saying “it is just a demo, try it, test it”, and now one year later, do nothing about the serious problem the users who tested it, are facing.
I will try to tell what I’m doing to secure on my site, and I hope you will do the same in this threat.
1. After install, remove install folder, do not rename it. REMOVE it
2. Use FileZilla and give all your files (not folders) chmod 644, Chmod is the file permission, in filezilla you set this permission by right click on each file and set it permission to 644
All files except
DIR_WS_IMAGES_THUMBScarousel.xml if you are using the Carousel.
4. Rename you admin folder, and give it Chmod permission 744, you will now have to open FileZilla and rename you Admin folder back to admin, and set Chmod permission back to 755, before you can use your admin site, then Admin folder and files are only at risk when you are online, on you admin site.
3. Banning IP addresses from you website is not the way to solve this problem, it is to big job and hackers will just get new IP, by using a dynamic host, or a hacked site as there host.
Anyway I have no Idea what else to do, so I used to ways to ban IP addresses from my site.
The .htaccess file in the root, and the one in the /includes folder look like this at the end.
And I copied the 25.000 IP addresses from www.glodev.com/bannedips.php
The top line ErrorDocument is made so that you are telling your banned visitors way they can’t see you site, and who they may contact to open it again.
Just make a simple aduse.html document, saying “you are banned, contact mail@blablabla if you think this is a mistake”
This document have to be located a folder up from where you htaccess file is, if you have no folder up, I will gladly host it for you, for free.
ErrorDocument 403 http://www.yoursite.com/abuse.html # List from http://www.glodev.com/bannedips.php SetEnvIfNoCase User-Agent "^Missigua Locator" bad_bot #SetEnvIfNoCase User-Agent "^PEAR HTTP_Request class" bad_bot SetEnvIfNoCase User-Agent "^Java/1.4.1" bad_bot SetEnvIfNoCase User-Agent "^Java/1.5.0" bad_bot SetEnvIfNoCase User-Agent "^libwww-perl" bad_bot SetEnvIfNoCase User-Agent "^Wells Search II" bad_bot SetEnvIfNoCase User-Agent "^psycheclone" bad_bot SetEnvIfNoCase User-Agent "^WEP Search 00" bad_bot SetEnvIfNoCase User-Agent "ia_archiver" bad_bot deny from env=bad_bot # Referral spammers deny from 195.72.159.103 deny from 202.103.208.241It would be a lot easier if htacces could point to a global IP ban list, but how to do this is out of my knowledge. (deny from this list www.blablabla.bla/banlist.txt)
I did however find this site http://www.spamhaus.org/lookup.lasso here you can test if the IP is bad according to spamhaus.
4. Another way to ban IP is like this,
You make a banned.php document and put in the root, where your index.php is located. my banned php doc. Look like this
<?php
$banned = array("174.129.212.24", "220.181.7.202", "123.125.66.92", "");
$userip = $_SERVER['REMOTE_ADDR'];
if(in_array($userip, $banned))
{
die("You have no access to this site,
<br />Of Corse this should link to a html or php file like I did in htacces, but I am a noob and I don’t know how to do it!!");
}
?>
<?php
$ban_range_low=ip2long("220.181.7.1");
$ban_range_up=ip2long("220.181.7.201");
$ip=ip2long($HTTP_SERVER_VARS["REMOTE_ADDR"]);
if ($ip>$ban_range_low && $ip<$ban_range_up)
{
print " You have no access to this site,
<br />Of Corse this should link to a html or php file like I did in htacces, but I am a noob and I don’t know how to do it!!!";
exit();
}
?>
First Section are used to ban single IP addresses, and second section are used to ban a range of IP addresses.All you need to do next is to enter this line in you main php files, like
index.php
application_top.php
configure.php
and wherever you want to put it.
The line is like this.
include('banned.php');
This was some of my Ideas on how to make V3 more safe.
I can only hope you will post some of your safety ideas.
A few things I would like to know the answer to is:
How can we use Security Pro http://addons.oscommerce.com/info/5752
In V3.
I tried, and there are many things that do not match V3
How can we use SiteMonitor http://addons.oscommerce.com/info/4441
In V3.
I tried, and there are many things that do not match V3
I see only one way forward, let’s try to help each other, V3 is a nice website, it just some more security.










