Lucene search

K
nmapPatrik KarlssonNMAP:RSYNC-LIST-MODULES.NSE
HistoryFeb 05, 2012 - 10:10 a.m.

rsync-list-modules NSE Script

2012-02-0510:10:59
Patrik Karlsson
nmap.org
85

9.8 High

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

HIGH

Integrity Impact

HIGH

Availability Impact

HIGH

CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

10 High

CVSS2

Access Vector

NETWORK

Access Complexity

LOW

Authentication

NONE

Confidentiality Impact

COMPLETE

Integrity Impact

COMPLETE

Availability Impact

COMPLETE

AV:N/AC:L/Au:N/C:C/I:C/A:C

0.973 High

EPSS

Percentile

99.8%

Lists modules available for rsync (remote file sync) synchronization.

Example Usage

nmap -p 873 --script rsync-list-modules <ip>

Script Output

PORT    STATE SERVICE
873/tcp open  rsync
| rsync-list-modules:
|   www            	www directory
|   log            	log directory
|_  etc            	etc directory

Requires


local rsync = require "rsync"
local shortport = require "shortport"
local stdnse = require "stdnse"

description = [[
Lists modules available for rsync (remote file sync) synchronization.
]]

---
-- @usage
-- nmap -p 873 --script rsync-list-modules <ip>
--
-- @output
-- PORT    STATE SERVICE
-- 873/tcp open  rsync
-- | rsync-list-modules:
-- |   www            	www directory
-- |   log            	log directory
-- |_  etc            	etc directory
--


author = "Patrik Karlsson"
license = "Same as Nmap--See https://nmap.org/book/man-legal.html"
categories = {"discovery", "safe"}

portrule = shortport.port_or_service(873, "rsync", "tcp")

local function fail (err) return stdnse.format_output(false, err) end

action = function(host, port)
  local helper = rsync.Helper:new(host, port, { module = "" })
  if ( not(helper) ) then
    return fail("Failed to create rsync.Helper")
  end

  local status, err = helper:connect()
  if ( not(status) ) then
    return fail("Failed to connect to rsync server")
  end

  local modules = {}
  status, modules = helper:listModules()
  if ( not(status) ) then
    return fail("Failed to retrieve a list of modules")
  end
  return stdnse.format_output(true, modules)
end

9.8 High

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

HIGH

Integrity Impact

HIGH

Availability Impact

HIGH

CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

10 High

CVSS2

Access Vector

NETWORK

Access Complexity

LOW

Authentication

NONE

Confidentiality Impact

COMPLETE

Integrity Impact

COMPLETE

Availability Impact

COMPLETE

AV:N/AC:L/Au:N/C:C/I:C/A:C

0.973 High

EPSS

Percentile

99.8%

Related for NMAP:RSYNC-LIST-MODULES.NSE