T05 · Unauthorized Access and Privilege Escalation
- Location
SYSTEMD_SETUP.md:27- Finding
Persistent Scheduled Execution Runs with Host Root and Docker-Equivalent Privileges
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This appears to be a real Polymarket optimizer, but it needs review because it can automatically change trading settings, use broad credentials, run persistently, and send financial reports to Telegram.
Install only if you are comfortable with unattended changes to trading configuration and optional Telegram reports containing portfolio and strategy data. Use a dedicated minimal environment file, verify the Telegram chat ID, avoid the root systemd setup, keep backups of learned_config.json, and prefer a scheduler running with the least privilege needed.
SYSTEMD_SETUP.md:27Persistent Scheduled Execution Runs with Host Root and Docker-Equivalent Privileges
SKILL.md:12Security Metadata Understates Credential Use and Outbound Financial Telemetry
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
"parse_mode": "HTML"
}).encode()
req = urllib.request.Request(url, data, {"Content-Type": "application/json"})
urllib.request.urlopen(req, timeout=10)
except Exception as e:
print(f"[TELEGRAM] Error: {e}")
The top-level description understates the skill's real behavior: it not only optimizes parameters but also reads additional trading data, writes persistent logs, and transmits reports externally via Telegram. This mismatch is dangerous because users and orchestrators may approve or schedule the skill based on incomplete understanding, leading to silent data egress and autonomous behavioral changes in a trading system.
The documentation tells operators to load credentials from a shared .env file into a root-run service context. That can overexpose secrets to the service, any child processes, and potentially to logs or debugging interfaces, especially since the command then crosses a host-to-container boundary.
User=root
WorkingDirectory=/docker/openclaw-yyvg
# Load credentials from Wesley's .env
EnvironmentFile=/docker/openclaw-yyvg/.env
# Run inside OpenClaw Docker container
Using EnvironmentFile to inject a broad .env into a privileged scheduled service creates unnecessary credential exposure and increases impact if the scheduled task or container invocation is abused. In this trading-automation context, leaked API keys or tokens could directly affect financial accounts and infrastructure.
WorkingDirectory=/docker/openclaw-yyvg
# Load credentials from Wesley's .env
EnvironmentFile=/docker/openclaw-yyvg/.env
# Run inside OpenClaw Docker container
ExecStart=/usr/bin/docker exec openclaw-yyvg-openclaw-1 \
The markdown states that the skill runs automatically, reads performance data, and adjusts trading parameters with no manual configuration needed after setup. It does not include any caution that the skill writes learned_config.json and changes trading behavior automatically, which could affect user data and system behavior.
The skill exposes capabilities to read environment variables, read and write local files, and make network requests, but it does not declare a restrictive tool scope such as explicit permissions or allowed-tools. This creates an under-specified trust boundary where operators may assume narrower behavior than the skill actually requires, increasing the risk of unintended access or abuse if the implementation changes or is swapped.
The skill is explicitly configured to make outbound requests to the Telegram Bot API, which is an external transmission channel for trading-related data. In this context the behavior appears intended rather than covert, but it still expands the attack surface and can leak sensitive portfolio or strategy information if enabled or misconfigured.
network_behavior:
makes_requests: true
endpoints_allowed:
- "https://api.telegram.org/bot*"
requires_credentials: false
uses_websocket: false
security_level: "L1 - Read/Write local files only"
The skill advertises 'Zero manual intervention required' while omitting a prominent warning that it will automatically rewrite learned_config.json and thereby alter future trading behavior. In an automated trading context, silent self-modification raises operational and security risk because bad inputs, poisoned metrics, or logic errors can directly change execution parameters without review.
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
Systemd timers are more reliable than cron for services. Use a timer + service pair.
sudo nano /etc/systemd/system/polymarket-optimizer.service
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
sudo nano /etc/systemd/system/polymarket-optimizer.service
Paste:
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
sudo nano /etc/systemd/system/polymarket-optimizer.service
Paste:
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
sudo nano /etc/systemd/system/polymarket-optimizer.service
Paste:
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
sudo nano /etc/systemd/system/polymarket-optimizer.service
Paste:
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
sudo nano /etc/systemd/system/polymarket-optimizer.service
Paste:
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
sudo nano /etc/systemd/system/polymarket-optimizer.service
Paste:
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
sudo nano /etc/systemd/system/polymarket-optimizer.service
Paste:
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
sudo nano /etc/systemd/system/polymarket-optimizer.service
Paste:
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
sudo nano /etc/systemd/system/polymarket-optimizer.service
Paste:
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
sudo nano /etc/systemd/system/polymarket-optimizer.service
Paste:
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
sudo nano /etc/systemd/system/polymarket-optimizer.service
Paste:
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
sudo nano /etc/systemd/system/polymarket-optimizer.service
Paste:
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
sudo nano /etc/systemd/system/polymarket-optimizer.service
Paste:
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
sudo nano /etc/systemd/system/polymarket-optimizer.service
Paste:
The service definition explicitly runs as root and loads a shared .env credential file into the service environment. This increases blast radius if the optimizer or container execution path is compromised, and can expose sensitive values through process environments, logs, or overly broad host/container access.
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
sudo systemctl daemon-reload
sudo systemctl enable polymarket-optimizer.timer
sudo systemctl start polymarket-optimizer.timer
sudo systemctl status polymarket-optimizer.timer
No suspicious patterns detected.