repositories

daemon-sec-cheatsheet

The cheatsheet vault for operators: AD, enumeration, exploitation, priv-esc, web, DFIR

clonegit clone https://git.daemon-sec.xyz/daemon-sec-cheatsheet.git
pentesting-rsh.mdMarkdown36 lines1.4 KiBsource raw download

title: "514 - Pentesting Rsh" section: "Network Services" sectionSlug: "network-services-pentesting" sourcePath: "src/network-services-pentesting/pentesting-rsh.md" sourceUrl: "https://github.com/HackTricks-wiki/hacktricks/blob/188de82beb54e70956b2952367a0af91d26758b8/src/network-services-pentesting/pentesting-rsh.md" sha: "188de82beb54e70956b2952367a0af91d26758b8" isIndex: false modified: true license: "CC-BY-NC-4.0"#

514 - Pentesting Rsh#

Basic Information#

The remote shell service (rsh) historically used /etc/hosts.equiv and per-user .rhosts files to trust remote hosts and users. This host-based model depends on IP-address and Domain Name System (DNS) assumptions and is vulnerable to address or name-resolution spoofing, especially on a local network.[1]

Because .rhosts resides in a user's home directory, an attacker who can modify that file—for example, through an exposed NFS home directory—may be able to add a trusted host or user.[1]

Default port: 514/TCP

Login#

rsh <IP> <Command>
rsh <IP> -l domain\user <Command>
rsh domain/user@<IP> <Command>
rsh domain\\user@<IP> <Command>

Brute Force#

References#