T09 · Insecure Skill Coding Practices
- Location
SKILL.md:61- Finding
Shell Command Injection Through Unvalidated Target Substitution
- Content
View full analysis
"Enter target URL (e.g., https://example.com or http://127.0.0.1:8080):" ### 1.1 DNS Resolution ```bash dig +short TARGET_DOMAIN host TARGET_DOMAIN ``` ``` ### Technical Analysis The Skill instructs an AI agent to collect a target from the user and then copy the relevant command templates into a terminal. The user-controlled `TARGET_DOMAIN` placeholder is placed into shell commands without validation, shell escaping, or quoting. If an agent implements these instructions through direct textual replacement, shell metacharacters in the supplied target can introduce additional commands. For example, substituting a value shaped like `example.com; ATTACKER_COMMAND` would produce a shell command equivalent to: ```bash dig +short example.com; ATTACKER_COMMAND ``` The shell would execute the injected command independently of `dig`. Similar unquoted target placeholders recur throughout the guide, increasing the number of possible injection points. The project contains documentation rather than an automatically invoked executable, so exploitation depends on a human or agent substituting an untrusted value and running the generated command. Nevertheless, this is credible in the declared workflow because the Skill explicitly directs agents to solicit targets, copy commands, and execute them in a terminal. ### Attack Path 1. An attacker or untrusted user provides a crafted target containing shell control characters. 2. The AI agent accepts the value without validating that it is strictly a hostname, IP address, or HTTP(S) URL. 3. The agent replaces `TARGET_DOMAIN` or a similar placeholder with the supplied text. 4. The agent copies and executes the resulting command through a shell. 5. The shell interprets the i ...[truncated 908 chars]- Remediation
View remediation
