Step 1: Reconnaissance: The attacker identifies systems running the rexd service, typically by port scanning (port 512, 513, 514).
Step 2: Trust Relationship Assessment: The attacker determines if the target system trusts the attacker's system or if the attacker can spoof a trusted IP address. This may involve examining .rhosts or /etc/hosts.equiv files.
Step 3: Authentication Bypass: The attacker exploits the weak authentication by either spoofing their IP address to match a trusted host or by leveraging compromised credentials if available.
Step 4: Command Injection: The attacker crafts a command to be executed on the target system. This command is sent to the rexd service.
Step 5: Command Execution: The rexd service, trusting the source, executes the attacker's command with the privileges of the user running rexd (often root).
Step 6: Post-Exploitation: The attacker can then perform actions such as installing backdoors, exfiltrating data, or further compromising the system.