Skip to content

Instantly share code, notes, and snippets.

@wchen-r7
Last active August 29, 2015 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wchen-r7/6cb1aaa6ac9e01810098 to your computer and use it in GitHub Desktop.
Save wchen-r7/6cb1aaa6ac9e01810098 to your computer and use it in GitHub Desktop.
##
# 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 = NormalRanking
include Msf::Exploit::Remote::BrowserExploitServer
def initialize(info={})
super(update_info(info,
'Name' => "Browser Exploit Payload Architecture Test",
'Description' => %q{
architecture selection
},
'License' => MSF_LICENSE,
'Author' => [ 'sinn3r' ],
'Arch' => [ARCH_X86, ARCH_X64, ARCH_X86_64],
'References' =>
[
[ 'URL', 'http://metasploit.com' ]
],
'Platform' => 'win',
'BrowserRequirements' =>
{
:source => /script|headers/i,
:os_name => OperatingSystems::Match::WINDOWS,
:ua_name => HttpClients::IE
},
'Targets' =>
[
[ 'Automatic', {} ],
[ 'Windows x86', { 'arch' => ARCH_X86 } ],
[ 'Windows x64', { 'arch' => ARCH_X64 } ],
[ 'Windows x86_64', { 'arch' => ARCH_X86_64 } ]
],
'Payload' => { 'BadChars' => "\x00" },
'DisclosureDate' => "Apr 1 2013",
'DefaultTarget' => 0))
end
def on_request_exploit(cli, request, target_info)
print_debug(target_info.inspect)
current_target = get_target
p = get_payload(cli, target_info)
print_status("Target selected: #{current_target.name}")
send_response(cli, "OK")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment