Regsvr32.exe (.sct) Command Delivery Server - Metasploit


This page contains detailed information about how to use the auxiliary/server/regsvr32_command_delivery_server metasploit module. For list of all metasploit modules, visit the Metasploit Module Library.

Module Overview


Name: Regsvr32.exe (.sct) Command Delivery Server
Module: auxiliary/server/regsvr32_command_delivery_server
Source code: modules/auxiliary/server/regsvr32_command_delivery_server.rb
Disclosure date: -
Last modification time: 2017-07-24 06:26:21 +0000
Supported architecture(s): -
Supported platform(s): -
Target service / protocol: -
Target network port(s): -
List of CVEs: -

This module uses the Regsvr32.exe Application Whitelisting Bypass technique as a way to run a command on a target system. The major advantage of this technique is that you can execute a static command on the target system and dynamically and remotely change the command that will actually run (by changing the value of CMD). This is useful when combined with persistence methods (e.g., a recurring scheduled task) or when flexibility is needed through the use of a single command (e.g., as Rubber Ducky payload).

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


msf > use auxiliary/server/regsvr32_command_delivery_server
msf auxiliary(regsvr32_command_delivery_server) > exploit

Go back to menu.

Msfconsole Usage


Here is how the server/regsvr32_command_delivery_server auxiliary module looks in the msfconsole:

msf6 > use auxiliary/server/regsvr32_command_delivery_server

msf6 auxiliary(server/regsvr32_command_delivery_server) > show info

       Name: Regsvr32.exe (.sct) Command Delivery Server
     Module: auxiliary/server/regsvr32_command_delivery_server
    License: Metasploit Framework License (BSD)
       Rank: Normal

Provided by:
  Casey Smith
  Trenton Ivey
  mubix <[email protected]>

Check supported:
  No

Basic options:
  Name     Current Setting  Required  Description
  ----     ---------------  --------  -----------
  CMD                       no        The command to execute
  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      false            no        Negotiate SSL for incoming connections
  SSLCert                   no        Path to a custom SSL certificate (default is randomly generated)
  URIPATH                   no        The URI to use for this exploit (default is random)

Description:
  This module uses the Regsvr32.exe Application Whitelisting Bypass 
  technique as a way to run a command on a target system. The major 
  advantage of this technique is that you can execute a static command 
  on the target system and dynamically and remotely change the command 
  that will actually run (by changing the value of CMD). This is 
  useful when combined with persistence methods (e.g., a recurring 
  scheduled task) or when flexibility is needed through the use of a 
  single command (e.g., as Rubber Ducky payload).

References:
  http://subt0x10.blogspot.com/2016/04/bypass-application-whitelisting-script.html

Module Options


This is a complete list of options available in the server/regsvr32_command_delivery_server auxiliary module:

msf6 auxiliary(server/regsvr32_command_delivery_server) > show options

Module options (auxiliary/server/regsvr32_command_delivery_server):

   Name     Current Setting  Required  Description
   ----     ---------------  --------  -----------
   CMD                       no        The command to execute
   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      false            no        Negotiate SSL for incoming connections
   SSLCert                   no        Path to a custom SSL certificate (default is randomly generated)
   URIPATH                   no        The URI to use for this exploit (default is random)

Advanced Options


Here is a complete list of advanced options supported by the server/regsvr32_command_delivery_server auxiliary module:

msf6 auxiliary(server/regsvr32_command_delivery_server) > show advanced

Module advanced options (auxiliary/server/regsvr32_command_delivery_server):

   Name            Current Setting  Required  Description
   ----            ---------------  --------  -----------
   ListenerComm                     no        The specific communication channel to use for this service
   SSLCipher                        no        String for SSL cipher spec - "DHE-RSA-AES256-SHA" or "ADH"
   SSLCompression  false            no        Enable SSL/TLS-level compression
   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)
   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 server/regsvr32_command_delivery_server module can do:

msf6 auxiliary(server/regsvr32_command_delivery_server) > show actions

Auxiliary actions:

   Name  Description
   ----  -----------

Evasion Options


Here is the full list of possible evasion options supported by the server/regsvr32_command_delivery_server auxiliary module in order to evade defenses (e.g. Antivirus, EDR, Firewall, NIDS etc.):

msf6 auxiliary(server/regsvr32_command_delivery_server) > show evasion

Module evasion options:

   Name                  Current Setting  Required  Description
   ----                  ---------------  --------  -----------
   HTTP::chunked         false            no        Enable chunking of HTTP responses via "Transfer-Encoding: chunked"
   HTTP::compression     none             no        Enable compression of HTTP responses via content encoding (Accepted: 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::no_cache        false            no        Disallow the browser to cache HTTP content
   HTTP::server_name     Apache           yes       Configures the Server header of all outgoing replies
   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.


References


See Also


Check also the following modules related to this module:

Authors


  • Casey Smith
  • Trenton Ivey
  • mubix

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.