Skip to content

Commit 82659ab

Browse files
committed
Populate metadata from code to make test easier
1 parent dc02f83 commit 82659ab

File tree

1 file changed

+17
-15
lines changed

1 file changed

+17
-15
lines changed

modules/exploits/windows/http/struts_http_jspinject.rb

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,14 @@ def initialize(info={})
1818
This module exploits the classLoader Apache Struts2 vulnerability
1919
to inject a JSP shell over SMB.
2020
},
21-
'Author' => [
22-
'Matthew Hall <[email protected]>',
23-
],
21+
'Author' =>
22+
[
23+
'Matthew Hall <[email protected]>'
24+
],
2425
'DisclosureDate' => 'May 1 2014',
25-
'Platform' => 'win',
26-
'Privileged' => true,
2726
'References' =>
2827
[
29-
[ 'URL', 'http://www.sec-1.com/blog/'],
30-
[ 'CVE', '2014-0094' ],
28+
['CVE', '2014-0094']
3129
],
3230
'DefaultOptions' =>
3331
{
@@ -47,14 +45,18 @@ def initialize(info={})
4745
]
4846
],
4947
'DefaultTarget' => 0,
50-
))
51-
register_options(
52-
[
53-
OptString.new('URI', [true, 'Path to vulnerable Struts action file', '/struts2-showcase/showcase.action', true ]),
54-
OptString.new('FILE_NAME', [ true, 'A static JSP name (ie. "/example/HelloWorld.jsp")', 'showcase.jsp']),
55-
Opt::RPORT(8080)
56-
], self.class)
57-
deregister_options('FILE_CONTENTS')
48+
))
49+
50+
register_options(
51+
[
52+
OptString.new('URI', [true, 'Path to vulnerable Struts action file', '/struts2-blank/example/HelloWorld.action', true ]),
53+
OptString.new('FILE_NAME', [ true, 'A static JSP name', 'HelloWorld.jsp']),
54+
OptString.new('FOLDER_NAME', [ true, 'A static Folder', 'example']),
55+
OptString.new('SHARE', [ true, 'Share', 'share']),
56+
Opt::RPORT(8080)
57+
], self.class)
58+
59+
deregister_options('FILE_CONTENTS')
5860
end
5961

6062
def check

0 commit comments

Comments
 (0)