2024-04-02 07:34:44 +00:00
|
|
|
id: rsync-list-modules
|
|
|
|
|
|
|
|
info:
|
2024-06-04 18:45:52 +00:00
|
|
|
name: Rsync List Modules - Enumeration
|
2024-04-02 07:34:44 +00:00
|
|
|
author: pussycat0x
|
|
|
|
severity: low
|
|
|
|
description: |
|
|
|
|
Lists modules available for rsync (remote file sync) synchronization.
|
|
|
|
reference:
|
|
|
|
- https://nmap.org/nsedoc/scripts/rsync-list-modules.html
|
|
|
|
metadata:
|
|
|
|
verified: true
|
|
|
|
max-request: 1
|
2024-06-07 10:04:29 +00:00
|
|
|
shodan-query: port:873
|
|
|
|
tags: network,rsync,enum,js
|
2024-07-10 12:08:01 +00:00
|
|
|
|
2024-04-02 07:34:44 +00:00
|
|
|
javascript:
|
2024-07-10 12:08:01 +00:00
|
|
|
- pre-condition: |
|
|
|
|
isPortOpen(Host,Port);
|
|
|
|
code: |
|
2024-04-02 07:34:44 +00:00
|
|
|
const c = require("nuclei/net");
|
2024-06-04 18:45:52 +00:00
|
|
|
const data = "@RSYNCD: 31.0\n\n"
|
|
|
|
const conn = c.Open('tcp', `${Host}:${Port}`);
|
|
|
|
conn.Send(data);
|
|
|
|
response = conn.RecvFullString(1024)
|
|
|
|
const rsyncRegex = /@RSYNCD: EXIT|@RSYNCD: 31.0|@RSYNCD:|@RSYNCD: 30.0/g;
|
|
|
|
const resultString = response.replace(rsyncRegex, "");
|
|
|
|
const whitespaceRegex = /[\s\t\n]+/g;
|
|
|
|
const finalResult = resultString.replace(whitespaceRegex, " ");
|
|
|
|
if (finalResult.trim() === "") {
|
|
|
|
exit();
|
|
|
|
}
|
|
|
|
else{
|
|
|
|
finalResult
|
|
|
|
}
|
2024-04-02 07:34:44 +00:00
|
|
|
|
|
|
|
args:
|
|
|
|
Host: "{{Host}}"
|
|
|
|
Port: 873
|
|
|
|
|
2024-06-05 08:16:50 +00:00
|
|
|
matchers:
|
|
|
|
- type: word
|
|
|
|
negative: true
|
|
|
|
words:
|
|
|
|
- "HTTP/1.1"
|
|
|
|
|
2024-04-02 07:34:44 +00:00
|
|
|
extractors:
|
2024-06-04 18:45:52 +00:00
|
|
|
- type: dsl
|
|
|
|
dsl:
|
|
|
|
- response
|
2024-07-10 12:45:27 +00:00
|
|
|
# digest: 490a0046304402206090a0958315649123a7e861812a59815fbce401dd5f14f8f3cd13aec5dd85bb02201db117ee4dc61f18d8713461a3d2a17e12aaa73ca32863e5d7c076cc0e448936:922c64590222798bb761d5b6d8e72950
|