[UNIX] Digi-News and Digi-Ads Allow Gaining of Admin Privileges without Authentication

From: SecuriTeam (support_at_securiteam.com)
Date: 07/20/03

  • Next message: SecuriTeam: "[UNIX] IBM U2 UniVerse Users with UVADM Rights can Elevate Privileges via UVADMSH"
    To: list@securiteam.com
    Date: 20 Jul 2003 20:27:43 +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

    Beyond Security in Canada

    Toronto-based Sunrays Technologies is now Beyond Security's representative in Canada.
    We welcome ISPs, system integrators and IT systems resellers
    to promote the most advanced vulnerability assessment solutions today.

    Contact us at 416-482-0038 or at canadasales@beyondsecurity.com

    - - - - - - - - -

      Digi-News and Digi-Ads Allow Gaining of Admin Privileges without
    Authentication
    ------------------------------------------------------------------------

    SUMMARY

     <http://www.digi-fx.net/freescripts.php> Digi-news is a "PHP news editor.
    It allows you to easily add, edit, and delete news".
    <http://www.digi-fx.net/freescripts.php> Digi-ad is a "PHP ad rotator. It
    allows you to easily add, edit, reset, and delete ads".

    A vulnerability in the product allows to access to the admin area in both
    script, without the need to know the administrator's password.

    DETAILS

    Vulnerable systems:
     * Digi-news version 1.1
     * Digi-ad version 1.1

    Immune systems:
     * Digi-news version 1.2
     * Digi-ad version 1.2

    In Digi-news and Digi-ad, the admin web page is accessed by requesting the
    admin.php file.

    The file contains the following authentication mechanism:

    if (!isset($action)) {
       $action = '';
    }
    if ($action == 'auth') {
       auth();
    }
    if ((@$HTTP_COOKIE_VARS['user'] != $digiNews['user']) &&
    (@$HTTP_COOKIE_VARS['pass'] != md5($digiNews['pass']))) {
       login();
       exit;
    }

    As you can see, the authentication scheme is based on cookies. This cookie
    contains the user and the MD5 hashed password.

    However, due to a programmatic mistake in this line:
    if ((@$HTTP_COOKIE_VARS['user'] != $digiNews['user']) &&
    (@$HTTP_COOKIE_VARS['pass'] != md5($digiNews['pass']))) {

    Someone is regarded as an administrator "user = user" or "password =
    password" in his cookie. To make it simple, you do not need to know the
    admin password, as far as you know the admin login name.

    The default admin login name is "admin".

    Workaround:
    The workaround is to replace the AND operation by a OR operation, as
    followed:
    if ((@$HTTP_COOKIE_VARS['user'] != $digiNews['user']) ||
    (@$HTTP_COOKIE_VARS['pass'] != md5($digiNews['pass']))) {

    Vendor Status:
    The vendor has been informed and solved the problems. Download
    <http://www.digi-fx.net/freescripts.php> Digi-News 1.2 and Digi-ads 1.2.

    ADDITIONAL INFORMATION

    Information supplied by <mailto:webmaster@securiteinfo.com> Arnaud
    Jacques a.k.a. scrap.

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

    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] IBM U2 UniVerse Users with UVADM Rights can Elevate Privileges via UVADMSH"

    Relevant Pages