moving-laterally-with-netexec

Warn

Audited by Gen Agent Trust Hub on Aug 7, 2026

Risk Level: MEDIUMCREDENTIALS_UNSAFEEXTERNAL_DOWNLOADSCOMMAND_EXECUTIONPROMPT_INJECTION
Full Analysis
  • [CREDENTIALS_UNSAFE]: The script scripts/agent.py logs the full execution command, including cleartext passwords and NT hashes, to standard output using the print function in run_nxc. This behavior exposes sensitive credentials in any console logs or output buffers captured during the agent's operation.
  • [EXTERNAL_DOWNLOADS]: The SKILL.md file recommends installing the NetExec tool directly from a third-party GitHub repository (https://github.com/Pennyw0rth/NetExec) using pipx. This creates a supply chain dependency on an external source that is not an official package registry or a pre-verified trusted vendor.
  • [COMMAND_EXECUTION]: The script scripts/agent.py uses subprocess.run to execute local shell commands. While it uses an argument list to prevent direct shell injection, it serves as a broad execution wrapper for nxc, a tool specifically designed for remote authentication, credential harvesting, and code execution, thereby increasing the local attack surface.
  • [PROMPT_INJECTION]: The skill is susceptible to indirect prompt injection surfaces (Category 8) due to its interaction with untrusted remote network data.
  • Ingestion points: The scripts/agent.py file ingests and parses the stdout of the nxc command using the PWNED_RE regular expression to identify hostnames, IPs, and credentials.
  • Boundary markers: No explicit boundary markers or instructions to ignore embedded commands are present when processing the tool's output.
  • Capability inventory: The skill possesses powerful capabilities including remote command execution and credential dumping across multiple protocols (SMB, WinRM, MSSQL).
  • Sanitization: The script does not perform sanitization or validation of the hostnames or status strings received from remote targets before incorporating them into the structured JSON report.
Audit Metadata
Risk Level
MEDIUM
Analyzed
Aug 7, 2026, 04:18 PM
Security Audit — agent-trust-hub — moving-laterally-with-netexec