Описание
Sliver Allows Authenticated Operator-to-Server Remote Code Execution
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, "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.
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.
The latest server version is targeted:
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:
The other injected flags are to force a Linux payload, and not necessary if running the Sliver server on Windows.
If you check the saved implant locally on the client, it's 0 bytes as the output got written to the file on the server instead.
On the attacking machine, setup a netcat shell:
Trigger the stager by running a command which executes /root/.sliver/go/bin/go:
A root shell will pop:
The vulnerable code was introduced in https://github.com/BishopFox/sliver/pull/1281
Ссылки
- https://github.com/BishopFox/sliver/security/advisories/GHSA-hc5w-gxxr-w8x8
- https://nvd.nist.gov/vuln/detail/CVE-2024-41111
- https://github.com/BishopFox/sliver/issues/65
- https://github.com/BishopFox/sliver/pull/1281
- https://github.com/BishopFox/sliver/commit/0deaee625d14c6f05f63c86e5c3b7ae623a1138f
- https://github.com/BishopFox/sliver/commit/5016fb8d7cdff38c79e22e8293e58300f8d3bd57
- https://github.com/BishopFox/sliver/commit/d8ff64222dc69d931197d0bbae3fba11dbe17533
- https://sliver.sh/docs?name=Multi-player+Mode
Пакеты
github.com/bishopfox/sliver
>= 1.5.40, <= 1.6.0-dev
1.6.0
Связанные уязвимости
Sliver is an open source cross-platform adversary emulation/red team framework, it can be used by organizations of all sizes to perform security testing. 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. The exploit is pretty fun as we make the Sliver server pwn itself. As described in a past issue (#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. This issue has not yet be addressed but is expected to be resolved before the full release of version 1.6.0. Users of the 1.6.0 prerelease should avoid using Silver in production.