@@ -18,7 +18,7 @@ def initialize(info = {})
18
18
'Name' => 'Chaos RAT XSS to RCE' ,
19
19
'Description' => %q{
20
20
CHAOS v5.0.8 is a free and open-source Remote Administration Tool that
21
- allow generate binaries to control remote operating systems. The
21
+ allows generated binaries to control remote operating systems. The
22
22
webapp contains a remote command execution vulnerability which
23
23
can be triggered by an authenticated user when generating a new
24
24
executable. The webapp also contains an XSS vulnerability within
@@ -72,8 +72,8 @@ def initialize(info = {})
72
72
register_options (
73
73
[
74
74
Opt ::RPORT ( 8080 ) ,
75
- OptString . new ( 'USERNAME' , [ false , 'User to login with' ] ) ,
76
- OptString . new ( 'PASSWORD' , [ false , 'Password to login with' ] ) ,
75
+ OptString . new ( 'USERNAME' , [ false , 'User to login with' ] ) , # admin
76
+ OptString . new ( 'PASSWORD' , [ false , 'Password to login with' ] ) , # admin
77
77
OptString . new ( 'TARGETURI' , [ true , 'The URI of the Chaos Application' , '/' ] ) ,
78
78
OptString . new ( 'JWT' , [ false , 'Agent JWT Token of the malware' ] ) ,
79
79
OptPath . new ( 'AGENT' , [ false , 'A Chaos Agent Binary' ] )
@@ -362,7 +362,7 @@ def exploit
362
362
datastore [ 'AGENT' ]
363
363
fail_with ( Failure ::BadConfig , 'Username and password, or JWT, or AGENT path required' )
364
364
end
365
- fail_with ( Failure ::BadConfig , 'SRVHOST can not be 0.0.0.0, must be a valid IP address' ) if datastore [ 'SRVHOST' ] == '0.0.0.0'
365
+ fail_with ( Failure ::BadConfig , 'SRVHOST can not be 0.0.0.0, must be a valid IP address' ) if Rex :: Socket . addr_atoi ( datastore [ 'SRVHOST' ] ) == 0
366
366
367
367
@xss_response_received = false
368
368
@@ -412,13 +412,7 @@ def cleanup
412
412
print_error ( "Failed to stop http server due to #{ e } " )
413
413
end
414
414
end
415
- @threads . each ( &:kill ) # no need for these anymore
415
+ @threads . each ( &:kill ) unless @threads . nil? # no need for these anymore
416
416
super
417
417
end
418
-
419
- def on_new_session ( session )
420
- super
421
- cleanup
422
- end
423
-
424
418
end
0 commit comments