Skip to content

Quiet SMB write-denied probes#22

Open
erra9x wants to merge 1 commit into
vflame6:mainfrom
erra9x:main
Open

Quiet SMB write-denied probes#22
erra9x wants to merge 1 commit into
vflame6:mainfrom
erra9x:main

Conversation

@erra9x
Copy link
Copy Markdown

@erra9x erra9x commented May 18, 2026

Summary

Fixes noisy SMB write-access probing when a target returns expected write-denied status codes.

  • Keeps the write probe to one temporary file create/delete attempt.
  • Treats STATUS_PRIVILEGE_NOT_HELD (0xc0000061) and STATUS_ACCESS_DENIED (0xc0000022) as expected denied-write results.
  • Logs those denied-write results only in debug output.
  • Documents why the old directory fallback stays disabled.
  • Cleans up lint findings touched by this change.

Why

Some SMB targets return 0xc0000061 during write probes. That means the credentials do not have write access; it should not be treated as an exceptional scanner failure.

The old directory fallback risked reintroducing noisy SMB library output, so this PR keeps the probe deterministic and quiet.

Verification

  • go test ./...
  • go vet ./...
  • golangci-lint run ./...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant