Analysis of yesterday's PHP.net exploit
Attackers injected a malicious iframe into the PHP.net website that redirected visitors to an Exploit Kit. The kit used a JavaScript library to detect browser plugins and then served Flash content and further iframes, potentially delivering malware.
alienvault.com
Published on alienvault.com
This morning we woke up with news indicating that Google was flagging the php.net website as potentialy harmful.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the PHP.net website was compromised, allowing attackers to inject malicious JavaScript into a file served to visitors.
Impact
Visitors to PHP.net could be redirected to an Exploit Kit that attempted to deliver malware, though the webmaster modified the files and the behaviour could not be replicated.
What the attacker needed
Victim visits the compromised PHP.net site; browser runs JavaScript
The fix
The malicious files were modified by the webmaster, but the text does not describe how the compromise was fixed.
How it was found
- A visitor loads the compromised PHP.net website.
- The injected JavaScript in userprefs.js runs and collects information about browser plugins.
- The script sends a POST request to a server indicating whether Java and Adobe Acrobat Reader are installed.
- The server redirects the browser to another server, likely based on the detected plugins.
- That server returns HTML embedding Flash content and a new iframe, leading to an Exploit Kit.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
Someone managed to add harmful code to the PHP.net website. When people visited the site, that code secretly sent them to another site that tried to infect their computer with malware. The attack used a trick to check what software visitors had installed, then sent them to a page that could exploit it.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.