We have talked to you in the past about malware that effectively "disables" security measures that have been introduced either manually by the owner or through the use of a security plugin installed in WordPress. Where attackers may encounter a problem is that a security plugin usually monitors the files and if it detects any changes, notifies the owner either via email or through the WordPress control panel.
Unfortunately, a "PHP malware" solves the above intruder problem by disabling the most frequently used security plugins and preventing them from being reactivated by the WordPress control panel.
Find and disable security plugins
This GIF displays a WordPress installation with a number of plugins enabled,
four of which are popular security plugins and the other two are not. The GIF clearly shows how non-security plugins are not affected by PHP malware, but other security plugins are disabled.
If one user If you try to reactivate one of the disabled security plugins, it will appear briefly that it is activated and immediately after the malware will disable it again. This behavior will continue until the malware is completely removed from the compromised environment, making it more difficult to detect malicious behavior on the site.
How does it work
The malware was found in the malicious file ./wp-includes/IXR/class-IXR-cache.php. It starts by assigning the root directory of the site to DIZIN to help you hide the loading of the WordPress master file wp-load.php:
Using require_once to load wp-load.php allows intruder use WordPress coding hooks and variables to disable security plugins. First, the attacker determines the findinSecurity function that is later used to classify the table containing the plugins.
Another function defined by the attacker is secList which contains a table of targeted plugins that will be searched in existing plugins and disabled.
The two functions findinSecurity and secList are then used in the main active_plugins function used by WordPress hook get_option ('active_plugins') to obtain a list of all active plugins from the database data of WordPress. It then uses findinSecurity along with the list of targeted security plugins from SecList to search for active plugins and disable them using the WordPress hook deactivate_plugins.
Well, how to disable malware automatically targeted security plugins in case someone tries to reactivate them? It does this by inserting malware at the bottom of the wp-load.php file.
The injection forces wp-load.php to load the malicious file ./wp-includes/IXR/class-IXR-cache.php using require_once. Since wp-load.php runs every time a page loads on a WordPress site, any reactivated plugins will be automatically disabled the next time loading of the page - regardless of whether it comes from the same user or by a young person visitor on the homepage of the site.