PHP.net compromised to serve malware

On Thursday, Google’s Safe Browsing service began warning visitors to php.net that the website was discovered serving malware. Initially, most people and PHP maintainers thought that it was a false positive, but subsequent investigation confirmed that some of the project’s servers did get compromised.

The hackers succeeded in injecting malicious JavaScript code (userprefs.js) in four of the site’s pages. When visitors landed on them, the code allowed for automatic detection of vulnerable plug-ins, and the serving of malicious SWF files. It’s interesting to note that only desktop browser users were targeted – those who visited the compromised pages with a mobile browser were safe.

Barracuda Networks researchers managed to get their hands on a packet capture file, and provided it to other researchers for analysis. Kaspersky Lab’s Fabio Assolini noted that the malicious iFrame pointed to the Magnitude Exploit Kit and dropped a variant of the Tepfer information-stealing Trojan with a low AV detection rate.

The PHP team is still investigating the intrusion and has commented that they first thought the compromise was a false positive due to the offending JavaScript being only periodically injected.

In a recent update on the situation, they confirmed that the server which hosted the php.net, static.php.net and git.php.net domain, and the server hosting bugs.php.net have been compromised, but that they still don’t know have it happened.

“We have verified that our Git repository was not compromised, and it remains in read only mode as services are brought back up in full,” they shared. “As it’s possible that the attackers may have accessed the private key of the php.net SSL certificate, we have revoked it immediately. We are in the process of getting a new certificate, and expect to restore access to php.net sites that require SSL (including bugs.php.net and wiki.php.net) in the next few hours.”

They have also migrated all services to new servers.

“JavaScript malware was served to a small percentage of php.net users from the 22nd to the 24th of October 2013,” they shared, adding that over the next few days they will force a password reset of php.net users.

Don't miss