T09 · Insecure Skill Coding Practices
Error
- Location
- SKILL.md:58
- Finding
- RDP Password Exposed Through Command-Line Arguments<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:58` and `protocols.md:20-27` **Vulnerability Type**: Plaintext credential exposure through process arguments **Risk Level**: High ### Vulnerable Code `SKILL.md:58`: ```bash xfreerdp /v:HOST /u:USER /p:PASS /size:1920x1080 /dynamic-resolution ``` `protocols.md:20-27`: ```bash xfreerdp /v:HOST /u:USER /p:PASS \ /size:1920x1080 \ # Resolution /dynamic-resolution \ # Auto-resize /clipboard \ # Enable clipboard /sound:sys:alsa \ # Audio /drive:share,/home/user \ # Share folder /sec:tls \ # Force TLS /cert:ignore # Skip cert validation (use carefully) ``` ### Technical Analysis The examples instruct users to replace `PASS` with an RDP password supplied through the `/p:` command-line argument. A real password entered this way can be exposed through shell history, process listings, command auditing, terminal recordings, diagnostic reports, and process-monitoring systems. This also conflicts with the skill's stated policy that plaintext passwords should not be saved. Although the skill does not itself persist the password in a profile, placing it directly in a shell command can cause the shell or operating system to persist or disclose it indirectly. ### Attack Path 1. A user follows the documented example and replaces `PASS` with a real account password. 2. The complete command is recorded in shell history or becomes temporarily visible in process metadata. 3. Another local user, administrator, monitoring agent, support bundle, or log collector reads the command. 4. The exposed credentials are used to authenticate to the associated RDP host. 5. The attacker receives whatever remote privileges are assigned to the compromised account. ### Impact Assessment Successful exploitation discloses the remote desktop account password. The resulting access scope is determined by the compromised account and may range from an ordinary W ...[truncated 137 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions - Remove `/p:PASS` from every example. - Allow `xfreerdp` to request the password interactively. - Where noninteractive authentication is required, use an approved operating-system credential manager rather than command-line arguments. - Explicitly warn users not to place credentials in shell commands, scripts, host profiles, environment variables, or command history. - Review existing shell histories and logs if real passwords may already have been used this way, and rotate affected credentials. ]]>
