Jump to content


Corporate Sponsors


Latest News: (loading..)

* * * * * 2 votes

Oscommerce Security - Osc_Sec.php


484 replies to this topic

#421 SimonLG

  • Community Member
  • 9 posts
  • Real Name:Simon

Posted 11 January 2012, 00:07

Hi Te Taipo,

I uncommented the code, changed the $banipaddress and clicked on the Edit button and got the same error message.

However, when I check the htaccess file, my IP address has not been added to the file, and I didn't receive any email notification.

Thanks

Simon

#422 Taipo

  • Community Member
  • 751 posts
  • Real Name:Te Taipo
  • Gender:Male

Posted 11 January 2012, 02:21

My apologees, I had assumed that the browser error you were receiving as the 403 access denied error. If it had, then your ip would have been banned. If you are unable to get a better idea of what the browser error is then we will have to tackle this another way. Firstly what are the other addons that you are using?
- 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::
- Ignore this link - just a honeypot site to test my ideas out for osC_Sec and allow the site to be picked up by attackers.
- Fix the admin login bypass exploit here

#423 nudylady

  • Community Member
  • 234 posts
  • Real Name:nudylady

Posted 13 January 2012, 18:33

nice post

#424 nudylady

  • Community Member
  • 234 posts
  • Real Name:nudylady

Posted 13 January 2012, 19:01

my site 2.2RC2 just hacked. The hacker deleted my admin accout. and created 3 new admin accounts.
One of the accounts is called admincrash.

I have installed this now. Changed all passwords. what is the next thing to do now?

Edited by nudylady, 13 January 2012, 19:09.


#425 geoffreywalton

  • Community Sponsor
  • 7,731 posts
  • Real Name:Geoffrey Walton
  • Gender:Male
  • Location:Norfolk, UK (close to the centre of the universe)

Posted 13 January 2012, 22:48

Now you have to find any infected files and how they got in.

Some basic steps on how to do this can be found in my profile.

Also links to some other actions you need to do such as renameing admin dir and ....

HTH

G

Edited by geoffreywalton, 13 January 2012, 22:50.

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

Virus Threat Scanner
My Contributions
Basic install answers.
Click here for Contributions / Add Ons.
UK your site.
Site Move.
Basic design info.

For links mentioned in old answers that are no longer here follow this link Useful Threads.

If this post was useful, click the Like This button over there ======>>>>>.

#426 callenords

  • Community Member
  • 63 posts
  • Real Name:Carl Nordström
  • Gender:Male
  • Location:Sweden

Posted 10 February 2012, 08:48

Is there away of disabling the osc_sec cookie check?

I often receive this message - even though its clearly not a hacker attempt: "osC_Sec detected malicious cookie content..."

And since I use IP trap, the IP is banned.

Thanks!

#427 Taipo

  • Community Member
  • 751 posts
  • Real Name:Te Taipo
  • Gender:Male

Posted 10 February 2012, 08:58

In the latest version of osc_sec.php, find:
      $this->cookieShield();

and replace with:
#     $this->cookieShield();

- 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::
- Ignore this link - just a honeypot site to test my ideas out for osC_Sec and allow the site to be picked up by attackers.
- Fix the admin login bypass exploit here

#428 burt

  • Community Sponsor
  • 6,975 posts
  • Real Name:G Burton
  • Gender:Male
  • Location:UK/DEV/on

Posted 15 February 2012, 22:14

I have been unable to use the last 10 or 12 iterations of osc_sec.

Installation produces a 500 (if I recall correctly) error (note, osc_sec files only, not using the htaccess modifications).
The Dirty Little Secrets that no osCommerce template sellers want you to know...revealed...

Support is commercially available. The question is whether you value your business
highly enough to spend money on it.

For commercial support from known developers who support osCommerce
ethos, please post at http://forums.oscommerce.com/forum/79-commercial-support/

#429 Taipo

  • Community Member
  • 751 posts
  • Real Name:Te Taipo
  • Gender:Male

Posted 16 February 2012, 04:02

Try this version out Burt.

http://pastebin.com/Hn2ifX6U

( grab the code from the raw paste data at the bottom )

Let me know if that sorts the issue, if so I will post an update.

Edited by Taipo, 16 February 2012, 04:02.

- 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::
- Ignore this link - just a honeypot site to test my ideas out for osC_Sec and allow the site to be picked up by attackers.
- Fix the admin login bypass exploit here

#430 burt

  • Community Sponsor
  • 6,975 posts
  • Real Name:G Burton
  • Gender:Male
  • Location:UK/DEV/on

Posted 16 February 2012, 12:02

Taipo - that version seems to work well, thank you.
The Dirty Little Secrets that no osCommerce template sellers want you to know...revealed...

Support is commercially available. The question is whether you value your business
highly enough to spend money on it.

For commercial support from known developers who support osCommerce
ethos, please post at http://forums.oscommerce.com/forum/79-commercial-support/

#431 sunnydt

  • Community Member
  • 4 posts

Posted 21 February 2012, 03:38

ok Maybe Im missing something but where do I edit? such as $httphost = "www.yoursite.com"; Cant find it anywhere.

#432 Taipo

  • Community Member
  • 751 posts
  • Real Name:Te Taipo
  • Gender:Male

Posted 21 February 2012, 03:52

The only bits to edit now are in osc.php file which is in the zip file in the includes directory along with osc_sec.php

In fact you do not need to edit anything if you just want to add it, however if you want to ban ip addresses and such then osc.php is the file you want to look in. Check the readme.htm file for more on editing the settings.
- 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::
- Ignore this link - just a honeypot site to test my ideas out for osC_Sec and allow the site to be picked up by attackers.
- Fix the admin login bypass exploit here

#433 Taipo

  • Community Member
  • 751 posts
  • Real Name:Te Taipo
  • Gender:Male

Posted 21 February 2012, 09:42

osC_Sec 5.0.1

Whats New?
- Added extra checks in $checkfilename
- Fixed an issue where files contain extra '.'. i.e. file.name.php
- Fix phpSelfFix() function
- Fixed whitespace issue with $this->_httphost
- More additions to the dbShield() function to protect against database injection attempts
- Fixed a number of issues with dbShield() to prevent false positives
- Removed base64_decode aspect of dbShield() due to it causing errors in some configurations
- More additions to getShield() function to detect local file read attempts
- Remake of the postShield() function
- Remake of the cookieShield() function
- Fixed an error in ipTrapped()

New Install instructions: see the readme.htm, as per usual, all updates contain the complete package

Updating:
Replace the osc_sec.php file in your catalogs /includes/ directory with the one in the /includes/ directory of this zip file.

Please report any bugs to the discussion forums at http://goo.gl/dQ3jH or email rohepotae@gmail.com

Download from: http://addons.oscommerce.com/info/8283
- 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::
- Ignore this link - just a honeypot site to test my ideas out for osC_Sec and allow the site to be picked up by attackers.
- Fix the admin login bypass exploit here

#434 RMD27

  • Community Member
  • 259 posts
  • Real Name:Ricardo
  • Gender:Male

Posted 27 February 2012, 16:58

Hi Taipo

Google & Babel translate do not work on my site anymore, could the OSC SEC contirbution be stopping it from working?

I also have Security Pro 2.0 installed.

These are the characters Google uses
http://translate.google.com/translate?hl=en&sl=en&tl=sq&u=http%3A%2F%2Fwww.oscommerce.com%2F

And this is what Babel uses

http://babelfish.yahoo.com/translate_url?doit=done&tt=url&intl=1&fr=bf-home&trurl=http%3A%2F%2Fwww.oscommerce.com%2F&lp=en_nl&btnTrUrl=Translate

I added % and & and = to the Secuity Pro whitelist but the translation from these pages comes back as

blank page for Google and with an

error(0) for Babel

Edited by RMD27, 27 February 2012, 16:59.


#435 ptt81

  • Community Member
  • 63 posts
  • Real Name:PT

Posted 27 February 2012, 18:02

I have a similar problem with Google Translate, my page loads fine but it report the following error at the top of the page:

Warning: file () [ function.file ]: Emri nuk mund të jetë bosh në / home / mydomain / public_html / përfshinë / osc_sec.php on line 675

Edited by ptt81, 27 February 2012, 18:02.


#436 Taipo

  • Community Member
  • 751 posts
  • Real Name:Te Taipo
  • Gender:Male

Posted 27 February 2012, 18:20

What does " Emri nuk mund të jetë bosh në" mean PT?
- 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::
- Ignore this link - just a honeypot site to test my ideas out for osC_Sec and allow the site to be picked up by attackers.
- Fix the admin login bypass exploit here

#437 ptt81

  • Community Member
  • 63 posts
  • Real Name:PT

Posted 27 February 2012, 18:57

I have no idea, i just click on a random language, but the original error message is:

Warning : file() [ function.file ]: Filename cannot be empty in /home/mydomain/public_html/includes/osc_sec.php on line 675

Warning : Cannot modify header information - headers already sent by (output started at /home/mydomain/public_html/includes/osc_sec.php:675) in /home/mydomain/public_html/includes/functions/general.php on line 1355

Edited by ptt81, 27 February 2012, 19:00.


#438 RMD27

  • Community Member
  • 259 posts
  • Real Name:Ricardo
  • Gender:Male

Posted 29 February 2012, 13:19

so what is the thought on this? could osc_sec be stopping the translation or not??? :huh:

#439 Taipo

  • Community Member
  • 751 posts
  • Real Name:Te Taipo
  • Gender:Male

Posted 01 March 2012, 10:39

Try this version Ricardo
http://pastebin.com/RGWKExAq

Let me know how it goes.
- 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::
- Ignore this link - just a honeypot site to test my ideas out for osC_Sec and allow the site to be picked up by attackers.
- Fix the admin login bypass exploit here

#440 RMD27

  • Community Member
  • 259 posts
  • Real Name:Ricardo
  • Gender:Male

Posted 01 March 2012, 13:27

Hello Taipo,

Unfortunately no difference. Maybe it is something to do with FWRs plug in. Ill leave a message on his support thread and let you know what he says!

http://forums.oscommerce.com/topic/293326-contribution-security-pro-querystring-protection-against-hackers/page__hl__fwr__st__240