Skip to content

Commit a812617

Browse files
committed
Removed "ssl_restore = true"
1 parent 10e4668 commit a812617

17 files changed

+52
-136
lines changed

modules/exploits/linux/http/dlink_diagnostic_exec_noauth.rb

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,6 @@ def exploit
122122
if (datastore['DOWNHOST'])
123123
service_url = 'http://' + datastore['DOWNHOST'] + ':' + datastore['SRVPORT'].to_s + resource_uri
124124
else
125-
#do not use SSL
126-
if datastore['SSL']
127-
ssl_restore = true
128-
datastore['SSL'] = false
129-
end
130125

131126
#we use SRVHOST as download IP for the coming wget command.
132127
#SRVHOST needs a real IP address of our download host
@@ -144,9 +139,10 @@ def exploit
144139
on_request_uri(cli, req)
145140
},
146141
'Path' => resource_uri
147-
}})
142+
},
143+
'ssl' => false # do not use SSL
144+
})
148145

149-
datastore['SSL'] = true if ssl_restore
150146
end
151147

152148
#

modules/exploits/linux/http/dlink_dir615_up_exec.rb

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -155,11 +155,6 @@ def exploit
155155
if (datastore['DOWNHOST'])
156156
service_url = 'http://' + datastore['DOWNHOST'] + ':' + datastore['SRVPORT'].to_s + resource_uri
157157
else
158-
#do not use SSL
159-
if datastore['SSL']
160-
ssl_restore = true
161-
datastore['SSL'] = false
162-
end
163158

164159
if (datastore['SRVHOST'] == "0.0.0.0" or datastore['SRVHOST'] == "::")
165160
srv_host = Rex::Socket.source_address(rhost)
@@ -174,9 +169,10 @@ def exploit
174169
on_request_uri(cli, req)
175170
},
176171
'Path' => resource_uri
177-
}})
172+
},
173+
'ssl' => false # do not use SSL
174+
})
178175

179-
datastore['SSL'] = true if ssl_restore
180176
end
181177

182178
#

modules/exploits/linux/http/dlink_hnap_login_bof.rb

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -253,12 +253,6 @@ def exploit
253253
@elf_sent = false
254254
resource_uri = '/' + downfile
255255

256-
#do not use SSL
257-
if datastore['SSL']
258-
ssl_restore = true
259-
datastore['SSL'] = false
260-
end
261-
262256
if (datastore['SRVHOST'] == "0.0.0.0" or datastore['SRVHOST'] == "::")
263257
srv_host = Rex::Socket.source_address(rhost)
264258
else
@@ -272,7 +266,9 @@ def exploit
272266
on_request_uri(cli, req)
273267
},
274268
'Path' => resource_uri
275-
}})
269+
},
270+
'ssl' => false # do not use SSL
271+
})
276272

277273
datastore['SSL'] = true if ssl_restore
278274
print_status("#{peer} - Asking the device to download and execute #{service_url}")

modules/exploits/linux/http/linksys_e1500_apply_exec.rb

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -151,11 +151,6 @@ def exploit
151151
if (datastore['DOWNHOST'])
152152
service_url = 'http://' + datastore['DOWNHOST'] + ':' + datastore['SRVPORT'].to_s + resource_uri
153153
else
154-
#do not use SSL
155-
if datastore['SSL']
156-
ssl_restore = true
157-
datastore['SSL'] = false
158-
end
159154

160155
#we use SRVHOST as download IP for the coming wget command.
161156
#SRVHOST needs a real IP address of our download host
@@ -172,9 +167,10 @@ def exploit
172167
on_request_uri(cli, req)
173168
},
174169
'Path' => resource_uri
175-
}})
170+
},
171+
'ssl' => false # do not use SSL
172+
})
176173

177-
datastore['SSL'] = true if ssl_restore
178174
end
179175

180176
#

modules/exploits/linux/http/linksys_wrt54gl_apply_exec.rb

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -304,11 +304,6 @@ def exploit
304304
if (datastore['DOWNHOST'])
305305
service_url = 'http://' + datastore['DOWNHOST'] + ':' + datastore['SRVPORT'].to_s + resource_uri
306306
else
307-
#do not use SSL
308-
if datastore['SSL']
309-
ssl_restore = true
310-
datastore['SSL'] = false
311-
end
312307

313308
#we use SRVHOST as download IP for the coming wget command.
314309
#SRVHOST needs a real IP address of our download host
@@ -325,9 +320,10 @@ def exploit
325320
on_request_uri(cli, req)
326321
},
327322
'Path' => resource_uri
328-
}})
323+
},
324+
'ssl' => false # do not use SSL
325+
})
329326

330-
datastore['SSL'] = true if ssl_restore
331327
end
332328

333329
#

modules/exploits/linux/http/netgear_dgn1000b_setup_exec.rb

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -155,11 +155,6 @@ def exploit
155155
if (datastore['DOWNHOST'])
156156
service_url = 'http://' + datastore['DOWNHOST'] + ':' + datastore['SRVPORT'].to_s + resource_uri
157157
else
158-
#do not use SSL
159-
if datastore['SSL']
160-
ssl_restore = true
161-
datastore['SSL'] = false
162-
end
163158

164159
#we use SRVHOST as download IP for the coming wget command.
165160
#SRVHOST needs a real IP address of our download host
@@ -176,9 +171,10 @@ def exploit
176171
on_request_uri(cli, req)
177172
},
178173
'Path' => resource_uri
179-
}})
174+
},
175+
'ssl' => false # do not use SSL
176+
})
180177

181-
datastore['SSL'] = true if ssl_restore
182178
end
183179

184180
#

modules/exploits/linux/http/netgear_dgn2200b_pppoe_exec.rb

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -270,11 +270,6 @@ def exploit
270270
if (datastore['DOWNHOST'])
271271
service_url = 'http://' + datastore['DOWNHOST'] + ':' + datastore['SRVPORT'].to_s + resource_uri
272272
else
273-
#do not use SSL
274-
if datastore['SSL']
275-
ssl_restore = true
276-
datastore['SSL'] = false
277-
end
278273

279274
#we use SRVHOST as download IP for the coming wget command.
280275
#SRVHOST needs a real IP address of our download host
@@ -291,9 +286,10 @@ def exploit
291286
on_request_uri(cli, req)
292287
},
293288
'Path' => resource_uri
294-
}})
289+
},
290+
'ssl' => false # do not use SSL
291+
})
295292

296-
datastore['SSL'] = true if ssl_restore
297293
end
298294

299295
#

modules/exploits/linux/http/vestacp_exec.rb

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -252,28 +252,21 @@ def on_request_uri(cli, _request)
252252
end
253253

254254
def start_http_server
255-
#
256-
# HttpClient and HttpServer use same SSL variable :(
257-
# We don't need SSL for payload delivery so we
258-
# will disable it temporarily.
259-
#
260-
if datastore['SSL']
261-
ssl_restore = true
262-
datastore['SSL'] = false
263-
end
255+
264256
start_service({
265257
'Uri' => {
266258
'Proc' => proc do |cli, req|
267259
on_request_uri(cli, req)
268260
end,
269261
'Path' => resource_uri
270-
}
262+
},
263+
'ssl' => false # do not use SSL
271264
})
272265
print_status("Second payload download URI is #{get_uri}")
273266
# We need to use instance variables since get_uri keeps using
274267
# the SSL setting from the datastore.
275268
# Once the URI is retrieved, we will restore the SSL settings within the datastore.
276269
@second_stage_url = get_uri
277-
datastore['SSL'] = true if ssl_restore
270+
278271
end
279272
end

modules/exploits/linux/smtp/exim4_dovecot_exec.rb

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,6 @@ def exploit
112112
fail_with(Failure::Unknown, 'The Web Server needs to live on SRVPORT=80')
113113
end
114114

115-
#do not use SSL
116-
if datastore['SSL']
117-
ssl_restore = true
118-
datastore['SSL'] = false
119-
end
120-
121115
#we use SRVHOST as download IP for the coming wget command.
122116
#SRVHOST needs a real IP address of our download host
123117
if (datastore['SRVHOST'] == "0.0.0.0" or datastore['SRVHOST'] == "::")
@@ -134,9 +128,10 @@ def exploit
134128
on_request_uri(cli, req)
135129
},
136130
'Path' => resource_uri
137-
}})
131+
},
132+
'ssl' => false # do not use SSL
133+
})
138134

139-
datastore['SSL'] = true if ssl_restore
140135
end
141136

142137

modules/exploits/multi/http/bassmaster_js_injection.rb

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -141,12 +141,6 @@ def start_http_server
141141
srv_host = datastore['SRVHOST']
142142
end
143143

144-
# do not use SSL for the attacking web server
145-
if datastore['SSL']
146-
ssl_restore = true
147-
datastore['SSL'] = false
148-
end
149-
150144
@service_url = "http:\\x2f\\x2f#{srv_host}:#{datastore['SRVPORT']}#{resource_uri}"
151145
service_url_payload = srv_host + resource_uri
152146
print_status("#{rhost}:#{rport} - Starting up our web service on #{@service_url} ...")
@@ -155,8 +149,10 @@ def start_http_server
155149
on_request_uri(cli, req)
156150
},
157151
'Path' => resource_uri
158-
}})
159-
datastore['SSL'] = true if ssl_restore
152+
},
153+
'ssl' => false # do not use SSL
154+
})
155+
160156
connect
161157
end
162158

0 commit comments

Comments
 (0)