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.pylogs the full execution command, including cleartext passwords and NT hashes, to standard output using theprintfunction inrun_nxc. This behavior exposes sensitive credentials in any console logs or output buffers captured during the agent's operation. - [EXTERNAL_DOWNLOADS]: The
SKILL.mdfile recommends installing theNetExectool directly from a third-party GitHub repository (https://github.com/Pennyw0rth/NetExec) usingpipx. 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.pyusessubprocess.runto execute local shell commands. While it uses an argument list to prevent direct shell injection, it serves as a broad execution wrapper fornxc, 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.pyfile ingests and parses thestdoutof thenxccommand using thePWNED_REregular 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