File tree Expand file tree Collapse file tree 2 files changed +39
-0
lines changed
lib/msf/core/modules/external Expand file tree Collapse file tree 2 files changed +39
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ def self.generate(module_path)
11
11
remote_exploit_cmd_stager ( mod )
12
12
when 'capture_server'
13
13
capture_server ( mod )
14
+ when 'dos'
15
+ dos ( mod )
14
16
else
15
17
# TODO have a nice load error show up in the logs
16
18
''
@@ -66,4 +68,12 @@ def self.capture_server(mod)
66
68
meta = mod_meta_common ( mod )
67
69
render_template ( 'capture_server.erb' , meta )
68
70
end
71
+
72
+ def self . dos ( mod )
73
+ meta = mod_meta_common ( mod )
74
+ meta [ :date ] = mod . meta [ 'date' ] . dump
75
+ meta [ :references ] = mod . meta [ 'references' ] . map do |r |
76
+ "[#{ r [ 'type' ] . upcase . dump } , #{ r [ 'ref' ] . dump } ]"
77
+ render_template ( 'dos.erb' , meta )
78
+ end
69
79
end
Original file line number Diff line number Diff line change
1
+ require 'msf/core/modules/external/bridge'
2
+ require 'msf/core/module/external'
3
+
4
+ class MetasploitModule < Msf::Auxiliary
5
+ include Msf::Module::External
6
+ include Msf::Auxiliary::Dos
7
+
8
+ def initialize
9
+ super({
10
+ <%= common_metadata meta %>
11
+ 'References' =>
12
+ [
13
+ <%= meta [ :references ] %>
14
+ ],
15
+ 'DisclosureDate' => <%= meta [ :date ] %> ,
16
+ })
17
+
18
+ register_options([
19
+ <%= meta [ :options ] %>
20
+ ])
21
+ end
22
+
23
+ def run
24
+ print_status("Starting server...")
25
+ mod = Msf::Modules::External::Bridge.open(<%= meta [ :path ] %> )
26
+ mod.run(datastore)
27
+ wait_status(mod)
28
+ end
29
+ end
You can’t perform that action at this time.
0 commit comments