2024-03-09 14:23:42 +00:00
id : smb-enum-domains
info :
name : SMB - Enum Domains
author : DhiyaneshDK
severity : info
description : |
2024-03-23 09:28:19 +00:00
SMB enumeration of domains is often part of the reconnaissance phase, where security professionals or attackers attempt to gather information about the target network to identify potential vulnerabilities.
2024-03-09 14:23:42 +00:00
reference :
- https://nmap.org/nsedoc/scripts/smb-enum-domains.html
metadata :
verified : true
max-request : 1
shodan-query : port:445
2024-06-07 10:04:29 +00:00
product : dionaea
vendor : dionaea
2024-03-09 14:23:42 +00:00
tags : js,network,smb,enum
2024-07-10 12:08:01 +00:00
2024-03-09 14:23:42 +00:00
javascript :
2024-07-10 12:08:01 +00:00
- pre-condition : |
isPortOpen(Host,Port);
code : |
2024-03-09 14:23:42 +00:00
var m = require("nuclei/smb");
2024-03-15 06:18:12 +00:00
var c = new m.SMBClient();
2024-03-09 14:23:42 +00:00
var response = c.ListSMBv2Metadata(Host, Port);
2024-03-09 18:32:19 +00:00
Export(response);
2024-03-09 14:23:42 +00:00
args :
Host : "{{Host}}"
Port : "445"
matchers :
- type : dsl
dsl :
- "len(DNSDomainName) != 0"
extractors :
- type : json
internal : true
name : DNSDomainName
json :
- '.DNSDomainName'
- type : json
json :
- '"DomainName: "+ .DNSDomainName '
2024-07-10 12:45:27 +00:00
# digest: 4b0a00483046022100fe17d4640cbdd92068ad03e6b784cc95928887776173f7cdc8fc3dc8736fe948022100e4151a5f3022a37819797845e756e78744616ea564461dc2f37f688d53b2e4dc:922c64590222798bb761d5b6d8e72950