Path: blob/master/documentation/modules/auxiliary/scanner/rservices/rsh_login.md
27967 views
Vulnerable Application
The R Services (rexecd, rlogind, and rshd) are a suite of unencrypted remote command/login services developed in the 1980s. These services are all but unused in modern computing, as they have been replace by telnet and ssh.
rsh relies on host names as a security mechanism. Utilizing + can wildcard so any computer can connect. In the following config, we'll utilize that wildcarded setting to simplify our exploitation. This is a glaring security issue!!! However, there are exceptions to this in proprietary Unix systems which may include other mechanisms such as Kerberos (AIX)
If you encounter Host address mismatch for ..., you may need to adjust your /etc/hosts file accordingly.
The following was done on Kali linux:
apt-get install rsh-serverwhich includes:rexecd,rlogindandrshd.echo "+" > ~/.rhostsStart the service:
service openbsd-inetd start
Verification Steps
Install and configure rexec
Start msfconsole
Do:
use auxiliary/scanner/rservices/rsh_loginDo:
set rhostsSet any other credentials that will need to be set
Do:
run
Scenarios
A run against the configuration from these docs
Confirming
At the time of writing this, there was no nmap script equivalent. Most modern systems have also replaced rsh with ssh.