Nagios XI Scanner - Metasploit
This page contains detailed information about how to use the auxiliary/scanner/http/nagios_xi_scanner metasploit module. For list of all metasploit modules, visit the Metasploit Module Library.
Module Overview
Name: Nagios XI Scanner
Module: auxiliary/scanner/http/nagios_xi_scanner
Source code: modules/auxiliary/scanner/http/nagios_xi_scanner.rb
Disclosure date: -
Last modification time: 2022-02-05 18:21:18 +0000
Supported architecture(s): -
Supported platform(s): -
Target service / protocol: http, https
Target network port(s): 80, 443, 3000, 8000, 8008, 8080, 8443, 8880, 8888
List of CVEs: CVE-2019-15949, CVE-2020-5791, CVE-2020-5792, CVE-2020-35578, CVE-2021-37343
The module detects the version of Nagios XI applications and
suggests matching exploit modules based on the version
number. Since Nagios XI applications only reveal the version
to authenticated users, valid credentials for a Nagios XI
account are required. Alternatively, it is possible to
provide a specific Nagios XI version number via the
VERSION
option. In that case, the module simply suggests
matching exploit modules and does not probe the target(s).
Module Ranking and Traits
Module Ranking:
- normal: The exploit is otherwise reliable, but depends on a specific version and can't (or doesn't) reliably autodetect. More information about ranking can be found here.
Basic Usage
This module is a scanner module, and is capable of testing against multiple hosts.
msf > use auxiliary/scanner/http/nagios_xi_scanner
msf auxiliary(nagios_xi_scanner) > show options
... show and set options ...
msf auxiliary(nagios_xi_scanner) > set RHOSTS ip-range
msf auxiliary(nagios_xi_scanner) > exploit
Other examples of setting the RHOSTS option:
Example 1:
msf auxiliary(nagios_xi_scanner) > set RHOSTS 192.168.1.3-192.168.1.200
Example 2:
msf auxiliary(nagios_xi_scanner) > set RHOSTS 192.168.1.1/24
Example 3:
msf auxiliary(nagios_xi_scanner) > set RHOSTS file:/tmp/ip_list.txt
Required Options
- RHOSTS: The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
Knowledge Base
Vulnerable Application
The module detects the version of Nagios XI running on a target and suggests matching exploit modules based on the version number.
The module takes advantage of the Msf::Exploit::Remote::HTTP::NagiosXi
mixin in order to
authenticate to the target and obtain the version number, which is only revealed to authenticated users.
When used to target a specific host, the module requires valid credentials for a Nagios XI account.
These can be provided via USERNAME
and PASSWORD
options.
Alternatively, it is possible to provide a specific Nagios XI version number via the VERSION
option.
In that case, the module simply suggests matching exploit modules and does not probe the target(s).
The module is able to recommend the following modules based on the target's Nagios XI version: - exploit/linux/http/nagios_xi_plugins_check_plugin_authenticated_rce (CVE-2019-15949) - exploit/linux/http/nagios_xi_plugins_filename_authenticated_rce (CVE-2020-35578) - exploit/linux/http/nagios_xi_mibs_authenticated_rce (CVE-2020-5791) - exploit/linux/http/nagios_xi_snmptrap_authenticated_rce (CVE-2020-5792)
Setting up Nagios XI for testing
Vulnerable Nagios XI versions are available here. Detailed installation instructions are available here and an official video tutorial is available here.
Verification Steps
- Start msfconsole
- Do:
use auxiliary/scanner/http/nagios_xi_scanner
- Do:
set RHOSTS [IP]
- Do:
set USERNAME [username for a valid Nagios XI account]
- Do:
set PASSWORD [password for a valid Nagios XI account]
- Do:
run
Options
FINISH_INSTALL
If this is set to true
, the module will try to finish installing Nagios XI on targets where the installation has not been completed.
This includes signing the license agreement. The default value is false
.
PASSWORD
The password for the Nagios XI account to authenticate with.
TARGETURI
The base path to Nagios XI. The default value is /nagiosxi/
.
USERNAME
The username for the Nagios XI account to authenticate with. The default value is nagiosadmin
.
VERSION
The Nagios XI version to check against existing exploit modules. If this option is selected, the module will not probe the target, so it is not necessary to provide credentials.
Scenarios
Nagios XI 5.6.5 running on CentOS 7
msf6 > use auxiliary/scanner/http/nagios_xi_scanner
msf6 auxiliary(scanner/http/nagios_xi_scanner) > set rhosts 192.168.1.14
rhosts => 192.168.1.14
msf6 auxiliary(scanner/http/nagios_xi_scanner) > set password nagiosadmin
password => nagiosadmin
msf6 auxiliary(scanner/http/nagios_xi_scanner) > show options
Module options (auxiliary/scanner/http/nagios_xi_scanner):
Name Current Setting Required Description
---- --------------- -------- -----------
FINISH_INSTALL false no If the Nagios XI installation has not been completed, try to do so
. This includes signing the license agreement.
PASSWORD nagiosadmin no Password to authenticate with
Proxies no A proxy chain of format type:host:port[,type:host:port][...]
RHOSTS 192.168.1.14 yes The target host(s), range CIDR identifier, or hosts file with synt
ax 'file:'
RPORT 80 yes The target port (TCP)
SSL false no Negotiate SSL/TLS for outgoing connections
TARGETURI /nagiosxi/ yes The base path to the Nagios XI application
THREADS 1 yes The number of concurrent threads (max one per host)
USERNAME nagiosadmin no Username to authenticate with
VERSION no Nagios XI version to check against existing exploit modules
VHOST no HTTP server virtual host
msf6 auxiliary(scanner/http/nagios_xi_scanner) > run
[+] Successfully authenticated to Nagios XI
[*] Target is Nagios XI with version 5.6.5
[+] The target appears to be vulnerable to the following 4 exploit(s):
[*]
[*] CVE-2019-15949 exploit/linux/http/nagios_xi_plugins_check_plugin_authenticated_rce.rb
[*] CVE-2020-35578 exploit/linux/http/nagios_xi_plugins_filename_authenticated_rce
[*] CVE-2020-5792 exploit/linux/http/nagios_xi_snmptrap_authenticated_rce
[*] CVE-2020-5791 exploit/linux/http/nagios_xi_mibs_authenticated_rce
[*]
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed
Nagios XI 5.7.9 version provided via VERSION
msf6 > use auxiliary/scanner/http/nagios_xi_scanner
msf6 auxiliary(scanner/http/nagios_xi_scanner) > set rhosts 192.168.1.14
rhosts => 192.168.1.14
msf6 auxiliary(scanner/http/nagios_xi_scanner) > set version 5.7.9
version => 5.7.9
msf6 auxiliary(scanner/http/nagios_xi_scanner) > show options
Module options (auxiliary/scanner/http/nagios_xi_scanner):
Name Current Setting Required Description
---- --------------- -------- -----------
FINISH_INSTALL false no If the Nagios XI installation has not been completed, try to do so
. This includes signing the license agreement.
PASSWORD no Password to authenticate with
Proxies no A proxy chain of format type:host:port[,type:host:port][...]
RHOSTS 192.168.1.14 yes The target host(s), range CIDR identifier, or hosts file with synt
ax 'file:'
RPORT 80 yes The target port (TCP)
SSL false no Negotiate SSL/TLS for outgoing connections
TARGETURI /nagiosxi/ yes The base path to the Nagios XI application
THREADS 1 yes The number of concurrent threads (max one per host)
USERNAME nagiosadmin no Username to authenticate with
VERSION 5.7.9 no Nagios XI version to check against existing exploit modules
VHOST no HTTP server virtual host
msf6 auxiliary(scanner/http/nagios_xi_scanner) > run
[+] Version 5.7.9 matches the following 1 exploit(s):
[*]
[*] CVE-2020-35578 exploit/linux/http/nagios_xi_plugins_filename_authenticated_rce
[*]
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed
Nagios XI 5.7.5 - incomplete installation, FINISH_INSTALL set to true
msf6 > use auxiliary/scanner/http/nagios_xi_scanner
msf6 auxiliary(scanner/http/nagios_xi_scanner) > set rhosts 192.168.1.16
rhosts => 192.168.1.16
msf6 auxiliary(scanner/http/nagios_xi_scanner) > set password nagiosadmin
password => nagiosadmin
msf6 auxiliary(scanner/http/nagios_xi_scanner) > set finish_install true
finish_install => true
msf6 auxiliary(scanner/http/nagios_xi_scanner) > show options
Module options (auxiliary/scanner/http/nagios_xi_scanner):
Name Current Setting Required Description
---- --------------- -------- -----------
FINISH_INSTALL true no If the Nagios XI installation has not been completed, try to do so
. This includes signing the license agreement.
PASSWORD nagiosadmin no Password to authenticate with
Proxies no A proxy chain of format type:host:port[,type:host:port][...]
RHOSTS 192.168.1.16 yes The target host(s), range CIDR identifier, or hosts file with synt
ax 'file:'
RPORT 80 yes The target port (TCP)
SSL false no Negotiate SSL/TLS for outgoing connections
TARGETURI /nagiosxi/ yes The base path to the Nagios XI application
THREADS 1 yes The number of concurrent threads (max one per host)
USERNAME nagiosadmin no Username to authenticate with
VERSION no Nagios XI version to check against existing exploit modules
VHOST no HTTP server virtual host
msf6 auxiliary(scanner/http/nagios_xi_scanner) > run
[*] Attempting to authenticate to Nagios XI...
[!] The target seems to be a Nagios XI application that has not been fully installed yet.
[*] Attempting to finish the Nagios XI installation on the target using the provided password. The username will be `nagiosadmin`.
[*] Attempting to authenticate to Nagios XI...
[!] The Nagios XI license agreement has not yet been signed on the target.
[*] Attempting to sign the Nagios XI license agreement...
[*] Attempting to authenticate to Nagios XI...
[+] Successfully authenticated to Nagios XI
[*] Target is Nagios XI with version 5.7.5
[+] The target appears to be vulnerable to the following 1 exploit(s):
[*]
[*] CVE-2020-35578 exploit/linux/http/nagios_xi_plugins_filename_authenticated_rce
[*]
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed
Go back to menu.
Msfconsole Usage
Here is how the scanner/http/nagios_xi_scanner auxiliary module looks in the msfconsole:
msf6 > use auxiliary/scanner/http/nagios_xi_scanner
msf6 auxiliary(scanner/http/nagios_xi_scanner) > show info
Name: Nagios XI Scanner
Module: auxiliary/scanner/http/nagios_xi_scanner
License: Metasploit Framework License (BSD)
Rank: Normal
Provided by:
Erik Wynter
Check supported:
No
Basic options:
Name Current Setting Required Description
---- --------------- -------- -----------
FINISH_INSTALL false no If the Nagios XI installation has not been completed, try to do so. This includes signing the license agreement.
PASSWORD no Password to authenticate with
Proxies no A proxy chain of format type:host:port[,type:host:port][...]
RHOSTS yes The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
RPORT 80 yes The target port (TCP)
SSL false no Negotiate SSL/TLS for outgoing connections
TARGETURI /nagiosxi/ yes The base path to the Nagios XI application
THREADS 1 yes The number of concurrent threads (max one per host)
USERNAME nagiosadmin no Username to authenticate with
VERSION no Nagios XI version to check against existing exploit modules
VHOST no HTTP server virtual host
Description:
The module detects the version of Nagios XI applications and
suggests matching exploit modules based on the version number. Since
Nagios XI applications only reveal the version to authenticated
users, valid credentials for a Nagios XI account are required.
Alternatively, it is possible to provide a specific Nagios XI
version number via the `VERSION` option. In that case, the module
simply suggests matching exploit modules and does not probe the
target(s).
References:
https://nvd.nist.gov/vuln/detail/CVE-2019-15949
https://nvd.nist.gov/vuln/detail/CVE-2020-5791
https://nvd.nist.gov/vuln/detail/CVE-2020-5792
https://nvd.nist.gov/vuln/detail/CVE-2020-35578
Module Options
This is a complete list of options available in the scanner/http/nagios_xi_scanner auxiliary module:
msf6 auxiliary(scanner/http/nagios_xi_scanner) > show options
Module options (auxiliary/scanner/http/nagios_xi_scanner):
Name Current Setting Required Description
---- --------------- -------- -----------
FINISH_INSTALL false no If the Nagios XI installation has not been completed, try to do so. This includes signing the license agreement.
PASSWORD no Password to authenticate with
Proxies no A proxy chain of format type:host:port[,type:host:port][...]
RHOSTS yes The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
RPORT 80 yes The target port (TCP)
SSL false no Negotiate SSL/TLS for outgoing connections
TARGETURI /nagiosxi/ yes The base path to the Nagios XI application
THREADS 1 yes The number of concurrent threads (max one per host)
USERNAME nagiosadmin no Username to authenticate with
VERSION no Nagios XI version to check against existing exploit modules
VHOST no HTTP server virtual host
Advanced Options
Here is a complete list of advanced options supported by the scanner/http/nagios_xi_scanner auxiliary module:
msf6 auxiliary(scanner/http/nagios_xi_scanner) > show advanced
Module advanced options (auxiliary/scanner/http/nagios_xi_scanner):
Name Current Setting Required Description
---- --------------- -------- -----------
DOMAIN WORKSTATION yes The domain to use for Windows authentication
DigestAuthIIS true no Conform to IIS, should work for most servers. Only set to false for non-IIS servers
FingerprintCheck true no Conduct a pre-exploit fingerprint verification
HttpClientTimeout no HTTP connection and receive timeout
HttpPassword no The HTTP password to specify for authentication
HttpRawHeaders no Path to ERB-templatized raw headers to append to existing headers
HttpTrace false no Show the raw HTTP requests and responses
HttpTraceColors red/blu no HTTP request and response colors for HttpTrace (unset to disable)
HttpTraceHeadersOnly false no Show HTTP headers only in HttpTrace
HttpUsername no The HTTP username to specify for authentication
SSLVersion Auto yes Specify the version of SSL/TLS to be used (Auto, TLS and SSL23 are auto-negotiate) (Accepted: Auto, TLS, SSL23, SSL3, TLS1, TLS1.1, TLS1.2)
ShowProgress true yes Display progress messages during a scan
ShowProgressPercent 10 yes The interval in percent that progress should be shown
UserAgent Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) no The User-Agent header to use for all requests
VERBOSE false no Enable detailed status messages
WORKSPACE no Specify the workspace for this module
Auxiliary Actions
This is a list of all auxiliary actions that the scanner/http/nagios_xi_scanner module can do:
msf6 auxiliary(scanner/http/nagios_xi_scanner) > show actions
Auxiliary actions:
Name Description
---- -----------
Evasion Options
Here is the full list of possible evasion options supported by the scanner/http/nagios_xi_scanner auxiliary module in order to evade defenses (e.g. Antivirus, EDR, Firewall, NIDS etc.):
msf6 auxiliary(scanner/http/nagios_xi_scanner) > show evasion
Module evasion options:
Name Current Setting Required Description
---- --------------- -------- -----------
HTTP::header_folding false no Enable folding of HTTP headers
HTTP::method_random_case false no Use random casing for the HTTP method
HTTP::method_random_invalid false no Use a random invalid, HTTP method for request
HTTP::method_random_valid false no Use a random, but valid, HTTP method for request
HTTP::pad_fake_headers false no Insert random, fake headers into the HTTP request
HTTP::pad_fake_headers_count 0 no How many fake headers to insert into the HTTP request
HTTP::pad_get_params false no Insert random, fake query string variables into the request
HTTP::pad_get_params_count 16 no How many fake query string variables to insert into the request
HTTP::pad_method_uri_count 1 no How many whitespace characters to use between the method and uri
HTTP::pad_method_uri_type space no What type of whitespace to use between the method and uri (Accepted: space, tab, apache)
HTTP::pad_post_params false no Insert random, fake post variables into the request
HTTP::pad_post_params_count 16 no How many fake post variables to insert into the request
HTTP::pad_uri_version_count 1 no How many whitespace characters to use between the uri and version
HTTP::pad_uri_version_type space no What type of whitespace to use between the uri and version (Accepted: space, tab, apache)
HTTP::uri_dir_fake_relative false no Insert fake relative directories into the uri
HTTP::uri_dir_self_reference false no Insert self-referential directories into the uri
HTTP::uri_encode_mode hex-normal no Enable URI encoding (Accepted: none, hex-normal, hex-noslashes, hex-random, hex-all, u-normal, u-all, u-random)
HTTP::uri_fake_end false no Add a fake end of URI (eg: /%20HTTP/1.0/../../)
HTTP::uri_fake_params_start false no Add a fake start of params to the URI (eg: /%3fa=b/../)
HTTP::uri_full_url false no Use the full URL for all HTTP requests
HTTP::uri_use_backslashes false no Use back slashes instead of forward slashes in the uri
HTTP::version_random_invalid false no Use a random invalid, HTTP version for request
HTTP::version_random_valid false no Use a random, but valid, HTTP version for request
Go back to menu.
Error Messages
This module may fail with the following error messages:
- Invalid version format: `<VERSION>`. Please provide an existing Nagios XI version or use `unset VERSION` to cancel
- This module does not support the legacy Nagios XI version <VERSION>
- Invalid version format: `<VERSION>`. Please provide an existing Nagios XI version or use `unset VERSION` to cancel
- Nagios XI version <VERSION> doesn't match any exploit modules.
- VERSION cannot be empty. Please provide an existing Nagios XI VERSION or use `unset VERSION` to cancel
- No credentials provided. Attempting to obtain the Nagios XI version from the login page. This will not work for newer versions.
- Please provide a valid Nagios XI USERNAME and PASSWORD, or a specific VERSION to check
- <RHOST>:<RPORT> - <RES_ARRAY:0>
- <RHOST>:<RPORT> - <INSTALL_RESULT:1>
- <RHOST>:<RPORT> - <RES_ARRAY:0>
- <RHOST>:<RPORT> - Failed to install Nagios XI on the target.
- <RHOST>:<RPORT> - <SIGN_LICENSE_RESULT:1>
- <RHOST>:<RPORT> - <RES_ARRAY:0>
- <RHOST>:<RPORT> - Failed to sign the license agreement.
- <RHOST>:<RPORT> - Unable to obtain the Nagios XI version from the dashboard
Check for the possible causes from the code snippets below found in the module source code. This can often times help in identifying the root cause of the problem.
Invalid version format: `<VERSION>`. Please provide an existing Nagios XI version or use `unset VERSION` to cancel
Here is a relevant code snippet related to the "Invalid version format: `<VERSION>`. Please provide an existing Nagios XI version or use `unset VERSION` to cancel" error message:
81: end
82:
83: def rce_check(version, real_target: false)
84: version_type, clean_version = parse_version(version)
85: if version_type == 'unsupported'
86: print_error("Invalid version format: `#{version}`. Please provide an existing Nagios XI version or use `unset VERSION` to cancel")
87: return
88: end
89:
90: if version_type == 'legacy'
91: print_error("This module does not support the legacy Nagios XI version #{version}")
This module does not support the legacy Nagios XI version <VERSION>
Here is a relevant code snippet related to the "This module does not support the legacy Nagios XI version <VERSION>" error message:
86: print_error("Invalid version format: `#{version}`. Please provide an existing Nagios XI version or use `unset VERSION` to cancel")
87: return
88: end
89:
90: if version_type == 'legacy'
91: print_error("This module does not support the legacy Nagios XI version #{version}")
92: return
93: end
94:
95: begin
96: gem_version = Rex::Version.new(clean_version)
Invalid version format: `<VERSION>`. Please provide an existing Nagios XI version or use `unset VERSION` to cancel
Here is a relevant code snippet related to the "Invalid version format: `<VERSION>`. Please provide an existing Nagios XI version or use `unset VERSION` to cancel" error message:
93: end
94:
95: begin
96: gem_version = Rex::Version.new(clean_version)
97: rescue ArgumentError
98: print_error("Invalid version format: `#{version}`. Please provide an existing Nagios XI version or use `unset VERSION` to cancel")
99: return
100: end
101:
102: cve_rce_hash = nagios_xi_rce_check(gem_version)
103:
Nagios XI version <VERSION> doesn't match any exploit modules.
Here is a relevant code snippet related to the "Nagios XI version <VERSION> doesn't match any exploit modules." error message:
100: end
101:
102: cve_rce_hash = nagios_xi_rce_check(gem_version)
103:
104: if cve_rce_hash.empty?
105: print_error("Nagios XI version #{version} doesn't match any exploit modules.")
106: return
107: end
108:
109: # Adjust the output based on whether a version was provided, or we obtained a version from a target
110: if real_target
VERSION cannot be empty. Please provide an existing Nagios XI VERSION or use `unset VERSION` to cancel
Here is a relevant code snippet related to the "VERSION cannot be empty. Please provide an existing Nagios XI VERSION or use `unset VERSION` to cancel" error message:
129: # The first undercore in _target_host is used since this parameter is passed in by default but our code never uses it
130: def run_host(_target_host)
131: # Check if we have a valid version to test
132: if version
133: if version.empty?
134: print_error('VERSION cannot be empty. Please provide an existing Nagios XI VERSION or use `unset VERSION` to cancel')
135: return
136: end
137:
138: return rce_check(version)
139: end
No credentials provided. Attempting to obtain the Nagios XI version from the login page. This will not work for newer versions.
Here is a relevant code snippet related to the "No credentials provided. Attempting to obtain the Nagios XI version from the login page. This will not work for newer versions." error message:
138: return rce_check(version)
139: end
140:
141: # Check if we have credentials, if not, try to obtain the Nagios XI version from login.php
142: if username.blank? || password.blank?
143: print_warning('No credentials provided. Attempting to obtain the Nagios XI version from the login page. This will not work for newer versions.')
144: nagios_version_result, error_message = nagios_xi_version_no_auth
145:
146: if error_message
147: print_error("#{rhost}:#{rport} - #{error_message}")
148: print_warning('Please provide a valid Nagios XI USERNAME and PASSWORD, or a specific VERSION to check')
Please provide a valid Nagios XI USERNAME and PASSWORD, or a specific VERSION to check
Here is a relevant code snippet related to the "Please provide a valid Nagios XI USERNAME and PASSWORD, or a specific VERSION to check" error message:
143: print_warning('No credentials provided. Attempting to obtain the Nagios XI version from the login page. This will not work for newer versions.')
144: nagios_version_result, error_message = nagios_xi_version_no_auth
145:
146: if error_message
147: print_error("#{rhost}:#{rport} - #{error_message}")
148: print_warning('Please provide a valid Nagios XI USERNAME and PASSWORD, or a specific VERSION to check')
149: return
150: end
151:
152: print_status("Target is Nagios XI with version #{nagios_version_result}")
153:
<RHOST>:<RPORT> - <RES_ARRAY:0>
Here is a relevant code snippet related to the "<RHOST>:<RPORT> - <RES_ARRAY:0>" error message:
158: # Use nagios_xi_login to try and authenticate. If authentication succeeds, nagios_xi_login returns
159: # an array containing the http response body of a get request to index.php and the session cookies
160: login_result, res_array = nagios_xi_login(username, password, finish_install)
161: case login_result
162: when 1..3 # An error occurred
163: print_error("#{rhost}:#{rport} - #{res_array[0]}")
164: return
165: when 4 # Nagios XI is not fully installed
166: install_result = install_nagios_xi(password)
167: if install_result
168: print_error("#{rhost}:#{rport} - #{install_result[1]}")
<RHOST>:<RPORT> - <INSTALL_RESULT:1>
Here is a relevant code snippet related to the "<RHOST>:<RPORT> - <INSTALL_RESULT:1>" error message:
163: print_error("#{rhost}:#{rport} - #{res_array[0]}")
164: return
165: when 4 # Nagios XI is not fully installed
166: install_result = install_nagios_xi(password)
167: if install_result
168: print_error("#{rhost}:#{rport} - #{install_result[1]}")
169: return
170: end
171:
172: login_result, res_array = login_after_install_or_license(username, password, finish_install)
173: case login_result
<RHOST>:<RPORT> - <RES_ARRAY:0>
Here is a relevant code snippet related to the "<RHOST>:<RPORT> - <RES_ARRAY:0>" error message:
170: end
171:
172: login_result, res_array = login_after_install_or_license(username, password, finish_install)
173: case login_result
174: when 1..3 # An error occurred
175: print_error("#{rhost}:#{rport} - #{res_array[0]}")
176: return
177: when 4 # Nagios XI is still not fully installed
178: print_error("#{rhost}:#{rport} - Failed to install Nagios XI on the target.")
179: return
180: end
<RHOST>:<RPORT> - Failed to install Nagios XI on the target.
Here is a relevant code snippet related to the "<RHOST>:<RPORT> - Failed to install Nagios XI on the target." error message:
173: case login_result
174: when 1..3 # An error occurred
175: print_error("#{rhost}:#{rport} - #{res_array[0]}")
176: return
177: when 4 # Nagios XI is still not fully installed
178: print_error("#{rhost}:#{rport} - Failed to install Nagios XI on the target.")
179: return
180: end
181: end
182:
183: # when 5 is excluded from the case statement above to prevent having to use this code block twice.
<RHOST>:<RPORT> - <SIGN_LICENSE_RESULT:1>
Here is a relevant code snippet related to the "<RHOST>:<RPORT> - <SIGN_LICENSE_RESULT:1>" error message:
184: # Including when 5 would require using this code block once at the end of the `when 4` code block above, and once here.
185: if login_result == 5 # the Nagios XI license agreement has not been signed
186: auth_cookies, nsp = res_array
187: sign_license_result = sign_license_agreement(auth_cookies, nsp)
188: if sign_license_result
189: print_error("#{rhost}:#{rport} - #{sign_license_result[1]}")
190: return
191: end
192:
193: login_result, res_array = login_after_install_or_license(username, password, finish_install)
194: case login_result
<RHOST>:<RPORT> - <RES_ARRAY:0>
Here is a relevant code snippet related to the "<RHOST>:<RPORT> - <RES_ARRAY:0>" error message:
191: end
192:
193: login_result, res_array = login_after_install_or_license(username, password, finish_install)
194: case login_result
195: when 1..3
196: print_error("#{rhost}:#{rport} - #{res_array[0]}")
197: return
198: when 5 # the Nagios XI license agreement still has not been signed
199: print_error("#{rhost}:#{rport} - Failed to sign the license agreement.")
200: return
201: end
<RHOST>:<RPORT> - Failed to sign the license agreement.
Here is a relevant code snippet related to the "<RHOST>:<RPORT> - Failed to sign the license agreement." error message:
194: case login_result
195: when 1..3
196: print_error("#{rhost}:#{rport} - #{res_array[0]}")
197: return
198: when 5 # the Nagios XI license agreement still has not been signed
199: print_error("#{rhost}:#{rport} - Failed to sign the license agreement.")
200: return
201: end
202: end
203:
204: print_good('Successfully authenticated to Nagios XI')
<RHOST>:<RPORT> - Unable to obtain the Nagios XI version from the dashboard
Here is a relevant code snippet related to the "<RHOST>:<RPORT> - Unable to obtain the Nagios XI version from the dashboard" error message:
204: print_good('Successfully authenticated to Nagios XI')
205:
206: # Obtain the Nagios XI version
207: nagios_version = nagios_xi_version(res_array[0])
208: if nagios_version.nil?
209: print_error("#{rhost}:#{rport} - Unable to obtain the Nagios XI version from the dashboard")
210: return
211: end
212:
213: print_status("Target is Nagios XI with version #{nagios_version}")
214:
Go back to menu.
Related Pull Requests
- #15192 Merged Pull Request: Enforce Style/RedundantBegin for new modules
- #14697 Merged Pull Request: Add Nagios XI mixin and auxiliary scanner module and docs
References
See Also
Check also the following modules related to this module:
- exploit/linux/http/nagios_xi_autodiscovery_webshell
- exploit/linux/http/nagios_xi_mibs_authenticated_rce
- exploit/linux/http/nagios_xi_plugins_check_plugin_authenticated_rce
- exploit/linux/http/nagios_xi_plugins_filename_authenticated_rce
- exploit/linux/http/nagios_xi_snmptrap_authenticated_rce
- exploit/linux/http/nagios_xi_chained_rce
- exploit/linux/http/nagios_xi_chained_rce_2_electric_boogaloo
- exploit/linux/http/nagios_xi_magpie_debug
- exploit/linux/misc/nagios_nrpe_arguments
- exploit/unix/webapp/nagios_graph_explorer
- exploit/unix/webapp/nagios3_history_cgi
- exploit/unix/webapp/nagios3_statuswml_ping
- post/linux/gather/enum_nagios_xi
Related Nessus plugins:
Authors
- Erik Wynter
Version
This page has been produced using Metasploit Framework version 6.1.33-dev. For more modules, visit the Metasploit Module Library.
Go back to menu.