June 20, 2017 By Mark Samuels 2 min read

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

What does resilience in the cyber world look like in 2025 and beyond?

6 min read -  Back in 2021, we ran a series called “A Journey in Organizational Resilience.” These issues of this series remain applicable today and, in many cases, are more important than ever, given the rapid changes of the last few years. But the term "resilience" can be difficult to define, and when we define it, we may limit its scope, missing the big picture.In the age of generative artificial intelligence (gen AI), the prevalence of breach data from infostealers and the near-constant…

Airplane cybersecurity: Past, present, future

4 min read - With most aviation processes now digitized, airlines and the aviation industry as a whole must prioritize cybersecurity. If a cyber criminal launches an attack that affects a system involved in aviation — either an airline’s system or a third-party vendor — the entire process, from safety to passenger comfort, may be impacted.To improve security in the aviation industry, the FAA recently proposed new rules to tighten cybersecurity on airplanes. These rules would “protect the equipment, systems and networks of transport…

Protecting your digital assets from non-human identity attacks

4 min read - Untethered data accessibility and workflow automation are now foundational elements of most digital infrastructures. With the right applications and protocols in place, businesses no longer need to feel restricted by their lack of manpower or technical capabilities — machines are now filling those gaps.The use of non-human identities (NHIs) to power business-critical applications — especially those used in cloud computing environments or when facilitating service-to-service connections — has opened the doors for seamless operational efficiency. Unfortunately, these doors aren’t the…

Topic updates

Get email updates and stay ahead of the latest threats to the security landscape, thought leadership and research.
Subscribe today