Verify guest read access in smb-anonymous-access with ListDir
Author: coderabbitai[bot]Created Sep 22, 2026Updated Sep 22, 2026
Labelsfalse-positive
Summary
Update the smb-anonymous-access template to verify anonymous read access to each discovered SMB share.
Required changes
- Authenticate as
guestwith an empty password. - Enumerate shares with
ListShares. - For each candidate share, call
ListDiron the root directory. - Report a share only when
ListDirsucceeds. - Treat a successful empty root listing as read access.
- Exclude only agreed printer and spooler share names before probing.
- Do not broadly exclude
ADMIN$or drive shares such asC$.
Rationale
Share enumeration alone does not prove that the guest session can read a share. A successful root listing proves read access, including when the share is empty. Printer and spooler shares can be listable but do not represent the intended anonymous file-share exposure finding.
Affected area
- The
smb-anonymous-accessSMB template and its template test or fixture coverage.
Acceptance criteria
- The template uses
guestand an empty password. - The template calls
ListShares, then usesListDirfor each candidate share. - A share with an empty but successful root listing is reported.
- Shares whose root listing fails are not reported.
- The implementation contains the agreed narrow printer/spooler exclusions.
ADMIN$and drive shares are not excluded by a broad name rule.
Backlinks
- Source issue: https://github.com/projectdiscovery/nuclei/issues/7752
- Request comment: https://github.com/projectdiscovery/nuclei/issues/7752#issuecomment-5772866651
- Requested by: @dwisiswant0
Source: projectdiscovery/nuclei-templates