Skip to content

Commit

Permalink
Merge pull request #8692 from projectdiscovery/smb-fp-fix
Browse files Browse the repository at this point in the history
FP SMB Enum - Fix
  • Loading branch information
DhiyaneshGeek committed Nov 24, 2023
2 parents 4c59984 + ec861d2 commit 0a1df05
Showing 1 changed file with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion javascript/enumeration/smb-enum.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,40 +14,70 @@ info:
max-request: 1
shodan-query: port:445
tags: js,network,smb,enum

javascript:
- code: |
var m = require("nuclei/smb");
var c = m.SMBClient();
var response = c.ListSMBv2Metadata(Host, Port);
to_json(response);
args:
Host: "{{Host}}"
Port: "445"
matchers:
- type: dsl
dsl:
- "len(OSVersion) != 0"
- "len(NetBIOSComputerName) != 0"
- "len(NetBIOSDomainName) != 0"
- "len(DNSComputerName) != 0"
- "len(DNSDomainName) != 0"
- "len(ForestName) != 0"
extractors:
- type: json
internal: true
name: OSVersion
json:
- '.OSVersion'
- type: json
internal: true
name: NetBIOSComputerName
json:
- '.NetBIOSComputerName'
- type: json
internal: true
name: NetBIOSDomainName
json:
- '.NetBIOSDomainName'
- type: json
internal: true
name: DNSComputerName
json:
- '.DNSComputerName'
- type: json
internal: true
name: DNSDomainName
json:
- '.DNSDomainName'
# digest: 4b0a00483046022100f884f64e0257e25d04cd62da63b3d23b1bc4f096df31d976bdd0bf98d682df47022100d2cf6934188a7aa72088083259f345c65278b63ca49451b4bdbc98b43f920625:922c64590222798bb761d5b6d8e72950
- type: json
internal: true
name: ForestName
json:
- '.ForestName'
- type: json
json:
- '"OSVersion: "+ .OSVersion '
- '"NetBIOSComputerName: "+ .NetBIOSComputerName '
- '"NetBIOSDomainName: "+ .NetBIOSDomainName '
- '"DNSComputerNamen: "+ .DNSComputerName '
- '"DNSComputerName: "+ .DNSComputerName '
- '"ForestName: "+ .ForestName'

0 comments on commit 0a1df05

Please sign in to comment.