Cerberus FTP Server SFTP Username Enumeration - Metasploit
This page contains detailed information about how to use the auxiliary/scanner/ssh/cerberus_sftp_enumusers metasploit module. For list of all metasploit modules, visit the Metasploit Module Library.
Module Overview
Name: Cerberus FTP Server SFTP Username Enumeration
Module: auxiliary/scanner/ssh/cerberus_sftp_enumusers
Source code: modules/auxiliary/scanner/ssh/cerberus_sftp_enumusers.rb
Disclosure date: 2014-05-27
Last modification time: 2020-10-02 17:38:06 +0000
Supported architecture(s): -
Supported platform(s): -
Target service / protocol: -
Target network port(s): 22
List of CVEs: -
This module uses a dictionary to brute force valid usernames from Cerberus FTP server via SFTP. This issue affects all versions of the software older than 6.0.9.0 or 7.0.0.2 and is caused by a discrepancy in the way the SSH service handles failed logins for valid and invalid users. This issue was discovered by Steve Embling.
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/ssh/cerberus_sftp_enumusers
msf auxiliary(cerberus_sftp_enumusers) > show options
... show and set options ...
msf auxiliary(cerberus_sftp_enumusers) > set RHOSTS ip-range
msf auxiliary(cerberus_sftp_enumusers) > exploit
Other examples of setting the RHOSTS option:
Example 1:
msf auxiliary(cerberus_sftp_enumusers) > set RHOSTS 192.168.1.3-192.168.1.200
Example 2:
msf auxiliary(cerberus_sftp_enumusers) > set RHOSTS 192.168.1.1/24
Example 3:
msf auxiliary(cerberus_sftp_enumusers) > set RHOSTS file:/tmp/ip_list.txt
Required Options
RHOSTS: The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
USER_FILE: Files containing usernames, one per line
Go back to menu.
Msfconsole Usage
Here is how the scanner/ssh/cerberus_sftp_enumusers auxiliary module looks in the msfconsole:
msf6 > use auxiliary/scanner/ssh/cerberus_sftp_enumusers
msf6 auxiliary(scanner/ssh/cerberus_sftp_enumusers) > show info
Name: Cerberus FTP Server SFTP Username Enumeration
Module: auxiliary/scanner/ssh/cerberus_sftp_enumusers
License: Metasploit Framework License (BSD)
Rank: Normal
Disclosed: 2014-05-27
Provided by:
Steve Embling
Matt Byrne <[email protected]>
Check supported:
No
Basic options:
Name Current Setting Required Description
---- --------------- -------- -----------
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 22 yes The target port
THREADS 1 yes The number of concurrent threads (max one per host)
USER_FILE yes Files containing usernames, one per line
Description:
This module uses a dictionary to brute force valid usernames from
Cerberus FTP server via SFTP. This issue affects all versions of the
software older than 6.0.9.0 or 7.0.0.2 and is caused by a
discrepancy in the way the SSH service handles failed logins for
valid and invalid users. This issue was discovered by Steve Embling.
References:
http://xforce.iss.net/xforce/xfdb/93546
http://www.securityfocus.com/bid/67707
Module Options
This is a complete list of options available in the scanner/ssh/cerberus_sftp_enumusers auxiliary module:
msf6 auxiliary(scanner/ssh/cerberus_sftp_enumusers) > show options
Module options (auxiliary/scanner/ssh/cerberus_sftp_enumusers):
Name Current Setting Required Description
---- --------------- -------- -----------
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 22 yes The target port
THREADS 1 yes The number of concurrent threads (max one per host)
USER_FILE yes Files containing usernames, one per line
Advanced Options
Here is a complete list of advanced options supported by the scanner/ssh/cerberus_sftp_enumusers auxiliary module:
msf6 auxiliary(scanner/ssh/cerberus_sftp_enumusers) > show advanced
Module advanced options (auxiliary/scanner/ssh/cerberus_sftp_enumusers):
Name Current Setting Required Description
---- --------------- -------- -----------
RETRY_NUM 3 yes The number of attempts to connect to a SSH server for each user
SSH_DEBUG false yes Enable SSH debugging output (Extreme verbosity!)
SSH_TIMEOUT 10 yes Specify the maximum time to negotiate a SSH session
ShowProgress true yes Display progress messages during a scan
ShowProgressPercent 10 yes The interval in percent that progress should be shown
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/ssh/cerberus_sftp_enumusers module can do:
msf6 auxiliary(scanner/ssh/cerberus_sftp_enumusers) > show actions
Auxiliary actions:
Name Description
---- -----------
Evasion Options
Here is the full list of possible evasion options supported by the scanner/ssh/cerberus_sftp_enumusers auxiliary module in order to evade defenses (e.g. Antivirus, EDR, Firewall, NIDS etc.):
msf6 auxiliary(scanner/ssh/cerberus_sftp_enumusers) > show evasion
Module evasion options:
Name Current Setting Required Description
---- --------------- -------- -----------
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.
Cannot read file <USER_FILE>
Here is a relevant code snippet related to the "Cannot read file <USER_FILE>" error message:
169: if File.readable? datastore['USER_FILE']
170: users = File.new(datastore['USER_FILE']).read.split
171: users.each {|u| u.downcase!}
172: users.uniq!
173: else
174: raise ArgumentError, "Cannot read file #{datastore['USER_FILE']}"
175: end
176:
177: users
178: end
179:
<PEER-IP> Retrying '<USER>' due to connection error
Here is a relevant code snippet related to the "<PEER-IP> Retrying '<USER>' due to connection error" error message:
182: ret = nil
183:
184: while (attempt_num <= retry_num) && (ret.nil? || ret == :connection_error)
185: if attempt_num > 0
186: Rex.sleep(2 ** attempt_num)
187: vprint_status("#{peer(ip)} Retrying '#{user}' due to connection error")
188: end
189:
190: ret = check_user(ip, user, rport)
191: attempt_num += 1
192: end
<PEER-IP> User '<USER>' could not connect
Here is a relevant code snippet related to the "<PEER-IP> User '<USER>' could not connect" error message:
198: case attempt_result
199: when :success
200: print_good "#{peer(ip)} User '#{user}' found"
201: do_report(ip, user, rport)
202: when :connection_error
203: print_error "#{peer(ip)} User '#{user}' could not connect"
204: when :fail
205: vprint_status "#{peer(ip)} User '#{user}' not found"
206: end
207: end
208:
<PEER-IP> User '<USER>' not found
Here is a relevant code snippet related to the "<PEER-IP> User '<USER>' not found" error message:
200: print_good "#{peer(ip)} User '#{user}' found"
201: do_report(ip, user, rport)
202: when :connection_error
203: print_error "#{peer(ip)} User '#{user}' could not connect"
204: when :fail
205: vprint_status "#{peer(ip)} User '#{user}' not found"
206: end
207: end
208:
209: def run_host(ip)
210: print_status "#{peer(ip)} Checking for vulnerability"
<PEER-IP> Not vulnerable
Here is a relevant code snippet related to the "<PEER-IP> Not vulnerable" error message:
214: print_status "#{peer(ip)} Starting scan"
215: user_list.each do |user|
216: show_result(attempt_user(user, ip), user, ip)
217: end
218: when :safe
219: print_error "#{peer(ip)} Not vulnerable"
220: when :connection_error
221: print_error "#{peer(ip)} Connection failed"
222: end
223: end
224: end
<PEER-IP> Connection failed
Here is a relevant code snippet related to the "<PEER-IP> Connection failed" error message:
215: user_list.each do |user|
216: show_result(attempt_user(user, ip), user, ip)
217: end
218: when :safe
219: print_error "#{peer(ip)} Not vulnerable"
220: when :connection_error
221: print_error "#{peer(ip)} Connection failed"
222: end
223: end
224: end
225:
Go back to menu.
Related Pull Requests
- #14213 Merged Pull Request: Add disclosure date rubocop linting rule - enforce iso8601 disclosure dates
- #10456 Merged Pull Request: Remove SSH scanner using known_hosts
- #9442 Merged Pull Request: Remove NoMethod Rescue for cerberus_sftp_enumusers
- #9436 Merged Pull Request: unconfirmed fix - cerberus_sftp_enumusers - Auxiliary failed: NoMethodError undefined method `start' for nil:NilClas
- #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
- #7339 Merged Pull Request: Bug/7321/fix ssh modules
- #6655 Merged Pull Request: use MetasploitModule as a class name
- #6648 Merged Pull Request: Change metasploit class names
- #5768 Merged Pull Request: Update modules to use metasploit-credential instead of report_auth_info
- #5218 Merged Pull Request: Fix #3816 by deleting print_debug
References
See Also
Check also the following modules related to this module:
- auxiliary/dos/http/hashcollision_dos
- auxiliary/gather/ldap_hashdump
- auxiliary/gather/qnap_backtrace_admin_hash
- auxiliary/gather/wp_w3_total_cache_hash_extract
- auxiliary/scanner/http/epmp1000_dump_hashes
- auxiliary/scanner/ipmi/ipmi_dumphashes
- auxiliary/scanner/lotus/lotus_domino_hashes
- auxiliary/scanner/mssql/mssql_hashdump
- auxiliary/scanner/mysql/mysql_authbypass_hashdump
- auxiliary/scanner/mysql/mysql_hashdump
- auxiliary/scanner/oracle/oracle_hashdump
- auxiliary/scanner/postgres/postgres_hashdump
- auxiliary/scanner/snmp/brocade_enumhash
- post/aix/hashdump
- post/android/gather/hashdump
- post/bsd/gather/hashdump
- post/linux/gather/hashdump
- post/multi/gather/unix_cached_ad_hashes
- post/osx/gather/hashdump
- post/solaris/gather/hashdump
- post/windows/gather/credentials/domain_hashdump
- post/windows/gather/credentials/mcafee_vse_hashdump
- post/windows/gather/credentials/mssql_local_hashdump
- post/windows/gather/hashdump
- post/windows/gather/smart_hashdump
- post/windows/manage/hashcarve
- auxiliary/gather/cerberus_helpdesk_hash_disclosure
- auxiliary/gather/kerberos_enumusers
- auxiliary/scanner/smb/smb_enumusers
- auxiliary/scanner/snmp/snmp_enumusers
- auxiliary/scanner/snmp/xerox_workcentre_enumusers
- auxiliary/scanner/ssh/ssh_enumusers
- auxiliary/scanner/smb/smb_enumusers_domain
Authors
- Steve Embling
- Matt Byrne <attackdebris[at]gmail.com>
Version
This page has been produced using Metasploit Framework version 6.1.27-dev. For more modules, visit the Metasploit Module Library.
Go back to menu.