PORT STATE SERVICE REASON
873/tcp open rsync syn-ack
Enumeration
Banner & Manual communication
nc-vn127.0.0.1873(UNKNOWN)[127.0.0.1]873 (rsync) open@RSYNCD:31.0<---Youreceivethisbannerwiththeversionfromtheserver@RSYNCD:31.0<---Thenyousendthesameinfo#list <--- Then you ask the sever to listraidroot<---TheserverstartsenumeratingUSBCopyNAS_Public_NAS_Recycle_TOSRAID<---Enumerationfinished@RSYNCD:EXIT<---Severclosestheconnection#Now lets try to enumerate "raidroot"nc-vn127.0.0.1873(UNKNOWN)[127.0.0.1]873 (rsync) open@RSYNCD:31.0@RSYNCD:31.0raidroot@RSYNCD:AUTHREQD7H6CqsHCPG06kRiFkKwD8g<---Thismeansyouneedthepassword
Enumerating Shared Folders
Rsync modules are recognized as directory shares that might be protected with passwords. To identify available modules and check if they require passwords, the following commands are used:
Be aware that some shares might not appear in the list, possibly hiding them. Additionally, accessing some shares might be restricted to specific credentials, indicated by an "Access Denied" message.
Upon obtaining a module list, actions depend on whether authentication is needed. Without authentication, listing and copying files from a shared folder to a local directory is achieved through:
This process recursively transfers files, preserving their attributes and permissions.
With credentials, listing and downloading from a shared folder can be done as follows, where a password prompt will appear:
To upload content, such as an authorized_keys file for access, use:
POST
To locate the rsyncd configuration file, execute:
Within this file, a secrets file parameter might point to a file containing usernames and passwords for rsyncd authentication.
nmap -sV --script "rsync-list-modules" -p <PORT> <IP>
msf> use auxiliary/scanner/rsync/modules_list
# Example with IPv6 and alternate port
rsync -av --list-only rsync://[dead:beef::250:56ff:feb9:e90a]:8730
# Listing a shared folder
rsync -av --list-only rsync://192.168.0.123/shared_name
# Copying files from a shared folder
rsync -av rsync://192.168.0.123:8730/shared_name ./rsyn_shared