Add new template for DoS modules

MS-2855/keylogger-mettle-extension
Adam Cammack 2017-11-20 17:19:14 -06:00
parent dd57138423
commit 2fdc34c8fd
No known key found for this signature in database
GPG Key ID: C9378BA088092D66
2 changed files with 39 additions and 0 deletions

View File

@ -11,6 +11,8 @@ class Msf::Modules::External::Shim
remote_exploit_cmd_stager(mod)
when 'capture_server'
capture_server(mod)
when 'dos'
dos(mod)
else
# TODO have a nice load error show up in the logs
''
@ -66,4 +68,12 @@ class Msf::Modules::External::Shim
meta = mod_meta_common(mod)
render_template('capture_server.erb', meta)
end
def self.dos(mod)
meta = mod_meta_common(mod)
meta[:date] = mod.meta['date'].dump
meta[:references] = mod.meta['references'].map do |r|
"[#{r['type'].upcase.dump}, #{r['ref'].dump}]"
render_template('dos.erb', meta)
end
end

View File

@ -0,0 +1,29 @@
require 'msf/core/modules/external/bridge'
require 'msf/core/module/external'
class MetasploitModule < Msf::Auxiliary
include Msf::Module::External
include Msf::Auxiliary::Dos
def initialize
super({
<%= common_metadata meta %>
'References' =>
[
<%= meta[:references] %>
],
'DisclosureDate' => <%= meta[:date] %>,
})
register_options([
<%= meta[:options] %>
])
end
def run
print_status("Starting server...")
mod = Msf::Modules::External::Bridge.open(<%= meta[:path] %>)
mod.run(datastore)
wait_status(mod)
end
end