Reverse Shell Detection

Detects reverse shell payloads, bind shells, and interactive shell spawning techniques across multiple languages and protocols

19 rules in reverse_shells.yml

CRITICAL: 19

Rule IDSeverityTitleDescriptionRefs
awk_reverse_shellCRITICALAwk/Gawk Reverse Shellawk/gawk/mawk/nawk uses /inet/tcp///0 with RS/ORS/BEGIN. gawk’s inet networking is the canonical reverse-shell idiom on hardened-shell hosts.
bash_dev_tcp_reverse_shellCRITICALBash /dev/tcp Reverse ShellUses bash /dev/tcp to open a reverse shell connection to a remote host
bash_interactive_shellCRITICALBash Interactive Reverse ShellSpawns an interactive bash shell redirected to a network connection
dnscat2_reverse_shellCRITICALdnscat2 DNS-Tunneled Shelldnscat2 is invoked with –dns/–secret/server= or the binary lives at /dnscat. dnscat2 tunnels a shell over DNS, defeating egress controls that allow recursive resolution.
java_runtime_exec_reverse_shellCRITICALJava Runtime Exec Reverse ShellUses Java Runtime.getRuntime().exec() with socket redirection to spawn a reverse shell
lua_reverse_shellCRITICALLua Reverse Shelllua -e uses socket.tcp or os.execute with /bin/sh / cmd. Lua is preinstalled on many networking devices and routers, making this a quiet reverse-shell shape.
mkfifo_reverse_shellCRITICALNamed Pipe (mkfifo) Reverse Shellmkfifo is followed by nc/ncat/cat plumbed to /bin/sh -i. The named-pipe shape gives a working reverse shell on hosts where nc lacks -e support.
netcat_reverse_shellCRITICALNetcat Reverse Shellnc/ncat/netcat is invoked with -e /bin/sh, -c /bin/sh, or piped to /bin/sh. All three are direct reverse / bind shell constructions.
node_reverse_shellCRITICALNode.js Reverse Shellnode -e combines child_process / net.Socket / require(‘spawn’) / require(’exec’) with connect or /bin/sh. The shape is a Node.js one-liner reverse shell.
openssl_reverse_shellCRITICALOpenSSL Encrypted Reverse Shellopenssl s_client -connect : with /bin/sh, exec, or bash. The TLS-wrapped reverse shell evades plaintext network IDS rules.
perl_reverse_shellCRITICALPerl Reverse Shellperl -e … uses IO::Socket / socket(AF_INET) / exec /bin/sh to spawn a reverse shell. Perl is preinstalled on most Linux boxes, making this a portable post-exploitation idiom.
php_reverse_shellCRITICALPHP Reverse Shellphp -r … combines fsockopen/socket_create/proc_open/popen with exec/passthru/shell_exec or /bin/sh. Webshells often hand off to this shape after initial access.
powershell_conpty_reverse_shellCRITICALPowerShell ConPTY/IEX Reverse ShellDownloads and executes a PowerShell reverse shell script via IEX with TCPClient
powershell_tcp_reverse_shellCRITICALPowerShell TCP Reverse ShellUses PowerShell .NET sockets to establish a reverse shell connection
python_reverse_shellCRITICALPython Reverse ShellSpawns a reverse shell using Python socket and subprocess modules
ruby_reverse_shellCRITICALRuby Reverse Shellruby -e … uses TCPSocket.new/open or Socket.tcp combined with exec/spawn/system. The shape is a textbook Ruby reverse shell one-liner.
socat_reverse_shellCRITICALSocat Reverse Shellsocat builds an EXEC:/bin/sh <-> TCP[46] pair, or uses pty,stderr,setsid. socat reverse shells are TTY-grade and favoured for interactive post-exploitation.
telnet_reverse_shellCRITICALTelnet Reverse ShellUses telnet piped to a shell for reverse shell functionality
xterm_reverse_shellCRITICALXterm X11 Reverse ShellUses xterm with -display to forward a shell over X11 to a remote attacker