[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] 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)
    • [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)
    • [TOOL] tcpstatflow - Covert Tunnel Detector
      ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... For example, he could set up a SSH server on the Internet, listening port ... one way and the opposite (within a single TCP connection). ...
      (Securiteam)
    • [EXPL] Eudora Attachment Spoof Exploit Revisited
      ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... present in the newest release of Eudora. ... Can be exploited if there is more than one way into attach: in my setup ...
      (Securiteam)
    • [UNIX] Phorum SQL Injection (userlogin.php)
      ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... An SQL injection vulnerability exists in the 'userlogin.php' script. ... the MD5 hash of the user one character at a time. ...
      (Securiteam)