Threat actors found a new method to inject malicious code into websites. They are now using an abandoned WordPress plugin, Eval PHP.
The plugin is still available in the WordPress plugins repository and had approximately 4,000 malicious installations per day this month.
The Abandoned Plugin
Eval PHP enables site administrators to embed PHP code in WordPress site pages and posts. The embedded code will then run when the user opens the page in a browser.
This plugin was last updated a decade ago, but it is still available through the WordPress plugins repository.
Researchers at Sucuri spotted this malicious trend in April 2023. Cybercriminals discovered that through this plugin they can inject secretive backdoors into websites. And the trend is growing as the Eval PHP has now around 4,000 malicious downloads daily.
Using this method for code injection has a major advantage for hackers: they can use the plugin again and again. Threat actors can reinfect cleaned sites while the backdoor remains concealed.
The Malicious Code Injection
Threat actors deploy an already-known payload that enables attackers to remotely execute code over the hacked site.
The code injection goes into the database, specifically into the ‘wp_posts’ table. In consequence, the attack is harder to detect, evading file integrity monitoring, server-side scans, etc.
To do that, the threat actors use a compromised or newly created administrator account to install Eval PHP, allowing them to insert PHP code into pages and posts of the breached site using [evalphp] shortcodes.
When the cod runs, the backdoor is dropped in the site root. The name of the backdoor can be “3e9c0ca6bbe9.php” or any other name, depending on the attack.
Several different IP addresses cause the malicious Eval PHP plugin installations: 126.96.36.199, 188.8.131.52, 184.108.40.206.
Moreover, the malicious [evalphp] shortcodes are planted in saved drafts hidden in the SQL dump of the “wp_posts” table and not on published posts. This is still enough to execute the code that injects the backdoor into the website’s database.
Eval PHP is not the only old plugin that hackers can abuse. So, website owners are advised to remove outdated and neglected plugins that can become a security risk.
Further protection measures include employing a web application firewall, protecting admin panels, and maintaining a current WordPress installation. All these pieces of advice are met to enhance cybersecurity until the individuals in charge of overseeing the WordPress plugin repository remove the plugin.
If you liked this article, follow us on LinkedIn, Twitter, Facebook, and YouTube for more cybersecurity news and topics.
If you liked this post, you will enjoy our newsletter.Get cybersecurity updates you\’ll actually want to read directly in your inbox.