feat(smb): add first-pass scope inventory module - #1380
Closed
CyberAuth wants to merge 1 commit into
Closed
Conversation
CyberAuth
requested review from
Marshall-Hallenbeck,
NeffIsBack,
mpgn and
zblurx
as code owners
August 27, 2026 16:51
|
It looks like the PR template may not have been filled out. The following sections appear to be missing:
Please edit your PR description to include them. The template helps reviewers understand and test your changes. Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
scopemodule for first-pass assessment setupOVERWRITE=trueMotivation
NetExec already exposes parts of this workflow through its host banner,
--gen-relay-list, and persistent workspace database exports. A first-pass assessment still requires operators to combine those sources or parse terminal output, and blank-authentication results do not have a dedicated export.This module creates a self-contained per-run snapshot for downstream tooling without rescanning targets.
relay.txtis intentionally limited to hosts where SMB signing is not required and NTLM remains enabled, and is documented as a candidate list rather than proof that relay will succeed.Usage
The module should be run without credentials so authentication failures cannot exclude reachable SMB hosts. Explicit blank credentials remain supported.
Default results are written to a timestamped directory under
NXC_PATH/logs:hosts.txt: hosts that completed SMB negotiationrelay.txt: NTLM-enabled hosts where SMB signing is not requirednull-auth.txt: hosts accepting blank SMB authenticationscope.csv: hostname, domain, OS, SMBv1, signing, NTLM, null/guest authentication, and DC-detection fieldsValidation
ruff check .pytest -q tests/test_scope_module.py— 7 passedpytest -q --ignore=tests/test_smb_signing.py— 47 passednetexec smb -M scope --optionsnetexec smb -Llistsscopeas a low-privilege SMB moduleThe five tests in
tests/test_smb_signing.pycurrently fail unchanged on the base revision because they pass asmbv1keyword to_is_signing_required(), whose current signature does not accept it. This change does not modify that method or those tests.