Summary
RedAmon's kali-sandbox terminal server can expose an interactive root shell without requiring authentication. An unauthenticated attacker who can reach its WebSocket listener on port 8016 may send commands to the shell inside the container.
Affected context
The issue affects RedAmon deployments using the kali-sandbox terminal server when its WebSocket listener is reachable without authentication. The risk is particularly relevant when port 8016 can be reached from co-resident containers or through the host loopback interface.
Exploit preconditions
- Attack surface: The kali-sandbox terminal server's WebSocket listener on port 8016
- Required access: Network reachability to the listener; no authentication is required
- Trigger point: A connection to the listener, which is attached to an interactive
/bin/bashsession - Why exploitation is possible: The server accepts terminal input without verifying the client's identity, allowing a reachable client to issue commands as root inside the container
Why this happens
The terminal server exposes a privileged interactive shell without an authentication check. This is a missing authentication weakness, mapped to CWE-306, because the application does not verify a user's identity before granting access to a security-sensitive function.
Potential impact
- An attacker could execute commands as root inside the kali-sandbox container.
- Container data and processes may be accessed, altered, or disrupted.
- An attacker may use the compromised container to attempt further access, depending on its permissions and network connectivity.
- Container or host resources could be affected if the deployment grants access beyond the sandbox.
General mitigation guidance
Reduce exposure of the terminal service and require strong authentication and authorization before granting interactive shell access. Prefer secure-by-default configurations that keep administrative interfaces disabled or bound to a restricted interface unless explicitly needed. Limit access to port 8016 through network segmentation and firewall policy, avoid trusting co-resident workloads by default, and run the container with least privilege and restricted capabilities.
How teams detect issues like this
Review service configuration and code for WebSocket handlers that expose shell or terminal sessions without authentication or authorization checks. Use static analysis and code review to trace connections from listener setup to command or terminal input handling. Enforce deployment policies that restrict exposure of port 8016 and require authenticated access to administrative interfaces. Monitor connection logs and unexpected interactive shell activity where available.

