[UNIX] ChangePassword Unsafe Command Execution (make)

From: SecuriTeam (support_at_securiteam.com)
Date: 12/22/04

  • Next message: SecuriTeam: "[UNIX] Multiple Vulnerabilities in phpMyAdmin (External Transformations)"
    To: list@securiteam.com
    Date: 22 Dec 2004 14:07:36 +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

    - - - - - - - - -

      ChangePassword Unsafe Command Execution (make)
    ------------------------------------------------------------------------

    SUMMARY

    " <http://changepassword.sourceforge.net/> ChangePassword modifies the
    passwords of passwd, Samba, and Squid through the Web. All passwords are
    synchronized and changed in real time through browsers like Mozilla,
    Netscape, IE, Opera, and others."

    If changepassword.cgi is installed on a multiuser computer, any user with
    an account on the computer can seize control of the computer.

    DETAILS

    Vulnerable Systems:
     * ChangePassword version 0.8 and prior

    A malicious user can read and modify every user's files, watch all
    programs running, etc.
    (The attack doesn't work on Linux systems where /bin/sh drops setuid, but
    changepassword.cgi itself doesn't work on those systems).

    Here's the bug: Line 317 of changepassword.c, without cleaning its
    environment in any way, calls:
    system("cd /var/yp && make &> /dev/null");
    The Makefile sets changepassword.cgi to be setuid root (mode 4755). A user
    can set $PATH to point to his own make program, set $CONTENT_LENGTH to
    512, set $REQUEST_METHOD to POST, and call the script with the following
    parameters:
    form_user=u&form_pw=p&form_new1=x&form_new2=x&

    Where 'u' is his username and 'p' is his password. The user's program
    named 'make' then runs with root privileges.

    ADDITIONAL INFORMATION

    The information has been provided by <mailto:tambarus@hotmail.com> Anand
    Khare.

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

    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] Multiple Vulnerabilities in phpMyAdmin (External Transformations)"

    Relevant Pages

    • [NT] Cross Application Scripting in Trend Micros Antivirus Software
      ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... The SecuriTeam alerts list - Free, Accurate, Independent. ... When the product alerts the user of a possible virus, it creates an HTML ...
      (Securiteam)
    • [NT] Microsoft Windows NTFS Improper Handler Closing
      ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... from a system shutdown, uninitialized data may be visible in files from ...
      (Securiteam)
    • [NEWS] Gecko Engine Multiple Vendor DoS (History.dat)
      ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... Basically firefox logs all kinda of URL data in it's history.dat file, ... it will instantly crash due to a buffer overflow -- this will ...
      (Securiteam)
    • [UNIX] PAJAX XSS and 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 ... PAJAX XSS and File Inclusion ... cross site scripting and file inclusion attacks by using the PAJAX ...
      (Securiteam)
    • [EXPL] QK SMTP DoS (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 ... QK SMTP DoS ... static char overflow; ...
      (Securiteam)