Overview of PHP.net hacking case

1 minute read
October 25, 2013

Most security/technology guys are probably aware by now that PHP’s website php.net was compromised and injected with JavaScript malware this week. The malware was originally detected by Google Safe Browsing. On Thursday 24 Oct 2013, Google began to warn that PHP.net contains malware. This post basically describes the case on high level and refers to another articles which provide further details.

“False positive” -debate

Once Google had flagged php.net as suspicious, there was some debate whether the alert was a false positive or not. At first there was a strong rumor, that the alert was actually a false positive. Some links to early debate:

However, eventually it was confirmed [https://news.ycombinator.com/item?id=6603831] that the suspicion was correct. Later PHP itself explained that the malicious version of file userprefs.js was served and hosted by server static.php.net during certain time periods. For most of the time file seemed (and was) legit, which was the reason “false positive” debate.

Analysis

A couple of sources have reviewed and analyzed the malicious code [http://pastebin.com/yZWxxk2h]. It turned out that the JavaScript code created a hidden iframe, which loaded a third-party website containing an exploit kit. The exploit kit tried to exploit vulnerabilities in Java, Flash and Silverlight implementations. Details available at the following links:

According to Kaspersky’s researcher [https://twitter.com/assolini/status/393461051150598144], the iframe pointed to a website hosting Magnitude Exploit Kit, which in turn tries to exploit CVE-2013-2551 [http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2013-2551]

Summary

Later PHP confirmed that two servers were compromised and SSL private keys may have been stolen as well. Thus, php.net SSL certificates were revoked. It is still unknown how the attackers were able to compromise the servers.

What we learnt from this story: from normal user’s point of view - keep your software up to date and disable unnecessary plugins. Once again, it was just normal malware that PHP.net was serving - trying to exploit known and patched vulnerabilities. Hence, if everyone just kept their systems up to date, no harm would have been done (to the end users).

Leave a Comment