40 lines
1.0 KiB
YAML
40 lines
1.0 KiB
YAML
id: smb-anonymous-access
|
|
|
|
info:
|
|
name: SMB Anonymous Access Detection
|
|
author: pussycat0x
|
|
severity: high
|
|
description: |
|
|
Detects anonymous access to SMB shares on a remote server.
|
|
reference:
|
|
- https://wadcoms.github.io/wadcoms/SMBClient-List-Shares-Anonymous/
|
|
metadata:
|
|
verified: true
|
|
shodan-query: "port:445"
|
|
tags: js,network,smb,enum,misconfig
|
|
|
|
javascript:
|
|
- code: |
|
|
var m = require("nuclei/smb");
|
|
var c = m.SMBClient();
|
|
var response = c.ListShares(Host,Port,User,Pass);
|
|
to_json(response);
|
|
|
|
args:
|
|
Host: "{{Host}}"
|
|
Port: "445"
|
|
User: " "
|
|
Pass: " "
|
|
|
|
matchers:
|
|
- type: dsl
|
|
dsl:
|
|
- success == true
|
|
- contains(response, "IPC$")
|
|
condition: and
|
|
|
|
extractors:
|
|
- type: json
|
|
json:
|
|
- '.[]'
|
|
# digest: 490a0046304402200f3dab81270560ed3e075e65dbe973b1b5e1c7ee630045e108a8de65a4ba7b32022058572909119d9f31840f3b3eb62f7502d0b8b350d5d44759162b0ad0a64191a2:922c64590222798bb761d5b6d8e72950 |