T06 · System Persistence
- Location
SKILL.md:179- Finding
Recurring Scheduled Task Creates Cross-Session Persistence
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 179–192
Vulnerability Type: Scheduled-task persistence
Risk Level: MediumVulnerable Code
bash # Linux/macOS crontab 0 10 * * * python3 ~/.agents/skills/weibo-search/scripts/search_weibo.py "<keyword>"The surrounding instructions also direct the Agent to create a platform-provided scheduled task that runs the same search every day.
Technical Analysis
The Skill instructs the Agent to register either a platform scheduled task or a user crontab entry. This task survives the interaction that created it and executes the search script every day under the scheduler account.
Subscription is part of the declared functionality and requires the user to reply with a confirmation. Therefore, the behavior is disclosed rather than covert. Nevertheless, it is a persistence mechanism because execution continues across sessions until the task is removed.
The instructions do not provide:
- A task identifier that the user can inspect or revoke.
- A cancellation or uninstallation procedure.
- An expiration date or execution limit.
- Guidance for restricting the scheduled task's environment and credentials.
- A verification step showing the exact command before installation.
There is also a schedule discrepancy: the documentation claims execution at 09:00, while
0 10 * * *executes at 10:00 according to standard cron semantics.Attack Path
- A search is performed using the Skill.
- The Skill prompts the user to subscribe to daily results.
- The user replies with the subscription confirmation.
- The Agent registers a platform task or installs the supplied crontab entry.
- The task executes the Python script every day, independently of the original conversation.
- Execution continues until the scheduled task is manually identified and removed.
Impact Assessment
The persistent task runs with the privileges of the ...[truncated 462 chars]
- Remediation
View remediation
Remediation Suggestions
- Prefer a platform scheduler that requires explicit user confirmation and displays the complete task definition before creation.
- Return a stable task ID and provide clear commands or interface instructions for listing, disabling, and deleting the subscription.
- Add an optional expiration date or bounded execution count rather than creating an indefinite subscription by default.
- Run the task with a minimal environment and a narrowly scoped, revocable API credential.
- Avoid modifying the user's crontab automatically. If a cron configuration is offered, present it as a manual option with explicit security warnings.
- Correct the schedule to
0 9 * * *if the intended local execution time is 09:00, and document the applicable time zone. - Record creation, execution, failure, and deletion events without logging the API key.
