Skip to content

Instantly share code, notes, and snippets.

@t94j0
Created September 28, 2022 19:24
Show Gist options
  • Save t94j0/ca13a0f412a83d2f884b7d8977e547c0 to your computer and use it in GitHub Desktop.
Save t94j0/ca13a0f412a83d2f884b7d8977e547c0 to your computer and use it in GitHub Desktop.
Nmap NSE port of webclientenum
local smb = require "smb"
local stdnse = require "stdnse"
local string = require "string"
description = [[
Port of @zyn3rgy's webclientenum
]]
-- nmap --script=smb-webclientenum.nse --script-args=smbuser=<username>,smbpass=<password>,smbbasic=1,smbsign=force <host>
author = "Max Harley"
copyright = "Max Harley"
license = "Same as Nmap--See https://nmap.org/book/man-legal.html"
categories = {"discovery","intrusive"}
dependencies = {}
hostrule = function(host)
return smb.get_port(host) ~= nil
end
action = function(host)
local status, err
status, err = smb.file_read(host, 'IPC$', 'DAV RPC Service')
if err then
stdnse.debug(1, "webclientenum: %s", err)
end
if status then
stdnse.debug(1, '%s: WebDAV RPC Service found', host.ip)
else
stdnse.debug(1, '%s: WebDAV RPC Service not found', host.ip)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment