Merge branch 'master' of https://github.com/beefproject/beef
This commit is contained in:
9
README
9
README
@@ -53,8 +53,13 @@ Most of the contents of this file will eventually be added to /install.rb. In th
|
||||
|
||||
4. Prerequisites (Mac OSX)
|
||||
|
||||
Make sure you have XCode installed - which provided the sqlite support BeEF needs
|
||||
Sqlite support is native in MacOS 10.6+
|
||||
- XCode: provides the sqlite support BeEF needs
|
||||
|
||||
- Ruby 1.9
|
||||
To install RVM and Ruby 1.9.3 on Mac OS:
|
||||
$ bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer) source ~/.bash_profile
|
||||
$ rvm install 1.9.3-p0 --with-gcc=clang
|
||||
$ rvm use 1.9.3
|
||||
|
||||
|
||||
5. Install instructions
|
||||
|
||||
17
Rakefile
17
Rakefile
@@ -135,3 +135,20 @@ file '/tmp/msf-test/msfconsole' do
|
||||
sh "cd test;git clone https://github.com/rapid7/metasploit-framework.git /tmp/msf-test"
|
||||
end
|
||||
|
||||
|
||||
################################
|
||||
# Create Mac DMG File
|
||||
|
||||
task :dmg do
|
||||
puts "\nCreating Working Directory\n";
|
||||
sh "mkdir dmg";
|
||||
sh "mkdir dmg/BeEF";
|
||||
sh "rsync * dmg/BeEF --exclude=dmg -r";
|
||||
sh "ln -s /Applications dmg/";
|
||||
puts "\nCreating DMG File\n"
|
||||
sh "hdiutil create ./BeEF.dmg -srcfolder dmg -volname BeEF -ov";
|
||||
puts "\nCleaning Up\n"
|
||||
sh "rm -r dmg";
|
||||
puts "\nBeEF.dmg created\n"
|
||||
end
|
||||
|
||||
|
||||
2
beef
2
beef
@@ -24,7 +24,7 @@ if RUBY_VERSION < '1.9'
|
||||
puts "\n"
|
||||
puts "Ruby version " + RUBY_VERSION + " is no longer supported. Please upgrade 1.9 or later."
|
||||
puts "OSX:"
|
||||
puts "sudo port install ruby19 +nosuffix"
|
||||
puts "See Readme"
|
||||
puts "\n"
|
||||
exit
|
||||
end
|
||||
|
||||
@@ -168,9 +168,22 @@ beef.net = {
|
||||
response.was_cross_domain = cross_domain;
|
||||
var start_time = new Date().getTime();
|
||||
|
||||
/*
|
||||
* according to http://api.jquery.com/jQuery.ajax/, Note: having 'script':
|
||||
* This will turn POSTs into GETs for remote-domain requests.
|
||||
*/
|
||||
if (method == "POST"){
|
||||
$j.ajaxSetup({
|
||||
dataType: dataType
|
||||
});
|
||||
}else{ //GET, HEAD, ...
|
||||
$j.ajaxSetup({
|
||||
dataType: 'script'
|
||||
});
|
||||
}
|
||||
|
||||
//build and execute the request
|
||||
$j.ajax({type: method,
|
||||
dataType: 'script', // this is required for bugs in IE so data can be transferred back to the server
|
||||
url: url,
|
||||
data: data,
|
||||
timeout: (timeout * 1000),
|
||||
|
||||
@@ -21,27 +21,25 @@ ZombieTab = function(zombie) {
|
||||
requester_tab = new ZombieTab_Requester(zombie);
|
||||
xssrays_tab = new ZombieTab_XssRaysTab(zombie);
|
||||
|
||||
//-------------------------------------------
|
||||
ZombieTab.superclass.constructor.call(this, {
|
||||
id: zombie.session,
|
||||
id:"current-browser",
|
||||
activeTab: 0,
|
||||
loadMask: {msg:'Loading browser...'},
|
||||
title: zombie.ip,
|
||||
title: "Current Browser",
|
||||
autoScroll: true,
|
||||
closable: true,
|
||||
closable: false,
|
||||
viewConfig: {
|
||||
forceFit: true,
|
||||
type: 'fit'
|
||||
},
|
||||
items:[main_tab, log_tab, commands_tab, requester_tab, xssrays_tab]
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
Ext.extend(ZombieTab, Ext.TabPanel, {
|
||||
listeners: {
|
||||
close: function(panel) {
|
||||
panel.destroy();
|
||||
}
|
||||
activate: function(panel) {},
|
||||
deactivate: function(panel) {},
|
||||
close: function(panel) {}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -132,7 +132,7 @@ function get_dynamic_payload_details(payload, zombie) {
|
||||
generate_form_input_field(Ext.getCmp("payload-panel"), input, null, false, zombie);
|
||||
});
|
||||
|
||||
Ext.getCmp("payload-panel").doLayout();
|
||||
Ext.getCmp("payload-panel").doLayout();
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -145,7 +145,7 @@ function get_dynamic_payload_details(payload, zombie) {
|
||||
* @param: {Object} the targeted Zombie.
|
||||
* @param: {Object} the status bar.
|
||||
*/
|
||||
function genExisingExploitPanel(panel, command_id, zombie, sb) {
|
||||
function genExistingExploitPanel(panel, command_id, zombie, sb) {
|
||||
if(typeof panel != 'object') {
|
||||
Ext.beef.msg('Bad!', 'Incorrect panel chosen.');
|
||||
return;
|
||||
@@ -304,7 +304,7 @@ function genNewExploitPanel(panel, command_module_id, command_module_name, zombi
|
||||
|
||||
var xgrid = Ext.getCmp('command-module-grid-zombie-'+zombie.session);
|
||||
var sb = Ext.getCmp('commands-bbar-zombie-'+zombie.session);
|
||||
|
||||
panel.removeAll();
|
||||
if(command_module_name == 'some special command module') {
|
||||
//HERE we will develop specific panels for the command modules that require it.
|
||||
} else {
|
||||
@@ -327,9 +327,8 @@ function genNewExploitPanel(panel, command_module_id, command_module_name, zombi
|
||||
}
|
||||
|
||||
module = module.command_modules[1];
|
||||
panel.removeAll();
|
||||
|
||||
var form = new Ext.form.FormPanel({
|
||||
|
||||
var form = new Ext.form.FormPanel({
|
||||
url: submiturl,
|
||||
|
||||
id: 'form-command-module-zombie-'+zombie.session,
|
||||
@@ -394,7 +393,7 @@ function genNewExploitPanel(panel, command_module_id, command_module_name, zombi
|
||||
bodyBorder: false,
|
||||
height: 200,
|
||||
hidden: true,
|
||||
border: false //we can remove the border of the panel
|
||||
border: false //we can remove the border of the panel
|
||||
});
|
||||
|
||||
Ext.each(module.Data, function(input){
|
||||
@@ -402,7 +401,6 @@ function genNewExploitPanel(panel, command_module_id, command_module_name, zombi
|
||||
);
|
||||
|
||||
form.add(payload_panel);
|
||||
|
||||
panel.add(form);
|
||||
panel.doLayout();
|
||||
// hide the load mask after rendering of the config panel is done
|
||||
|
||||
@@ -77,7 +77,7 @@ ZombieTab_Commands = function(zombie) {
|
||||
|
||||
if(!command_id) return;
|
||||
|
||||
genExisingExploitPanel(command_module_config, command_id, zombie, commands_statusbar);
|
||||
genExistingExploitPanel(command_module_config, command_id, zombie, commands_statusbar);
|
||||
});
|
||||
|
||||
LoadCommandPanelEvent = function(node,keyclick) {
|
||||
@@ -95,7 +95,7 @@ ZombieTab_Commands = function(zombie) {
|
||||
nonce: Ext.get ("nonce").dom.value
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
genNewExploitPanel(command_module_config, node.id, node.text, zombie, commands_statusbar);
|
||||
commands_statusbar.showValid('Ready');
|
||||
}
|
||||
@@ -139,16 +139,12 @@ ZombieTab_Commands = function(zombie) {
|
||||
'afterrender' : function() {
|
||||
},
|
||||
'selectionchange' : function() {
|
||||
console.log("selection changed");
|
||||
},
|
||||
'activate' : function() {
|
||||
console.log("activate");
|
||||
},
|
||||
'select' : function() {
|
||||
console.log("select");
|
||||
},
|
||||
'keyup' : function() {
|
||||
console.log("Key up");
|
||||
},
|
||||
'render' : function(c) {
|
||||
c.getEl().on('keyup', function() {
|
||||
@@ -189,4 +185,8 @@ ZombieTab_Commands = function(zombie) {
|
||||
var sb = Ext.getCmp('command-module-bbar-zombie-'+zombie.session);
|
||||
};
|
||||
|
||||
Ext.extend(ZombieTab_Commands, Ext.Panel, {});
|
||||
Ext.extend(ZombieTab_Commands, Ext.Panel, {
|
||||
listeners: {
|
||||
close: function(panel) {}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -102,8 +102,6 @@ ZombieTab_Requester = function(zombie) {
|
||||
// itemclick: function(item) {
|
||||
// switch (item.id) {
|
||||
// case 'do-something':
|
||||
// console.log("history_panel_context_menu.rowIndex: " + history_panel_context_menu.rowIndex);
|
||||
// console.log("history_panel_context_menu.dbIndex: " + history_panel_context_menu.dbIndex);
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
|
||||
@@ -113,12 +113,13 @@ Ext.extend(zombiesTreeList, Ext.tree.TreePanel, {
|
||||
//creates a new hooked browser tab when a hooked browser is clicked
|
||||
click: function(node, e) {
|
||||
if(!node.leaf) return;
|
||||
|
||||
if(!mainPanel.get(node.attributes.session)) {
|
||||
|
||||
mainPanel.remove(mainPanel.getComponent('current-browser'));
|
||||
if(!mainPanel.getComponent('current-browser')) {
|
||||
mainPanel.add(new ZombieTab(node.attributes));
|
||||
}
|
||||
|
||||
mainPanel.activate(node.attributes.session);
|
||||
mainPanel.activate(mainPanel.getComponent('current-browser'));
|
||||
},
|
||||
//show the context menu when a HB is right-clicked
|
||||
contextmenu: function(node, event){
|
||||
|
||||
@@ -81,7 +81,6 @@ module BeEF
|
||||
|
||||
# add a log entry for the newly hooked browser
|
||||
BeEF::Core::Logger.instance.register('Zombie', "#{zombie.ip} just joined the horde from the domain: #{log_zombie_domain}:#{log_zombie_port.to_s}", "#{zombie.id}")
|
||||
|
||||
# get and store browser name
|
||||
browser_name = get_param(@data['results'], 'BrowserName')
|
||||
if BeEF::Filters.is_valid_browsername?(browser_name)
|
||||
@@ -274,6 +273,10 @@ module BeEF
|
||||
self.err_msg "Invalid value for hasPersistentCookies returned from the hook browser's initial connection."
|
||||
end
|
||||
|
||||
# log a few info of newly hooked zombie in the console
|
||||
print_info "New Hooked Browser [ip:#{zombie.ip}, type:#{browser_name}-#{browser_version}, os:#{os_name}], hooked domain [#{log_zombie_domain}:#{log_zombie_port.to_s}]"
|
||||
|
||||
|
||||
# Call autorun modules
|
||||
autorun = []
|
||||
BeEF::Core::Configuration.instance.get('beef.module').each { |k, v|
|
||||
|
||||
Reference in New Issue
Block a user