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 guest with an empty password.
  • Enumerate shares with ListShares.
  • For each candidate share, call ListDir on the root directory.
  • Report a share only when ListDir succeeds.
  • 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 as C$.

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-access SMB template and its template test or fixture coverage.

Acceptance criteria

  • The template uses guest and an empty password.
  • The template calls ListShares, then uses ListDir for 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: projectdiscovery/nuclei-templates