Rsh - Port 514
Last updated
Was this helpful?
Last updated
Was this helpful?
Become VeryLazyTech ! π
Follow us on:
β Twitter .
πΎ Github .
π Medium .
πΊ YouTube .
π© Telegram .
π΅οΈββοΈ My Site .
Visit our for e-books and courses. π
For authentication, .rhosts files along with /etc/hosts.equiv were utilized by Rsh. Authentication was dependent on IP addresses and the Domain Name System (DNS). The ease of spoofing IP addresses, notably on the local network, was a significant vulnerability.
Moreover, it was common for the .rhosts files to be placed within the home directories of users, which were often located on Network File System (NFS) volumes.
Default port: 514
Check for weak authentication mechanisms. RSH often relies on the .rhosts
file for authentication, which can be easily exploited if not properly configured.
You can perform brute-force attacks to guess weak passwords using tools like hydra
:
This command attempts to brute-force the specified RSH server.
Look for misconfigured .rhosts
files that allow unauthorized access. For example, a .rhosts
file with the following entry can be exploited:
This entry allows any user from any host to log in without a password.
After gaining access, attempt to escalate privileges to a higher-level account. One common method is to search for SUID binaries:
This command lists all SUID binaries, which could potentially be exploited for privilege escalation.
Once you have access, you can exfiltrate data from the remote machine. For example, you can copy files using the rcp
(remote copy) command:
To maintain persistent access, you can add your SSH key to the ~/.ssh/authorized_keys
file or modify the .rhosts
file to allow your host:
This entry grants login permissions to the specified user on the attacker's IP address.
It's crucial to cover your tracks to avoid detection. You can delete log entries related to your activities:
These commands clear the authentication log and command history.
Learn & practice
Become VeryLazyTech ! π
β Twitter .
πΎ Github .
π Medium .
πΊ YouTube .
π© Telegram .
π΅οΈββοΈ My Site .
Visit our for e-books and courses. π