Skip to content

Commit d1739f3

Browse files
committed
review of chaos rat
1 parent 7f02902 commit d1739f3

File tree

2 files changed

+8
-14
lines changed

2 files changed

+8
-14
lines changed

documentation/modules/exploit/linux/http/chaos_rat_xss_to_rce.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## Vulnerable Application
22

33
CHAOS v5.0.8 is a free and open-source Remote Administration Tool that
4-
allow generate binaries to control remote operating systems. The
4+
allows generated binaries to control remote operating systems. The
55
webapp contains a remote command execution vulnerability which
66
can be triggered by an authenticated user when generating a new
77
executable. The webapp also contains an XSS vulnerability within
@@ -43,11 +43,11 @@ to expand the menu, select `Manage`, `Generate Client`. Click `Build`.
4343

4444
### USERNAME
4545

46-
User to login with, defaults for CHAOS is `admin`.
46+
User to login with, default for CHAOS is `admin`.
4747

4848
### PASSWORD
4949

50-
Password to login with, defaults for CHAOS is `admin`.
50+
Password to login with, default for CHAOS is `admin`.
5151

5252
### JWT
5353

modules/exploits/linux/http/chaos_rat_xss_to_rce.rb

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def initialize(info = {})
1818
'Name' => 'Chaos RAT XSS to RCE',
1919
'Description' => %q{
2020
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
2222
webapp contains a remote command execution vulnerability which
2323
can be triggered by an authenticated user when generating a new
2424
executable. The webapp also contains an XSS vulnerability within
@@ -72,8 +72,8 @@ def initialize(info = {})
7272
register_options(
7373
[
7474
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
7777
OptString.new('TARGETURI', [ true, 'The URI of the Chaos Application', '/']),
7878
OptString.new('JWT', [ false, 'Agent JWT Token of the malware']),
7979
OptPath.new('AGENT', [ false, 'A Chaos Agent Binary'])
@@ -362,7 +362,7 @@ def exploit
362362
datastore['AGENT']
363363
fail_with(Failure::BadConfig, 'Username and password, or JWT, or AGENT path required')
364364
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
366366

367367
@xss_response_received = false
368368

@@ -412,13 +412,7 @@ def cleanup
412412
print_error("Failed to stop http server due to #{e}")
413413
end
414414
end
415-
@threads.each(&:kill) # no need for these anymore
415+
@threads.each(&:kill) unless @threads.nil? # no need for these anymore
416416
super
417417
end
418-
419-
def on_new_session(session)
420-
super
421-
cleanup
422-
end
423-
424418
end

0 commit comments

Comments
 (0)