target-info
NetExec flag: (base smb probe)
Captures SMB host identity, Windows build string, domain name, SMB signing posture, and SMBv1 exposure. Selected automatically when --module is omitted.
Runs isolated Active Directory enumeration with NetExec
A local-first Rust CLI wrapper around an installed nxc binary. Target specifications expand with arithmetic bounds before iteration, credentials run sequentially per target under an optional scan-wide failure budget, and each host owns an isolated, redacted record in an ordered JSON report. For authorized security testing with explicit written permission only.
git clone https://github.com/Real-Fruit-Snacks/ad-sweep.git
cd ad-sweep && cargo install --path .
# Verify implemented SMB modules without invoking NetExec
ad-sweep --list-modules
ISOLATED EXECUTION WORKBENCH
Redaction boundary: Real ad-sweep runs always replace supplied passwords, NT hashes, and AES keys with [REDACTED] in src/netexec.rs and src/credential.rs before serialization. Toggling Redact secrets off previews raw mocked lab output so you can verify what the boundary scrubs.
IMPLEMENTED SCOPE · SRC/CLI.RS
Pass --module (or --modules) repeatedly or comma-separated. Every module shares one centralized build_nxc_command boundary so SMB port, DNS server, DNS-over-TCP, verbosity, and process timeouts stay consistent across hosts.
NetExec flag: (base smb probe)
Captures SMB host identity, Windows build string, domain name, SMB signing posture, and SMBv1 exposure. Selected automatically when --module is omitted.
NetExec flag: --shares
Enumerates SMB share names, read/write access permissions, and share comments per target. Supports anonymous guest checks or authenticated domain and local sessions.
NetExec flag: --users
Enumerates Active Directory or local user accounts over SMB using password (-p), NT/LM:NT hash (-H), Kerberos AES key (--aes-key), or credential cache (--use-kcache).
NetExec flag: --groups
Enumerates SMB security groups and domain group listings into each target's isolated modules array, preserving exit status, timing, and redacted output.
BOUNDED INPUTS & OPERATOR SAFETY
Expansion size is computed arithmetically before any address is allocated. Oversize networks fail fast with exit code 2 instead of exhausting memory. Results are deduplicated in original input order.
10.0.0.10 · 2001:db8::1 · dc01-prod10.0.0.1-20 (last octet 0–255)10.0.0.1-10.0.0.20 (same family)10.0.0.0/24 (IPv4 /30 and wider omit net & broadcast)targets.txt (UTF-8, skips blanks & # comments)65,536 hosts (lower via --max-targets 1..=65536)Targets may run concurrently up to --workers (1..=64, default 4), while credential attempts stay strictly sequential per host. No direct-socket prescan or implicit roasting runs behind your back.
Recorded auth failures (STATUS_LOGON_FAILURE, STATUS_ACCOUNT_LOCKED_OUT, STATUS_ACCOUNT_DISABLED, and related SMB errors) plus in-flight attempts never exceed COUNT. Setting --fail-limit 1 serializes attempts across workers.
Tries user:password or user:hash lines one at a time per target, preserving password whitespace and stopping after the first credential completes all selected modules unless --continue-on-success is explicit.
Passwords, NT hashes, and AES keys are redacted at the central NetExec command and output boundaries. --output PATH uses create_new (0600 on Unix) and never overwrites an existing report.
Exit 0 on complete success, 1 on runtime, partial, or cancelled runs, and 2 on invalid CLI usage. Ctrl+C stops queued work and terminates tracked direct children; NO_COLOR, TERM=dumb, and --no-color strip ANSI escapes.
VERIFICATION & KNOWN LIMITS
Automated checks validate the real binary against a mocked NetExec runner. Mocked tests prove argument handling, concurrency safety, redaction, and report structure, but do not substitute for live directory testing.
cargo fmt · Clippy -D warnings · locked tests1.5.x protocol behavior, proxied routing, and macOS builds are not yet verified.--fail-limit relies on recognized NetExec authentication error strings and is not an account-lockout prevention guarantee. Validate domain policy behavior in a dedicated lab.Full flag tables and operator notes live in docs/USAGE.md.