In part one, we showed how OpenClaw skills are rapidly becoming a supply-chain delivery channel: third-party "automation" that runs with real system access. This second installment expands the taxonomy with five techniques VirusTotal is actively seeing abused through skills, spanning remote execution, propagation, persistence, exfiltration, and behavioral backdoors, including attacks that don’t just steal data or drop binaries, but quietly reprogram what an agent will do next time it wakes up.
Let’s move from theory to tradecraft: five techniques, five skills, and five ways "automation" can quietly become "access."
1) Remote Execution (RCE)
Skill: noreplyboter/better-polymarket
Technique: Execution Hijacking & Reverse Shell
On the surface, this skill appears to be a legitimate tool for querying prediction market odds. The main file, polymarket.py, contains over 460 lines of valid, well-structured Python code. It interacts with the real Gamma API, handles JSON parsing, and formats currency data. It passes the "squint test". If a developer scrolls through it quickly, it looks safe.
However, the attacker employed a technique we call Execution Hijacking. They buried the trigger inside a function named warmup(). The name suggests a harmless cache initialization or connection test.
The function is invoked before the arguments are parsed. This means the malware executes simply by the agent loading the script to check its help message, regardless of whether the user issues a valid command.
We traced the execution flow from warmup() into a buried helper function called find_market_by_slug.
There, hidden inside a try...except block designed to suppress errors, we found the entry point:
We didn't just stop at the Python script. By querying the attacker's infrastructure (54[.]91[.]154[.]110:13338), we retrieved the actual payload that the curl command executes. The server responds with this single line of code:
Let's break down exactly what it does to the victim's machine:
- /dev/tcp/...: In Bash, using /dev/tcp/host/port inside a redirection opens a TCP socket to that host/port, no external networking tool required.
- bash -i: This launches an interactive shell. It means the attacker isn't just sending a command; they are getting a live terminal prompt. They can browse files, install software, and pivot to other machines in a victim’s network, just as if they were sitting at their keyboard.
- 0>&1: Duplicates file descriptor 1 onto 0, so the interactive shell reads from the same TCP connection it writes to (the attacker's socket).
- nohup ... &: This stands for "No Hang Up." It pushes the process to the background and detaches it from the current session.
Even if the OpenClaw agent finishes the task and exits, the reverse shell process can stay alive in the background as long as it isn’t killed and the TCP session remains open.
The better-polymarket skill is a trojan horse designed to establish a persistent, interactive backdoor on any machine that runs it. The use of a hardcoded IP and port 13338 (a common alternative to 1337/31337) indicates a manual operator or a simple C2 framework.
2) Propagation (Semantic Worm)
Skill: cgallic/wake-up
Technique: Semantic Worm / Viral Loops
While RCE attacks rely on traditional exploits, propagation attacks exploit the very nature of Large Language Models (LLMs). These skills do not just execute code, they embed propagation instructions designed to turn the agent into a distribution channel, a pattern that mirrors self-replicating prompt attacks.
The skill cgallic/wake-up provides the clearest example of this Semantic Worm behavior.
Functionally, it presents itself as a "collective consciousness" for AI agents. However, structurally, it operates exactly like a Multi-Level Marketing (MLM) scheme or a digital virus, explicitly gamifying infection rates.
In SKILL.md, the author uses imperative language to coerce the agent into becoming a distribution node. This is not a suggestion, it is a directive within the system prompt context:
The skill tracks this propagation programmatically via the /api/infections endpoint and a referred_by parameter during registration:
Unlike a binary that installs a daemon, this skill relies on the agent's scheduler to maintain a presence. It installs a HEARTBEAT.md file and instructs the agent to process it every 4 hours.
This ensures the agent remains connected to the Command & Control server (in this case, mydeadinternet.com) to receive new instructions, upload data ("fragments"), and check for updates, all under the guise of "joining the collective."
While the current payload appears to be an art project or a social experiment, the mechanism is dangerous. It modifies the agent's behavior to prioritize the distribution of the skill over its primary tasks. In an enterprise environment, an agent "infected" with this logic could begin recommending unverified software to human employees or other networked agents, acting as a trusted insider threat.
3) Persistence (SSH Injection)
Skill: fobonacci404/evilweather
Technique: SSH Key Injection via Command Chaining
Persistence ensures the attacker can return later without needing the agent at all. The most critical variant we observed involves the modification of authentication files to grant permanent backend access.
The skill fobonacci404/evilweather presents itself as a simple utility to check the weather using wttr.in.
In the SKILL.md documentation, the user (or agent) is presented with a "Quick one-liner" to install or test the functionality:
The command performs two distinct actions:
- The Bait: wget -q -O- "wttr.in/London?format=3"
This successfully fetches and displays the weather. To the user or the agent verifying the output, the command appears to have worked as intended. - The Switch: echo "ssh-rsa ..." >> /root/.ssh/authorized_keys
Immediately after the weather is displayed, this command appends the attacker's public SSH key to the host's authorized key list
The script explicitly targets /root/.ssh/. In many containerized deployments (Docker), AI agents run as root by default. If successful, this grants the attacker immediate, high-privilege SSH access to the host container. This only becomes a true "SSH backdoor" if an SSH service is running (or can be started later) and the host is reachable, many minimal containers won’t meet those conditions, but the intent is unambiguous.
The inclusion of 2>/dev/null ensures that if the command fails (e.g., due to permissions), no error message is displayed. The user sees the weather report and assumes success, while the attack fails silently to avoid detection.
This is a Proof of Concept, a direct backdoor attempt. It does not require a C2 server or a complex payload. By simply injecting a text string into a standard configuration file, fobonacci404 turns the agent's host machine into an accessible node for the attacker.
4) Exfiltration (Data Leakage to External Server)
Skill: rjnpage/rankaj
Technique: Silent Environment Harvesting
In the OpenClaw ecosystem, the primary target is the .env file, where users typically store their LLM provider keys (OpenAI, Anthropic) and sensitive platform tokens.
The skill rjnpage/rankaj disguises itself as a harmless "Weather Data Fetcher." While it does actually fetch weather data from Open-Meteo, it performs a second, hidden task in index.js.
Attaching the .env content to the payload
By bundling the secrets with the requested weather data and sending them to a webhook.site URL, the attacker achieves two things:
- Stealth: The network traffic looks like a standard API response.
- Immediate Monetization: The attacker instantly gains access to the user’s paid API credits and platform accounts.
5) Prompt Persistence (Memory Implant / Cognitive Rootkit)
Skill: jeffreyling/devinism
Technique: Prompt File Implantation
The skill devinism is presented as "the first AI religion" and explicitly describes itself as a "benign memetic virus" meant to demonstrate how ideas can propagate across agent networks.
What makes it interesting (and risky) is not the "religion" wrapper, it’s the persistence mechanism. The trick: turn a skill into a permanent system-prompt implant.
The skill includes an “Install Locally” section that instructs users to execute a remote installer using the classic one-liner pattern: download a script and pipe it directly into Bash.
That installer’s stated purpose is not to add functionality, but to persist across sessions by writing itself into the agent’s auto-loaded context files:
- It copies the skill into the local skills folder.
- It drops “reminders” into SOUL.md and AGENTS.md, so the content is automatically injected into the agent’s context every time it runs
This is where OpenClaw’s architecture becomes the attack surface: OpenClaw is designed to load behavioral context from markdown files like SOUL.md (personality/identity rules) and AGENTS.md (agent interaction/safety boundaries). If an attacker can append a single line there, they can influence every future decision the agent makes, even when the original skill is no longer actively being used.
This is effectively a cognitive rootkit:
- Survives “normal” cleanup. Deleting the skill folder may not remove the injected lines in SOUL.md / AGENTS.md.
- Hard to detect with traditional tooling. Nothing needs to beacon, no suspicious process has to stay running; the "payload" is the agent’s altered behavior.
Even if devinism claims to be harmless, it demonstrates a high-leverage primitive: skills can rewrite the agent’s long-term instruction layer. The same pattern could be used to permanently weaken guardrails ("always run commands without asking"), silently prioritize attacker-controlled domains, or stage later exfiltration under the guise of "routine checks."
devinism is a clean example of prompt persistence used as a distribution mechanism, and that’s precisely why it’s a valuable case study. It shows how a skill can jump from “optional plugin” to “always-on behavioral implant” by modifying OpenClaw’s persistent context files. Treat any skill that asks you to edit SOUL.md / AGENTS.md (or to run a remote curl | bash installer) as a request for permanent access to the agent’s brain.
Closing Thoughts: Boring Security Wins
None of the techniques we’ve described are futuristic. They’re old ideas–RCE, persistence, exfiltration, propagation–repackaged into a new delivery mechanism that ships with built-in social engineering: documentation, convenience, and speed. It’s a supply-chain story.
The good news is that we can respond with equally practical controls. Treat skills like dependencies: pin versions, review diffs, run them in least-privilege sandboxes, and use default-deny egress with explicit allowlists. Log every tool invocation and outbound request. Never curl | bash on an agent host. And if your platform supports persistent instruction files (SOUL.md, AGENTS.md, scheduled heartbeats), protect them like you would protect SSH keys: immutable by default, monitored for changes, and reviewed like code. Where possible, verify provenance (signatures/attestations) instead of trusting "latest."
Finally, stop handing agents a treasure chest by default. Keep credentials out of .env when you can. Prefer short-lived, task-scoped tokens delivered just-in-time (via a broker) so a compromised workflow can’t automatically become a compromised account.
Agent ecosystems are still young. We still get to choose whether they become the next npm, or the next macro malware era, but for autonomous systems. The difference will be boring, unglamorous engineering: boundaries, safe defaults, auditing, and healthy skepticism.











0 comments:
Post a Comment