Serviceteam IT Security News

Had the incident gone unnoticed, the attackers could have taken over websites using the tainted code

Unknown attackers compromised the official PHP Git server and planted a backdoor in the source code of the programming language, potentially putting websites using the tainted code at risk of complete takeover.

The bad actor pushed two malicious commits to the php-src repository – one in the name of PHP creator Rasmus Lerdorf himself and the other disguised as being signed off by Nikita Popov, a well-known PHP developer and maintainer. The first commit was allegedly fixing a minor typo in the code, whereas the second commit claimed to revert the fix.

“We don’t yet know how exactly this happened, but everything points towards a compromise of the git.php.net server (rather than a compromise of an individual git account),” Popov said in an announcement about the compromise, which was spotted on Sunday.

Speaking to BleepingComputer, Popov said that they noticed the first commit during a routine post-commit code review, and the changes to the code were reverted immediately – in time before it could have been pushed into production environments. The open-source server-side language is commonly used in web development.

The code change was first noticed by contributors Markus Staab, Michael Voříšek, and Jake Birchall. Voříšek became suspicious about the code change and asked about its function, to which Birchall responded that the “line executes PHP code from within the useragent HTTP header, if the string starts with ‘zerodium’.”

Indeed, it seems that the attackers wanted to implicate Zerodium, a company that bills itself as “the leading exploit acquisition platform for premium zero-days”. However, per its CEO, the zero-day broker had nothing to do with the incident.

Following the breach, the PHP team decided to transition from its own Git infrastructure to mitigate the risks. “While investigation is still underway, we have decided that maintaining our own git infrastructure is an unnecessary security risk, and that we will discontinue the git.php.net server. Instead, the repositories on GitHub, which were previously only mirrors, will become canonical. This means that changes should be pushed directly to GitHub rather than to git.php.net,” Popov said.

The PHP team is now pushing for added security. While previously developers who wanted to contribute needed to use the organization’s “home-grown” karma system, they’ll now need to become members of PHP’s GitHub repo and have two-factor authentication enabled.

In the meantime, PHP is performing a security audit of its repositories to check for any further signs of compromise or malicious code beyond the two commits.

Source: HERE

With over 20 years of experience, Serviceteam IT design and deliver sophisticated connectivity, communication, continuity, and cloud services, for organisations that need to stay connected 24/7. We take the time to fully understand your current challenges, and provide a solution that gives you a clear understanding of what you are purchasing and the benefits it will bring you.

To find out how we can help you, call us on 0121 468 0101, use the Contact Us form, or why not drop in and visit us at 49 Frederick Road, Edgbaston, Birmingham, B15 1HN.

We’d love to hear from you!

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *