Cisco ASA Clientless SSL VPN (WebVPN) Brute-force Login Utility - Metasploit
This page contains detailed information about how to use the auxiliary/scanner/http/cisco_asa_clientless_vpn metasploit module. For list of all metasploit modules, visit the Metasploit Module Library.
Module Overview
Name: Cisco ASA Clientless SSL VPN (WebVPN) Brute-force Login Utility
Module: auxiliary/scanner/http/cisco_asa_clientless_vpn
Source code: modules/auxiliary/scanner/http/cisco_asa_clientless_vpn.rb
Disclosure date: -
Last modification time: 2022-08-19 10:51:33 +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: -
This module scans for Cisco ASA Clientless SSL VPN (WebVPN) web login portals and performs login brute-force to identify valid credentials.
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
This module is a scanner module, and is capable of testing against multiple hosts.
msf > use auxiliary/scanner/http/cisco_asa_clientless_vpn
msf auxiliary(cisco_asa_clientless_vpn) > show options
... show and set options ...
msf auxiliary(cisco_asa_clientless_vpn) > set RHOSTS ip-range
msf auxiliary(cisco_asa_clientless_vpn) > exploit
Other examples of setting the RHOSTS option:
Example 1:
msf auxiliary(cisco_asa_clientless_vpn) > set RHOSTS 192.168.1.3-192.168.1.200
Example 2:
msf auxiliary(cisco_asa_clientless_vpn) > set RHOSTS 192.168.1.1/24
Example 3:
msf auxiliary(cisco_asa_clientless_vpn) > set RHOSTS file:/tmp/ip_list.txt
Required Options
- RHOSTS: The target host(s), see https://github.com/rapid7/metasploit-framework/wiki/Using-Metasploit
Knowledge Base
Vulnerable Application
Description
This module scans for Cisco ASA Clientless SSL VPN (WebVPN) web login portals and performs login brute-force to identify valid credentials.
Installation
Acquire a Cisco ASA device or virtual machine. For this description we will use Cisco Adaptive Security Virtual Appliance (ASAv) VMWare Package 9.18.1 (asav9-18-1.zip):
- https://software.cisco.com/download/home/286119613/type/280775065/release/9.18.1
The official installation guide can be found here But for completeness, the following will guide the user to a full testing configuration. To start we'll make ASDM remotely accessible:
- Unzip the package
- Import
asav-esxi.ovf
in VMWare Fusion (or your VMWare product of choice). - Select the
ASAv5 - 1 Core / 2 GB (100 Mbps)
deployment option. - After the import is complete assign
Network Adapter
(1 is implied) the desired interface (e.g. I'll useWi-Fi
for my setup). - Start the virtual machine
- Allow GRUB to boot the first option (this should happen twice)
- When provided with a command prompt (
ciscoasa>
) typeen
. - Set an enable password (e.g.
labpass1
) - Enter the following in the command line interface:
conf t
No
interface GigabitEthernet 0/0
nameif outside
- Assign a static ip address (note the assigned address should make sense within the
context of you lab. For example, my lab network is 10.9.49.0/24):
ip address 10.9.49.201 255.255.255.0
no shutdown
exit
- Set the default route (the last IP should point to your lab router):
route outside 0.0.0.0 0.0.0.0 10.9.49.1
- Verify you can ping an outside host (e.g.
ping 8.8.8.8
) http server enable
http 0.0.0.0 0.0.0.0 outside
write
exit
You should now be able to reach the ASA's web server remotely. From a remote host, execute the following curl
command to the ASA to verify as much:
albinolobster@ubuntu:~$ curl -kv https://10.9.49.201
* Trying 10.9.49.201:443...
* TCP_NODELAY set
...
> GET / HTTP/1.1`
> Host: 10.9.49.201
> User-Agent: curl/7.68.0
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 301 Moved Permanently
< Date: Tue, 21 Jun 2022 13:52:33 UTC
< Strict-Transport-Security: max-age=31536000
< X-XSS-Protection: 1
< Connection: close
< Location: /admin/public/index.html
<
* Closing connection 0
* TLSv1.2 (OUT), TLS alert, close notify (256):
The next part of the installation will require a Windows machine. From your Windows machine:
- Connect to your ASA's web interface (e.g.
https://10.9.49.201/admin/public/index.html
). - Click "Install ASDM Launcher"
- Enter creds
blank
:labpass1 (where blank is nothing and labpass1 is your enable password) - Install the downloaded
dm-launcher.msi
(before 7.18.1 it will be unsigned) - If Java isn't installed, intall Java 1.8 (current at time of writing is 8 Update 333): https://www.java.com/en/download/
- Start the ASDM Launcher via
C:\Program Files (x86)\Cisco Systems\ASDM\run.bat
- Enter your ASAv's IP address (10.9.249.201)
- Enter a blank username
- Enter the enable password (
labpass1
)
Now to enable the webvpn interface from ASDM:
- Go to
Configuration -> Remote Access VPN -> Clientless SSL VPN Access -> Connection Profiles
- In the
Access Interfaces
view, click the radio button toAllow Access
from theoutside
interface - Hit apply
Verify that the Clientless SSL VPN is now enabled by navigating to the SSL VPN login on your ASA. For example,
navigate to https://10.9.49.201/+CSCOE+/logon.html
.
Next, we'll create a Clientless SSL VPN user for brute-force testing. From ASDM:
- Go to
Configuration -> Device Management -> Users/AAA -> User Accounts
- Click
Add
- Keep the default username (
user1
) - Enter and confirm a password (e.g.
user1
) - Set the privilege level to 0 (I'm not sure this step is actually required but)
- Select the
No ASDM, SSH, Telnet, or Console access
radio - Hit
OK
- Hit
Apply
Finally, we'll enable logging into the SSL VPN portal:
- Go to
Configuration -> Device Management -> Users/AAA -> Dynamic Access Policies
- Select the
DfltAccessPolicy
and clickEdit
- Select
Access Method
tab - Click on the
Web-Portal
radio button
You should now be able to log in to the SSL VPN web portal using user1
:user1
.
Verification Steps
- Follow the above instructions to configure ASAv, Clientless SSL VPN, and add a user for testing
- Add the user to
data/wordlists/http_default_userpass.txt
asuser1 user1
- Do:
use auxiliary/scanner/http/cisco_asa_clientless_vpn
- Do:
set RHOST <ip>
- Do:
set VERBOSE false
- Do:
run
- You should see output indicating
user1:user1
was successfully used for login.
Options
GROUP
The connection profile to use. By default this is blank, but administrators can configure various different
profiles that users can select from the drop down menu at the top of the login page. The alias in the drop
down is not the value of GROUP
. You need to extract it from the HTML.
For example, my administrator has a profile named TunnelGroup1
using the alias alias1
. The drop down menu
will show alias1
but TunnelGroup1
is the required value. In the page's HTML you'll find:
<option value="TunnelGroup1" selected>alias1</option>
To use TunnelGroup1
you'd set GROUP TunnelGroup1
.
USERPASS_FILE
File containing users and passwords separated by space, one pair per line.
USER_FILE
File containing users, one per line.
PASS_FILE
File containing passwords, one per line
Scenarios
ASAv 9.18.1 with Clientless SSL VPN enabled and the user1:user1
creds set.
Simply using the default HTTP username and password lists and user1:user1
added to
data/wordlists/http_default_userpass.txt
.
msf6 auxiliary(scanner/http/cisco_asa_clientless_vpn) > use auxiliary/scanner/http/cisco_asa_clientless_vpn
msf6 auxiliary(scanner/http/cisco_asa_clientless_vpn) > set VERBOSE false
VERBOSE => false
msf6 auxiliary(scanner/http/cisco_asa_clientless_vpn) > set RHOST 10.9.49.201
RHOST => 10.9.49.201
msf6 auxiliary(scanner/http/cisco_asa_clientless_vpn) > run
[*] The remote target appears to host Cisco SSL VPN Service. The module will continue.
[*] Starting login brute force...
[+] SUCCESSFUL LOGIN - "user1":"user1"
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed
msf6 auxiliary(scanner/http/cisco_asa_clientless_vpn) >
ASAv 9.18.1 with Clientless SSL VPN enabled and the user1:user1
on the TunnelGroup1
Connection Profile
msf6 auxiliary(scanner/http/cisco_asa_clientless_vpn) > use auxiliary/scanner/http/cisco_asa_clientless_vpn
msf6 auxiliary(scanner/http/cisco_asa_clientless_vpn) > set VERBOSE false
VERBOSE => false
msf6 auxiliary(scanner/http/cisco_asa_clientless_vpn) > set RHOST 10.9.49.201
RHOST => 10.9.49.201
msf6 auxiliary(scanner/http/cisco_asa_clientless_vpn) > run
[*] The remote target appears to host Cisco SSL VPN Service. The module will continue.
[*] Starting login brute force...
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed
msf6 auxiliary(scanner/http/cisco_asa_clientless_vpn) > set GROUP TunnelGroup1
GROUP => TunnelGroup1
msf6 auxiliary(scanner/http/cisco_asa_clientless_vpn) > run
[*] The remote target appears to host Cisco SSL VPN Service. The module will continue.
[*] Starting login brute force...
[+] SUCCESSFUL LOGIN - "user1":"user1"
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed
msf6 auxiliary(scanner/http/cisco_asa_clientless_vpn) >
Go back to menu.
Msfconsole Usage
Here is how the scanner/http/cisco_asa_clientless_vpn auxiliary module looks in the msfconsole:
msf6 > use auxiliary/scanner/http/cisco_asa_clientless_vpn
msf6 auxiliary(scanner/http/cisco_asa_clientless_vpn) > show info
Name: Cisco ASA Clientless SSL VPN (WebVPN) Brute-force Login Utility
Module: auxiliary/scanner/http/cisco_asa_clientless_vpn
License: Metasploit Framework License (BSD)
Rank: Normal
Provided by:
Jonathan Claudius <[email protected]>
jbaines-r7
Module side effects:
ioc-in-logs
Module stability:
crash-safe
Check supported:
No
Basic options:
Name Current Setting Required Description
---- --------------- -------- -----------
BLANK_PASSWORDS false no Try blank passwords for all users
BRUTEFORCE_SPEED 5 yes How fast to bruteforce, from 0 to 5
DB_ALL_CREDS false no Try each user/password couple stored in the current database
DB_ALL_PASS false no Add all passwords in the current database to the list
DB_ALL_USERS false no Add all users in the current database to the list
DB_SKIP_EXISTING none no Skip existing credentials stored in the current database (Accepted: none,
user, user&realm)
GROUP yes The connection profile to log in to (blank by default)
PASSWORD no A specific password to authenticate with
PASS_FILE /opt/metasploit-framework/embedded/frame no File containing passwords, one per line
work/data/wordlists/http_default_pass.tx
t
Proxies no A proxy chain of format type:host:port[,type:host:port][...]
RHOSTS yes The target host(s), see https://github.com/rapid7/metasploit-framework/wi
ki/Using-Metasploit
RPORT 443 yes The target port (TCP)
SSL true no Negotiate SSL/TLS for outgoing connections
STOP_ON_SUCCESS false yes Stop guessing when a credential works for a host
THREADS 1 yes The number of concurrent threads (max one per host)
USERNAME no A specific username to authenticate as
USERPASS_FILE /opt/metasploit-framework/embedded/frame no File containing users and passwords separated by space, one pair per line
work/data/wordlists/http_default_userpas
s.txt
USER_AS_PASS false no Try the username as the password for all users
USER_FILE /opt/metasploit-framework/embedded/frame no File containing users, one per line
work/data/wordlists/http_default_users.t
xt
VERBOSE true yes Whether to print output for all attempts
VHOST no HTTP server virtual host
Description:
This module scans for Cisco ASA Clientless SSL VPN (WebVPN) web
login portals and performs login brute-force to identify valid
credentials.
References:
https://www.cisco.com/c/en/us/support/docs/security-vpn/webvpn-ssl-vpn/119417-config-asa-00.html
Module Options
This is a complete list of options available in the scanner/http/cisco_asa_clientless_vpn auxiliary module:
msf6 auxiliary(scanner/http/cisco_asa_clientless_vpn) > show options
Module options (auxiliary/scanner/http/cisco_asa_clientless_vpn):
Name Current Setting Required Description
---- --------------- -------- -----------
BLANK_PASSWORDS false no Try blank passwords for all users
BRUTEFORCE_SPEED 5 yes How fast to bruteforce, from 0 to 5
DB_ALL_CREDS false no Try each user/password couple stored in the current database
DB_ALL_PASS false no Add all passwords in the current database to the list
DB_ALL_USERS false no Add all users in the current database to the list
DB_SKIP_EXISTING none no Skip existing credentials stored in the current database (Accepted: none
, user, user&realm)
GROUP yes The connection profile to log in to (blank by default)
PASSWORD no A specific password to authenticate with
PASS_FILE /opt/metasploit-framework/embedded/frame no File containing passwords, one per line
work/data/wordlists/http_default_pass.tx
t
Proxies no A proxy chain of format type:host:port[,type:host:port][...]
RHOSTS yes The target host(s), see https://github.com/rapid7/metasploit-framework/w
iki/Using-Metasploit
RPORT 443 yes The target port (TCP)
SSL true no Negotiate SSL/TLS for outgoing connections
STOP_ON_SUCCESS false yes Stop guessing when a credential works for a host
THREADS 1 yes The number of concurrent threads (max one per host)
USERNAME no A specific username to authenticate as
USERPASS_FILE /opt/metasploit-framework/embedded/frame no File containing users and passwords separated by space, one pair per lin
work/data/wordlists/http_default_userpas e
s.txt
USER_AS_PASS false no Try the username as the password for all users
USER_FILE /opt/metasploit-framework/embedded/frame no File containing users, one per line
work/data/wordlists/http_default_users.t
xt
VERBOSE true yes Whether to print output for all attempts
VHOST no HTTP server virtual host
Advanced Options
Here is a complete list of advanced options supported by the scanner/http/cisco_asa_clientless_vpn auxiliary module:
msf6 auxiliary(scanner/http/cisco_asa_clientless_vpn) > show advanced
Module advanced options (auxiliary/scanner/http/cisco_asa_clientless_vpn):
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 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
MaxGuessesPerService 0 no Maximum number of credentials to try per service instance. If set to
zero or a non-number, this option will not be used.
MaxGuessesPerUser 0 no Maximum guesses for a particular username for the service instance.
Note that users are considered unique among different services, so a
user at 10.1.1.1:22 is different from one at 10.2.2.2:22, and both
will be tried up to the MaxGuessesPerUser limit. If set to zero or a
non-number, this option will not be used.
MaxMinutesPerService 0 no Maximum time in minutes to bruteforce the service instance. If set t
o zero or a non-number, this option will not be used.
PASSWORD_SPRAY false yes Reverse the credential pairing order. For each password, attempt eve
ry possible user.
REMOVE_PASS_FILE false yes Automatically delete the PASS_FILE on module completion
REMOVE_USERPASS_FILE false yes Automatically delete the USERPASS_FILE on module completion
REMOVE_USER_FILE false yes Automatically delete the USER_FILE on module completion
SSLServerNameIndication no SSL/TLS Server Name Indication (SNI)
SSLVersion Auto yes Specify the version of SSL/TLS to be used (Auto, TLS and SSL23 are a
uto-negotiate) (Accepted: Auto, TLS, SSL23, SSL3, TLS1, TLS1.1, TLS1
.2)
ShowProgress true yes Display progress messages during a scan
ShowProgressPercent 10 yes The interval in percent that progress should be shown
TRANSITION_DELAY 0 no Amount of time (in minutes) to delay before transitioning to the nex
t user in the array (or password when PASSWORD_SPRAY=true)
UserAgent Mozilla/5.0 (Macintosh; Intel Mac OS no The User-Agent header to use for all requests
X 12.2; rv:97.0) Gecko/20100101 Firef
ox/97.0
WORKSPACE no Specify the workspace for this module
Auxiliary Actions
This is a list of all auxiliary actions that the scanner/http/cisco_asa_clientless_vpn module can do:
msf6 auxiliary(scanner/http/cisco_asa_clientless_vpn) > show actions
Auxiliary actions:
Name Description
---- -----------
Evasion Options
Here is the full list of possible evasion options supported by the scanner/http/cisco_asa_clientless_vpn auxiliary module in order to evade defenses (e.g. Antivirus, EDR, Firewall, NIDS etc.):
msf6 auxiliary(scanner/http/cisco_asa_clientless_vpn) > 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, apac
he)
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, apa
che)
HTTP::shuffle_get_params false no Randomize order of GET parameters
HTTP::shuffle_post_params false no Randomize order of POST parameters
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.
Cisco SSL VPN Service not detected on the remote target
Here is a relevant code snippet related to the "Cisco SSL VPN Service not detected on the remote target" error message:
68:
69: each_user_pass do |user, pass|
70: do_login(user, pass)
71: end
72: else
73: print_status('Cisco SSL VPN Service not detected on the remote target')
74: end
75: end
76:
77: def report_cred(opts)
78: service_data = {
Failed to grab the CSRF token
Here is a relevant code snippet related to the "Failed to grab the CSRF token" error message:
125: csrf_token = res.body[/<input name="csrf_token" type=hidden value="(?<token>[0-9a-f]+)">/, :token]
126: if csrf_token
127: vars_hash['csrf_token'] = csrf_token
128: cookie = "#{cookie}; CSRFtoken=#{csrf_token};"
129: else
130: print_error('Failed to grab the CSRF token')
131: return
132: end
133: end
134:
135: # only add the group if the user specifies a non-empty value
FAILED LOGIN - <USER.INSPECT>:<PASS.INSPECT>
Here is a relevant code snippet related to the "FAILED LOGIN - <USER.INSPECT>:<PASS.INSPECT>" error message:
167: end
168: else
169: send_request_cgi('uri' => normalize_uri('/+webvpn+/webvpn_logout.html'), 'cookie' => res.get_cookies)
170: end
171:
172: return :next_user
173: else
174: vprint_error("FAILED LOGIN - #{user.inspect}:#{pass.inspect}")
175: end
176: end
177: end
Go back to menu.
Related Pull Requests
References
- CVE: Not available
- https://www.cisco.com/c/en/us/support/docs/security-vpn/webvpn-ssl-vpn/119417-config-asa-00.html
See Also
Check also the following modules related to this module:
- auxiliary/scanner/http/cisco_asa_asdm
- auxiliary/scanner/http/cisco_asa_asdm_bruteforce
- auxiliary/scanner/http/cisco_device_manager
- auxiliary/scanner/http/cisco_directory_traversal
- auxiliary/scanner/http/cisco_firepower_download
- auxiliary/scanner/http/cisco_firepower_login
- auxiliary/scanner/http/cisco_ios_auth_bypass
- auxiliary/scanner/http/cisco_ironport_enum
- auxiliary/scanner/http/cisco_nac_manager_traversal
- auxiliary/scanner/http/cisco_ssl_vpn
- auxiliary/scanner/http/cisco_ssl_vpn_priv_esc
- auxiliary/scanner/ike/cisco_ike_benigncertain
- auxiliary/scanner/misc/cisco_smart_install
- auxiliary/scanner/snmp/cisco_config_tftp
- auxiliary/scanner/snmp/cisco_upload_file
- auxiliary/admin/http/cisco_7937g_ssh_privesc
- auxiliary/admin/networking/cisco_asa_extrabacon
- auxiliary/admin/networking/cisco_config
- auxiliary/admin/networking/cisco_dcnm_auth_bypass
- auxiliary/admin/networking/cisco_dcnm_download
- auxiliary/admin/networking/cisco_secure_acs_bypass
- auxiliary/admin/networking/cisco_vpn_3000_ftp_bypass
- auxiliary/dos/cisco/cisco_7937g_dos
- auxiliary/dos/cisco/cisco_7937g_dos_reboot
- auxiliary/gather/cisco_pvc2300_download_config
- auxiliary/gather/cisco_rv320_config
- auxiliary/voip/cisco_cucdm_call_forward
- auxiliary/voip/cisco_cucdm_speed_dials
- auxiliary/dos/cisco/ios_http_percentpercent
- auxiliary/dos/cisco/ios_telnet_rocem
- auxiliary/spoof/cisco/cdp
- auxiliary/spoof/cisco/dtp
- auxiliary/scanner/http/fortinet_ssl_vpn
- exploit/multi/vpn/tincd_bof
- exploit/windows/vpn/safenet_ike_11
Authors
- Jonathan Claudius <jclaudius[at]trustwave.com>
- jbaines-r7
Version
This page has been produced using Metasploit Framework version 6.2.23-dev. For more modules, visit the Metasploit Module Library.
Go back to menu.