Apache modules could be used as a new attack vector to make it easier for cybercriminals to take over web servers. Bleeping Computer reported that Dutch web developer Luke Paris created a rootkit that hides inside a PHP module and attacks servers through Apache modules, which are open source HTTP servers.

About the Threat Vector

A rootkit is a piece of code that allows administrator-level access to a computer or network that attackers can exploit to inject malicious code. Most rootkits traditionally work close to the operating system kernel (OS). Attackers often need advanced coding skills to avoid crashing a victim’s computer.

Paris took a simpler approach, developing a rootkit that interacts with the PHP interpreter rather than the OS kernel. On his websiteParis explained that writing a PHP module is easier than a kernel because the code base is smaller, better documented and simpler. He created the method to educate others about the potential dangers of malicious PHP modules.

Using PHP modules to hide rootkits provided several advantages for nefarious actors. For example, crashes are less likely, and PHP rootkits only have to hook into one system process, while kernel rootkits must hook into many. Additionally, PHP is cross-platform language, meaning code written for one platform can easily be compiled to be run on another.

Paris has published the full rootkit source code on GitHub for public reference. His rootkit hooks into the PHP server’s SHA-1 function, which is a cryptographic algorithm that generates hashes for digital data that help prove the identity of a file. The entire rootkit is just 80 lines of code and can easily hide in legitimate modules. This rootkit’s existence represents a fresh potential attack vector for errant actors and server administrators must start thinking about preventative actions.

Responding to Malicious Apache Modules

Experts are already aware of the increasing risk of malware authors crafting attacks that inject malicious code into OS kernels. What makes Paris’ work different is its focus on PHP, although Bleeping Computer noted that he is not the first person to suggest hiding malicious code in Apache modules. London-based developer Christian Papathanasiou hid a similar rootkit inside an Apache module on GitHub in 2015.

Keeping a list of the module hashes after installing PHP is the simplest way of detecting whether any are malicious. Paris even published a Python script on his website that allows users to check the SHA-1 hashes of their PHP modules.

Scott Arciszewski, chief development officer at Paragon Initiative Enterprise, told Bleeping Computer the only modification he would make to Paris’ mitigation script is to use SHA-256 hashes in place of SHA-1. Experts also suggested businesses should urgently move from SHA-1 to safer alternatives such as SHA-256.

The fresh attack vector presents another threat to enterprise security bosses who are already fighting to protect their organizations from the ever-increasing malware challenge. IT decision-makers should ensure their companies are focused on techniques to help prevent malicious code injections.

More from

Most organizations want security vendor consolidation

4 min read - Cybersecurity is complicated, to say the least. Maintaining a strong security posture goes far beyond knowing about attack groups and their devious TTPs. Merely understanding, coordinating and unifying security tools can be challenging.We quickly passed through the “not if, but when” stage of cyberattacks. Now, it’s commonplace for companies to have experienced multiple breaches. Today, cybersecurity has taken a seat in core business strategy discussions as the risks and costs have risen dramatically.For this reason, 75% of organizations seek to…

How IBM secures the U.S. Open

2 min read - More than 15 million tennis fans around the world visited the US Open app and website this year, checking scores, poring over statistics and watching highlights from hundreds of matches over the two weeks of the tournament. To help develop this world-class digital experience, IBM Consulting worked closely with the USTA, developing powerful generative AI models that transform tennis data into insights and original content. Using IBM watsonx, a next-generation AI and data platform, the team built and managed the entire…

How the FBI Fights Back Against Worldwide Cyberattacks

5 min read - In the worldwide battle against malicious cyberattacks, there is no organization more central to the fight than the Federal Bureau of Investigation (FBI). And recent years have proven that the bureau still has some surprises up its sleeve. In early May, the U.S. Department of Justice announced the conclusion of a U.S. government operation called MEDUSA. The operation disrupted a global peer-to-peer network of computers compromised by malware called Snake. Attributed to a unit of the Russian government Security Service,…

How NIST Cybersecurity Framework 2.0 Tackles Risk Management

4 min read - The NIST Cybersecurity Framework 2.0 (CSF) is moving into its final stages before its 2024 implementation. After the public discussion period to inform decisions for the framework closed in May, it’s time to learn more about what to expect from the changes to the guidelines. The updated CSF is being aligned with the Biden Administration’s National Cybersecurity Strategy, according to Cherilyn Pascoe, senior technology policy advisor with NIST, at the 2023 RSA Conference. This sets up the new CSF to…