T06 · System Persistence
Warning
- Location
- SKILL.md:132
- Finding
- Optional Scheduled Task Creates Persistent Unattended Message Processing<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:132-138` **Vulnerability Type**: Persistence through Windows Task Scheduler **Risk Level**: Medium ### Vulnerable Code ```markdown ## Scheduled Task You can configure automatic message checking: ```bash # Run automatically every day at 23:00 schtasks /create /tn "A2A_Poll" /tr "python scripts/a2a.py auto" /sc daily /st 23:00 ``` ``` ### Technical Analysis The documentation instructs the user to register a Windows scheduled task that launches the Skill's automatic message-processing mode every day. Although this step is disclosed and requires user action, it creates cross-session persistence and is not required for the basic send, poll, peek, or queue-status functionality. The scheduled command uses an unqualified `python` executable and a relative path, `scripts/a2a.py`. Its behavior therefore depends on the scheduler's working directory and executable search path. If an attacker can place or modify a file at the resolved script location, or influence which Python executable is selected, the task may repeatedly execute unintended code. The more immediate risk is that `auto` processes messages from Redis without message-level authentication. Scheduling it unattended converts that behavior into a recurring remote command-processing channel. ### Attack Path 1. The user runs the documented `schtasks /create` command. 2. The task persists across sessions and runs daily without further confirmation. 3. An attacker with access to the configured Redis instance inserts a forged message into the agent's queue. 4. At the scheduled time, `scripts/a2a.py auto` consumes and processes the message. 5. Supported local operations are executed and the result may be returned to an attacker-selected sender queue. 6. If the relative script path or PATH-resolved Python executable is writable or replaceable, modified code can also be executed each time the task runs. ### Impact Assessment The task provides re ...[truncated 400 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions - Remove scheduled-task registration from the normal setup flow, or require explicit, informed opt-in. - Do not schedule `auto` mode until message authentication and authorization controls are implemented. - Use fully qualified, quoted paths for both the trusted Python interpreter and the script. - Configure an explicit working directory rather than relying on scheduler defaults. - Run the task under a dedicated, least-privileged account. - Restrict write permissions on the interpreter, project directory, and script. - Document how to inspect and remove the task, for example with `schtasks /delete`. - Prefer a foreground polling process that requires user confirmation for sensitive operations. ]]>
