[UNIX] ChangePassword Unsafe Command Execution (make)
From: SecuriTeam (support_at_securiteam.com)
Date: 12/22/04
- Previous message: SecuriTeam: "[NT] Winmail Server Information Disclosure"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
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.
- Previous message: SecuriTeam: "[NT] Winmail Server Information Disclosure"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|