Skip to content

Reverse Shell Listener

This listener creates a simple TCP connection for handling terminal input/output (stdin/stdout) redirected through a socket. It's designed for manual connections (e.g., using netcat) and is not intended for use with generated agents.

Plugin ID: shelldot.listener.generic-reverse-tcp

Configuration

The named default configuration uses port 4444 and a 10 MiB input buffer. Both port and inputBufferSize are required when sending a configuration.

Parameter Type Required Default Description
port int Yes None TCP port from 1 to 65535 for shell connections.
inputBufferSize int Yes None Maximum input buffer size, from 1024 to 2147483647 bytes.
parseShellContextMetadata bool No true Fill agent metadata from supported shell-context messages.

Shell context and raw input

The listener can extract metadata from supported OSC 3008 shell-context messages. This depends on the connecting shell emitting those messages; ordinary shell output alone does not guarantee metadata. Set parseShellContextMetadata to false to disable parsing.

The reverse-shell command accepts input (default empty string) and raw (default false). With raw: true, it sends input verbatim without appending a line ending. Use this when an interactive program needs exact input bytes. Normal command input continues to append a line ending. Output handling also preserves fragmented UTF-8 text and drains pending results during shutdown.

Operation Details

Feature Description
Connection Type Basic TCP connection for terminal I/O
Primary Use Direct shell sessions via tools like netcat
Agent Support Not designed for generated agents
Communication Real-time terminal input/output over TCP

Note: This listener prioritizes simplicity and direct access over advanced features, making it ideal for quick troubleshooting or direct command execution.