Back to skill

Security audit

Wifi Qr

Security checks for vulnerabilities and agentic risk

Overview

This skill is a small Wi-Fi QR helper with disclosed credential handling, but users should treat generated QR codes and command examples as sensitive.

Install only if you are comfortable installing qrencode through your system package manager. Treat both the Wi-Fi password and any generated QR code as sensitive: avoid using real passwords in logged commands, avoid screen sharing the QR code, and rotate the Wi-Fi password if it may have been exposed.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:24
Finding
Wi-Fi Password Exposed Through Command-Line Arguments## Vulnerability Details **File Location**: `SKILL.md`, lines 24–31 **Vulnerability Type**: Plaintext sensitive data exposure through process arguments and shell history **Risk Level**: Medium ### Vulnerable Code ```bash # Generate a QR code for a Wi-Fi network (defaults to WPA) wifi-qr "MyNetwork" "mypassword" # Specify the security type explicitly wifi-qr "MyNetwork" "mypassword" --type WPA ``` ### Technical Analysis The documented interface instructs users to supply a plaintext Wi-Fi password as a command-line argument. When a real credential is substituted for `"mypassword"`, it may be stored in shell history and terminal or session logs. While the command is running, the credential may also be exposed through operating-system process inspection facilities. This handling pattern unnecessarily places sensitive authentication material in locations that are commonly retained or observable. Exploitation does not require control of the skill itself, but it generally requires local access, access to collected logs, or permission to inspect the affected user's processes or command history. ### Attack Path 1. A user follows the documented example and replaces `"mypassword"` with a real Wi-Fi password. 2. The shell records the complete command in its history, or a terminal, session recorder, monitoring agent, or support tool captures it. 3. During execution, the password may additionally appear in the process argument list. 4. An attacker with suitable local or log-reading access retrieves the exposed command. 5. The attacker extracts the Wi-Fi password and uses it to authenticate to the corresponding wireless network. ### Impact Assessment Successful exploitation discloses the Wi-Fi pre-shared key supplied by the user. The attacker may gain the same network access granted to devices using that credential, subject to network segmentation and other controls. This could enable unauthorized use of network resources, ac ...[truncated 347 chars]
Remediation
## Remediation Suggestions - Redesign the `wifi-qr` interface to read the Wi-Fi password interactively from a non-echoing terminal prompt rather than from a positional command-line argument. - Alternatively, accept the secret through protected standard input or a permission-restricted credential file, ensuring that it is not logged. - Avoid environment variables for long-lived secret handling because they may also be exposed through process inspection, diagnostics, or crash reports. - Update the documentation so examples do not encourage users to place real credentials directly in commands. - Ensure the implementation does not print the password, include it in errors, or persist it in temporary files. - If temporary storage is unavoidable, create files with restrictive permissions, avoid predictable paths, and securely remove them immediately after QR-code generation. - Advise users who followed the existing documentation to remove affected shell-history entries and rotate Wi-Fi credentials if command histories or logs may have been exposed.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (2)

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The skill encourages generating and displaying a QR code that embeds the Wi-Fi SSID and password, but it provides no warning that anyone who can see, capture, or reshare that QR code can obtain network access. This is an information exposure issue rather than code execution, but in context it can directly leak valid credentials and enable unauthorized network use.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
## Install

```bash
sudo dnf install qrencode
```
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Static analysis

No suspicious patterns detected.