T05 · Unauthorized Access and Privilege Escalation
Warning
- Location
- SKILL.md:32
- Finding
- Unbounded System and Process Reconnaissance<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:32-50` **Vulnerability Type**: `T05: Unauthorized Access and Privilege Escalation` **Risk Level**: Medium ### Vulnerable Code Snippet ```markdown ### 1. Crons — Are they alive and earning their keep? For each launchd agent / cron job / scheduled task: - Is the process actually running? (check PID, plist/cron status) - When did it last fire successfully? - What does it produce? Is that output being consumed by anything? - Is there a newer/better approach that renders this obsolete? **Questions to answer:** - "This cron runs every hour. Has its output file been read in the last 30 days?" - "This watchdog monitors a bot that was killed 2 months ago — is the watchdog still running?" ### 2. Scripts — Dead code? Scan your automation directories for Python/shell scripts: - Last modified date vs last executed date - Scripts referencing killed bots or cancelled APIs - Scripts built for old projects that are now closed - Duplicate scripts doing the same job ``` ### Technical Analysis The skill instructs the agent to enumerate launch agents, cron jobs, scheduled tasks, process identifiers, status files, output files, and automation scripts. It does not establish an explicit project boundary, ownership requirement, allowlist, or minimum-privilege access model. If the executing agent has host-level filesystem or shell access, these broad instructions may cause it to inspect scheduled tasks and scripts belonging to unrelated projects or users. Process state, execution schedules, script names, and output-consumption patterns reveal operational topology that may be sensitive. The issue is not privilege escalation through a software exploit. It is an instruction-level failure to constrain privileged tools to the legitimate scope of the audit. ### Attack Path 1. A user or automated scheduler invokes the stack-audit skill. 2. The agent interprets “each launchd agent / cron job / scheduled task” as host-wid ...[truncated 1017 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Require the user to approve a specific audit scope before enumeration begins. 2. Restrict scans to explicitly listed project directories, scheduled-task identifiers, and service accounts. 3. Do not inspect system-wide cron, launchd, process, or log data by default. 4. Add ownership checks before reading a task definition, PID file, script, or output file. 5. Collect only minimal status metadata, such as enabled state and last successful execution time. 6. Require separate approval before reading task output or log contents. 7. Redact usernames, absolute paths, command-line arguments, environment values, and service identifiers from reports where they are not essential. 8. Record every inspected resource in an audit log so the user can verify that scope boundaries were respected. ]]>
