Add beef.browser.hasActiveX()

Add modules/browser/detect_activex module

Fix issue #832
This commit is contained in:
bcoles
2013-02-01 01:22:45 +10:30
parent 06221d2540
commit 61d0bf2e14
4 changed files with 52 additions and 1 deletions

View File

@@ -976,7 +976,7 @@ beef.browser = {
var has_phonegap = (beef.browser.hasPhonegap())? "Yes" : "No";
var has_googlegears=(beef.browser.hasGoogleGears())? "Yes":"No";
var has_web_socket=(beef.browser.hasWebSocket())? "Yes":"No";
var has_activex = (typeof(window.ActiveXObject) != "undefined") ? "Yes":"No";
var has_activex = (beef.browser.hasActiveX())? "Yes":"No";
var has_session_cookies = (beef.browser.cookie.hasSessionCookies("cookie"))? "Yes":"No";
var has_persistent_cookies = (beef.browser.cookie.hasPersistentCookies("cookie"))? "Yes":"No";
@@ -1010,6 +1010,13 @@ beef.browser = {
return details;
},
/**
* Returns boolean value depending on whether the browser support ActiveX
*/
hasActiveX: function() {
return (typeof(window.ActiveXObject) != "undefined");
},
/**
* Returns array of results, whether or not the target zombie has visited the specified URL
*/

View File

@@ -0,0 +1,14 @@
//
// Copyright (c) 2006-2013 Wade Alcorn - wade@bindshell.net
// Browser Exploitation Framework (BeEF) - http://beefproject.com
// See the file 'doc/COPYING' for copying permission
//
beef.execute(function() {
var result = (beef.browser.hasActiveX())? "Yes" : "No";
beef.net.send("<%= @command_url %>", <%= @command_id %>, "activex="+result);
});

View File

@@ -0,0 +1,16 @@
#
# Copyright (c) 2006-2013 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
beef:
module:
detect_activex:
enable: true
category: "Browser"
name: "Detect ActiveX"
description: "This module will check if the browser has ActiveX support."
authors: ["bcoles"]
target:
user_notify: ["IE"]
not_working: ["All"]

View File

@@ -0,0 +1,14 @@
#
# Copyright (c) 2006-2013 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
class Detect_activex < BeEF::Core::Command
def post_execute
content = {}
content['activex'] = @datastore['activex']
save content
end
end