Using nulled WordPress themes and plugins is bad. Why? Because sometimes (well, most of the time) nulled plugins or themes contain malicious code that looks something like this:
That’s wp-vcd.php. When a WordPress website is infected with this piece of malware, the infected file resides in the “wp-includes” directory and every time a page on a WordPress website is accessed overwrites the functions.php file with malicious code that looks like this:
Removing the code doesn’t do any good – as soon as any file gets accessed (the malware overwrites the contents of the functions.php file which can be used to add certain features and functionality to a WordPress website), the code comes back because the main file – wp-vcd.php – is not being removed.
Here’s a couple interesting facts about this piece of malware:
Files that are usually affected with this malware are:
The malware scans the themes directory and modifies all functions.php files found within themes. WP-VCD then also makes use of the touch() function in PHP which sets the access and modification time of a specified file:
One interesting fact about this malware (and the above code block in particular) is that the functions.php file will only be infected if its code does not contain “WP_V_CD”. In other words, if the content of a functions.php file contains the string “WP_V_CD”, the above code block will not run (24th code line, the malware checks if the content of functions.php does not contain “WP_V_CD”) and functions.php will not be infected – the string would then act like a killswitch.
Recovering a website from a malware infection is not easy. A developer cannot just delete the contents of one file and call it a day. Instead, it is very important to locate all areas which could have been affected by malware and searching for backdoors in every file in that directory – checking the integrity of files can prove useful too. A developer also needs to understand why did a website get infected with malware in the first place: most likely that happened due to the fact that the developer installed a nulled theme or a nulled plugin on the website – often, nulled plugins or themes come with backdoors. Take a look at the following example:
The above code block not only describes a WordPress plugin – it also includes a potentially malicious file if it does not already exist. When included, the file could do all sorts of things – including spreading malware. In order to prevent such code from jeopardizing the security of your web application, double check the source code of your plugins for malicious code and make sure all plugins you are using come from an official source.
Malware like WP-VCD is one of the prime examples why developers should never use nulled themes or plugins – although providing nulled content is pretty typical for websites that offer to download “premium software for free”, using nulled plugins or themes comes with a price and often, the price is your website getting infected.
This blog will walk you through some lessons for conference speakers who speak remotely no…
Insecure data storage is the second vulnerability in the OWASP Mobile Top 10 list. Insecure…
The improper platform usage vulnerability is the first vulnerability in the OWASP Mobile Top 10.…
If you ever heard of web application security, you probably heard of OWASP. And if…
If you have ever built a website, chances are you took care of security. Securing…
It's November. For some developers it's just an ordinary month - for some of them…