Malware has been around for a while. And, over time has come increased complexity. In its spread and, the obfuscation methods in place to prevent detection. Protecting against and tackling malware is a critical issue for individuals and businesses alike. Especially those with web hosting that relies on WordPress which dominates the CMS market with an over 60% market share according to W3Techs.
Because of its popularity, WordPress also finds itself under the malware microscope quite often. Sucuri reports in its 2022 Threat Report that WordPress accounts for over 96% of all infected CMS sites. With hackers & bad actors alike attempting to discover vulnerabilities in both its core programming and, in the myriad of plugins & themes available to its users.
Throughout this guide we will go over a number of ways to tackle malware on WordPress and preventing infection in the first place.
1. Navigate to WordPress Toolkit
2. Click Check WordPress Integrity
3. Now ‘verify checksums’ which checks the integrity of core WordPress files.
4. If this check fails, you may be prompted to reinstall the WordPress core files, do this.
1. To do this go to ImunifyAV in your control panel and click ‘Start scanning’. This works by scanning files on your account and removing malicious content.
2. You can view detected malware under the ‘Malicious’ tab. **You may notice that many of them are in the same location such as a plugin folder, which may suggest there is a vulnerability with that plugin that needs addressing, either by being updated or perhaps a clean install.
3. You can also view your previous malware scans under the ‘Scan’ section below.
Manual and automated malware scanning is great but it’s not infallible. Malware is constantly changing and zero-day exploits exist so if malware remains present after scanning you need to perform a manual investigation.
Key things to look for:
You can sort by last modified from within your control panel or your chosen FTP client.
When using this method, if you find a suspicious file it is important to first ascertain if it is used by a plugin or theme on your site, as this might indicate a vulnerability with that plugin. If you believe the file is malicious remove it.
Removing malicious files doesn’t prevent reinfection. it is important that the vulnerability allowing the infection needs to be resolved to effectively prevent malware .
Finding malware in most cases is straightforward, usually indicated by an oddly named, possibly newly modified file that contains heavily obfuscated code.
Keep an eye out for files that:
Want to learn more about FTP? Set up FTP Accounts.
1. For cPanel go to FTP accounts and click ‘change password’.
2. For Plesk it is under ‘FTP’ and click into the FTP account.
Compromised WordPress sites may have, new user accounts added, some with administrator privileges. It is important to remove any unknown accounts preventing unauthorised access. To delete a WordPress user, click ‘Delete’ highlighted in the image below.
Similarly, FTP accounts can be managed and any unrecognised FTP accounts deleted by pressing delete in the FTP accounts area.
For Plesk users, this is in the ‘FTP’ section. Check the user account to delete and then click remove.
Email accounts may have also been created when your website has been hacked, these can then be used to send out spam. To prevent this you must remove the malicious email accounts. To do this click ‘Manage’ then ‘Delete Email Account’.
For Plesk users this can be done under ‘Mail’ then ‘Mail Accounts’.
WordPress release major updates across the year and minor updates more frequently. It’s important to stay updated as updates often include patches for security flaws. If you are unsure whether your WordPress installation is up to date you can view this in either WordPress Toolkit or Softaculous.
You also need to keep plugins and themes up to date. WordPress Toolkit and Softaculous help with this by identifying any available updates and offering the ability to auto update your plugins, which we recommend you turn on. You can also update directly through your WordPress dashboard by going to the ‘Plugins’ section and then clicking ‘Update’ underneath the outdated Plugin.
A common misconception is that because a plugin is ‘up to date’ it is secure. Unfortunately, this is not the case. If plugin updates are infrequent, it’s possible that its development & maintenance is not active which could lead to vulnerabilities going unchecked. We strongly recommend that you should only use plugins which are both widely used and frequently updated. In addition to this if you have older plugins that you no longer use then it would be wise to remove those plugins from your installation.
There have been cases where developers have installed ‘nulled’ (pirated) versions of wordpress themes, these very often come with malware ‘pre-installed’. And, pose a much greater security risk to your WordPress installation. You should only use plugins and theme from legitimate sources
There are many security plugins available for WordPress, these include free, freemium or paid for plugins. They’re great for adding an extra layer of security for your website and can help monitor malicious activity, notifying you of vulnerabilities and reporting on possible attacks. For example WordFence which has features such as but not limited to; Rate Limiting, IP Blocking, Malware Scans and 2FA logins.
Both WordPress Toolkit and Softaculous provide the capability to enable extra security measures for your WordPress website with a simple tick of a checkbox.
The security measures page contains settings that when enabled add extra layers of security. Softaculous allows you to apply pre-set of ‘Critical Only’ measures, these have the least chance of negatively impacting your site. You can also manually enable measures but they have the possibility of disrupting your sites functionality. To avoid this ensure you read through the relevant tooltips.