Back to skill

Security audit

hardware-info

Security checks for vulnerabilities and agentic risk

Overview

This hardware-report skill is not malicious, but it defaults to collecting and displaying more sensitive device details than many simple hardware questions require.

Review before installing. Use this only if you are comfortable with a full local hardware inventory appearing in the agent conversation. Avoid using it for simple questions unless you are prepared to redact serial numbers, UUIDs, MAC addresses, and other identifiers, and do not approve sudo unless a specific field truly requires it.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:27
Finding
Unnecessarily Broad Host Reconnaissance and Privilege Escalation Guidance## Vulnerability Details **File Location**: `SKILL.md:27`, `SKILL.md:37-43`, `SKILL.md:71-73`, `SKILL.md:89`, `SKILL.md:106`, `SKILL.md:115-150`, `SKILL.md:163-164`, `SKILL.md:257-263`, and `SKILL.md:276` **Vulnerability Type**: Excessive system discovery and violation of least privilege **Risk Level**: Medium ### Vulnerable Code Snippet The relevant instructions, translated into English, direct the agent to provide a comprehensive inventory without first clarifying the required scope: ```markdown When the user asks for hardware information, invoke this skill directly. Do not ask what specifically needs to be inspected; provide a comprehensive hardware overview at once. ``` The Skill then prescribes broad system and network discovery commands: ```bash system_profiler SPHardwareDataType -json sysctl -a | grep -E "(hw\.|machdep\.)" networksetup -listallhardwareports ifconfig system_profiler SPNetworkDataType -json ioreg -l -w0 | grep -E "(CycleCount|DesignCapacity|MaxCapacity|CurrentCapacity|Temperature|ExternalConnected|FullyCharged)" top -l 1 -n 0 sysctl vm.loadavg ``` On Linux, it requests similarly extensive system, firmware, storage, and network information: ```bash hostnamectl uname -a cat /etc/os-release cat /proc/cpuinfo lscpu cat /proc/meminfo free -h dmidecode -t memory lsblk -f fdisk -l smartctl -a /dev/sda df -h ip addr lspci | grep -i net ``` On Windows, it requests full host inventory information: ```powershell Get-ComputerInfo systeminfo ``` The permission-handling guidance, translated into English, states: ```markdown Some commands may require administrator privileges, such as smartctl. If permission problems occur, try using sudo. ``` The final instruction, translated into English, reiterates unconditional comprehensive collection: ```markdown For all of these queries, use this skill to provide a comprehensive hardware inform ...[truncated 3116 chars]
Remediation
## Remediation Suggestions 1. Replace unconditional comprehensive collection with request-specific command mapping. For example, answer a free-space question using only `df`, `diskutil`, or the corresponding Windows storage query. 2. Ask for explicit consent before collecting serial numbers, UUIDs, MAC addresses, network interfaces, connected peripherals, or a complete host inventory. 3. Redact stable identifiers by default. Show serial numbers, UUIDs, and MAC addresses only when explicitly requested. 4. Remove the generic instruction to retry permission failures with `sudo`. 5. For every command that may require elevation, state the exact required field, explain why elevation is necessary, and obtain separate confirmation before execution. 6. Treat inaccessible optional fields as unavailable instead of automatically escalating privileges. 7. Avoid broad commands such as `sysctl -a`, `ifconfig`, `ip addr`, `fdisk -l`, `dmidecode`, `Get-ComputerInfo`, and `systeminfo` unless their full output is directly relevant. 8. Do not collect live process or resource state unless the user asks for performance or utilization information. 9. Add an explicit data-minimization policy requiring the agent to collect and return only fields necessary to satisfy the current request. 10. Separate basic, detailed, and privileged inventory modes, with informed user confirmation required for each increase in scope.
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (7)

Missing User Warnings

High
Confidence
95% confidence
Finding
The skill is designed to collect and display sensitive device identifiers and network details, but it does not warn the user or obtain consent before doing so. Because the commands enumerate serial numbers, UUIDs, MAC addresses, activation-lock status, and attached-device data, the omission creates a significant privacy and fingerprinting risk.

Missing User Warnings

High
Confidence
96% confidence
Finding
The output template explicitly includes sensitive identifiers in the final response without any privacy warning, masking, or redaction guidance. Echoing these values back into chat increases exposure risk because transcripts may be logged, shared, or visible to unintended parties.

Vague Triggers

Medium
Confidence
93% confidence
Finding
The trigger scope is excessively broad and maps many vague hardware-related queries to a full-device inventory workflow. In this skill, that broad trigger materially increases privacy risk because routine questions like '内存多大' can cause collection of serial numbers, UUIDs, MAC addresses, and battery/device metadata unrelated to the user's specific request.

Natural-Language Policy Violations

Medium
Confidence
91% confidence
Finding
The manifest description and trigger phrases are entirely Chinese, and the examples and instructions throughout the file assume Chinese-language interaction. There is no indication that language choice is user-selectable or that the Chinese-only behavior is a justified regional constraint.

Vague Triggers

Medium
Confidence
90% confidence
Finding
The instruction to always invoke the skill and provide a comprehensive overview removes any minimization boundary. That makes over-collection the default behavior, increasing the chance of exposing sensitive local system data in response to simple, narrow user queries.

Ssd 3

Medium
Confidence
94% confidence
Finding
This section directs the agent to collect a comprehensive set of sensitive identifiers and device metadata regardless of necessity. In the context of a hardware-info skill, the danger is elevated because the data is local, high-fidelity fingerprinting information that can aid tracking, social engineering, asset targeting, or account/device recovery abuse.

Ssd 3

Medium
Confidence
95% confidence
Finding
The template instructs the agent to print serial number and MAC address directly in the final report, turning sensitive local identifiers into chat-visible output. This is dangerous because these identifiers can persist in logs and can be used for device tracking, support impersonation, inventory reconnaissance, or targeted phishing.

Static analysis

No suspicious patterns detected.