Created
September 28, 2022 19:24
-
-
Save t94j0/ca13a0f412a83d2f884b7d8977e547c0 to your computer and use it in GitHub Desktop.
Nmap NSE port of webclientenum
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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