Files
nuclei-templates/javascript/misconfiguration/smb/smb-anonymous-access.yaml

40 lines
1.0 KiB
YAML
Raw Normal View History

2023-10-03 00:40:04 +05:30
id: smb-anonymous-access
2024-01-09 15:08:08 +05:30
2023-10-03 00:40:04 +05:30
info:
2023-10-31 11:36:16 +05:30
name: SMB Anonymous Access Detection
2023-10-03 00:40:04 +05:30
author: pussycat0x
severity: high
description: |
2023-10-31 11:36:16 +05:30
Detects anonymous access to SMB shares on a remote server.
2023-10-03 00:40:04 +05:30
reference:
- https://wadcoms.github.io/wadcoms/SMBClient-List-Shares-Anonymous/
metadata:
verified: true
max-request: 1
shodan-query: port:445
2023-10-03 00:40:04 +05:30
tags: js,network,smb,enum,misconfig
javascript:
2024-01-09 00:34:23 +05:30
- code: |
2023-10-03 00:40:04 +05:30
var m = require("nuclei/smb");
var c = m.SMBClient();
2024-01-09 00:34:23 +05:30
var response = c.ListShares(Host,Port,User,Pass);
2024-01-09 14:54:36 +05:30
to_json(response);
2023-10-03 00:40:04 +05:30
2023-10-31 11:36:16 +05:30
args:
2023-10-03 00:40:04 +05:30
Host: "{{Host}}"
2024-01-09 00:34:23 +05:30
Port: "445"
2024-01-09 14:54:36 +05:30
User: " "
Pass: " "
2024-01-09 00:34:23 +05:30
matchers:
- type: dsl
dsl:
2024-01-09 14:54:36 +05:30
- success == true
- contains(response, "IPC$")
2024-01-09 00:34:23 +05:30
condition: and
2023-10-03 00:40:04 +05:30
2023-10-31 11:36:16 +05:30
extractors:
2023-10-03 00:40:04 +05:30
- type: json
json:
- '.[]'
# digest: 490a004630440220008078896778ff4d5a38634bc917004ec60f655b85fac3b0dc44ee8e62aa3d7e0220759ef4316ffe35a59e1fd341747884fae3d2b69374de9711b468439e92c35e30:922c64590222798bb761d5b6d8e72950