[UNIX] paFileDB SQL Injection

From: SecuriTeam (support_at_securiteam.com)
Date: 03/13/05

  • Next message: SecuriTeam: "[NEWS] UTStarcom's iAN-02EX Remote Access Vulnerability"
    To: list@securiteam.com
    Date: 13 Mar 2005 19:40:00 +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

    - - - - - - - - -

      paFileDB SQL Injection
    ------------------------------------------------------------------------

    SUMMARY

    " <http://www.phparena.net/pafiledb.php> paFileDB is designed to allow web
    masters have a database of files for download on their site. To add a
    download, all you do is upload the file using FTP or whatever method you
    use, log into paFileDB's administration center, and fill out a form to add
    a file. paFileDB lets you edit and delete the files too."

    The paFileDB product has been found to contain an SQL Injection
    vulnerability.

    DETAILS

    Vulnerable Systems:
     * paFileDB version 3.1 and prior

    SQL injection:
    The $start variable found in the viewall.php and category.php file is
    vulnerable for SQL injection attack as it uses the following code:
    if ($sortby == "name") {
            $result = $pafiledb_sql->query($db, "SELECT * FROM
    $db[prefix]_files WHERE file_pin = '0' ORDER BY file_name

    ASC LIMIT $start,20", 0);
    }
    if ($sortby == "date") {
            $result = $pafiledb_sql->query($db, "SELECT * FROM
    $db[prefix]_files WHERE file_pin = '0' ORDER BY file_time

    DESC LIMIT $start,20", 0);
    }
    if ($sortby == "downloads") {
            $result = $pafiledb_sql->query($db, "SELECT * FROM
    $db[prefix]_files WHERE file_pin = '0' ORDER BY file_dls

    DESC LIMIT $start,20", 0);
    }
    if ($sortby == "rating") {
            $result = $pafiledb_sql->query($db, "SELECT * FROM
    $db[prefix]_files WHERE file_pin = '0' ORDER BY

    (file_rating/file_totalvotes - 1) DESC LIMIT $start,20", 0);
    }

    Examples of SQL injections:
      http://example.com/[pafiledb_dir]/pafiledb.php?action=viewall&start='
    &sortby=rating
      http://example.com/[pafiledb_dir]/pafiledb.php?action=category&start='
    &sortby=rating

    Sample error message:
      paFileDB was unable to successfully run a MySQL query.
      MySQL Returned this error: You have an error in your SQL syntax near
    '\',20' at line 1 Error number: 1064
      The query that caused this error was: SELECT * FROM pafiledb_files WHERE
    file_pin = '0' ORDER BY

    ADDITIONAL INFORMATION

    The information has been provided by <mailto:sp3x@securityreason.com>
    sp3x.
    The original article can be found at: <http://www.securityreason.com>
    http://www.securityreason.com

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

    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: "[NEWS] UTStarcom's iAN-02EX Remote Access Vulnerability"

    Relevant Pages

    • [UNIX] Protector System Multiple Vulnerabilities
      ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... Several classes of vulnerabilities have been found in Protector. ... cross-site scripting and SQL injection attacks. ...
      (Securiteam)
    • [UNIX] PhotoPost PHP Pro Multiple Vulnerabilities
      ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... PhotoPost PHP Pro suffers from multiple SQL injection, ... There are plenty of SQL injection vulnerabilities in PhotoPost PHP Pro. ...
      (Securiteam)
    • [REVS] Advanced Topics on SQL Injection Protection
      ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... SQL injection is now one of the most common attacks in the Internet. ... Static query statement - Development Phrase ... Some programmers may think escaping apostrophe with two apostrophes (and ...
      (Securiteam)
    • [TOOL] BSQL Hacker - Advanced SQL Injection Framework / Tool
      ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... BSQL Hacker - Advanced SQL Injection Framework / Tool ... Attack Templates: ... Blind SQL Injection ...
      (Securiteam)
    • [UNIX] PHPNuke Multiple Vulnerabilities in Search Module
      ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... cross-site scripting and SQL injections located throughout the ... The vulnerability exists in the ... The first SQL injection vulnerability is a non-critical one in the ...
      (Securiteam)