Skip to content

ENG-8835 fix(network-ops): redact credentials from tool logs and traces - #183

Open
thomasqbrady wants to merge 1 commit into
mainfrom
eng-8835-network-ops-credential-redaction
Open

thomasqbrady wants to merge 1 commit into
mainfrom
eng-8835-network-ops-credential-redaction

Conversation

@thomasqbrady

Copy link
Copy Markdown
Contributor

Summary

Network-ops tools passed passwords, NT/LM hashes, Kerberos keys and PFX passwords as command-line arguments, exposing them in execute() logs and in tool-call trace telemetry. This threads each tool call's credential values into the SDK's execute(secrets=...) so they are masked at the sinks.

Changes

  • All ~63 execute() call sites across bloodyAD, impacket, netexec, certipy, krbrelayx, coercion and smbclient now pass secrets=[...] — auth credentials plus operation secrets (new/computer/PFX passwords, Kerberos AES keys, --add-computer passwords).
  • certipy and netexec recover credentials from opaque args lists and mask them in their logger.info argument lines.
  • The ntlmrelayx relay subprocess (which bypasses execute()) masks the user-supplied --add-computer password in its output.
  • smb_list_files, which runs smbclient directly, masks the password in its result.
  • Regression tests cover each threading style. Most of the diff is impacket.py being reformatted by the repo's pinned ruff-format hook on first touch.

Dependency

Requires the SDK execute(secrets=...) parameter — see the companion dreadnode-tiger PR for the same ticket.

Validation

  • pytest capabilities/network-ops/tests/ — 58 passing.
  • ruff + pre-commit clean.

Known residual tracked in ENG-8921: a cleartext password passed via the overloaded -p/-H flag inside an opaque args list is masked in logs but still reaches the trace span.

…835)

Network-ops tools pass passwords, NT hashes, Kerberos AES keys and PFX
passwords as command-line arguments, exposing them in execute() logs and in
tool-call trace telemetry.

- Thread each tool call's credential values into execute(secrets=...) so they
  are masked in the logged command line and in the returned/raised output.
- Recover and mask credentials carried in opaque `args` lists (certipy,
  netexec) and in the per-tool logger.info argument lines.
- Mask the password in smb_list_files, which runs smbclient directly.
- Add --add-computer / --computer-pass / -pfx-password to the relay listener's
  logged-command redaction.

Rebased onto the ENG-8834 auth-vocabulary changes (nt_hash / aes_key / ccache).
Requires the SDK execute() `secrets` parameter (dreadnode-tiger, same ticket).
@thomasqbrady
thomasqbrady force-pushed the eng-8835-network-ops-credential-redaction branch from 0f05cba to 7b23976 Compare October 19, 2026 19:13

This branch has not been deployed

No deployments
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