Описание
Sliver Vulnerable to Website Path Traversal / Arbitrary File Read (Authenticated)
Summary
A Path Traversal vulnerability in the website content subsystem lets an authenticated operator read arbitrary files on the Sliver server host. This is an authenticated Path Traversal / arbitrary file read issue, and it can expose credentials, configs, and keys.
Affected Component
- Website content management (gRPC):
WebsiteAddContent,Website,Websites - Server-side file read in
Website.ToProtobuf
Impact
- Arbitrary file read as the Sliver server OS user.
- Exposure of sensitive data such as operator configs, TLS keys, tokens, and logs.
Root Cause
The server accepts and persists arbitrary website paths from the operator, then later reads from disk using that path without sanitization or containment.
Vulnerable Code References
server/rpc/rpc-website.go:100— acceptscontent.Pathfrom operator RPC and persists it viawebsite.AddContentserver/db/models/website.go:52— reads from disk withfilepath.Join(webContentDir, webcontent.Path)without validating or constrainingwebcontent.Path
Proof of Concept (PoC)
Steps (local test)
- Build the server:
go build -mod=vendor -tags go_sqlite,server -o sliver-server ./server
- Create an operator config (permission
allfor website operations):./sliver-server operator -n testop -l 127.0.0.1 -p 31337 -P all -o file -s /tmp - Start the daemon:
./sliver-server daemon -l 127.0.0.1 -p 31337
- Run the PoC:
GOFLAGS=-mod=vendor go run ./poc/website_path_traversal.go -config /tmp/testop_127.0.0.1.cfg -website poc-site -target /etc/hosts
PoC Code
Expected Output (example)
Evidence (Screenshots)
Why It Works
WebsiteAddContentaccepts a path like../../../../etc/hostsand stores it.Websitereturns content by callingWebsite.ToProtobuf, which reads from disk using the storedPathvalue.filepath.Joindoes not prevent traversal, so the server reads from outside the web directory.
Recommended Fix
- Validate and reject paths that are absolute or contain
..inWebsiteAddContent(server side). - Canonicalize paths and enforce they remain within the web content directory.
- Avoid reading content by
PathinWebsite.ToProtobuf; read by content ID instead.
Notes
- This issue requires an authenticated operator account with sufficient permissions (
PermissionAll). - The PoC demonstrates reading
/etc/hostsbut can target any readable server file.
Пакеты
github.com/bishopfox/sliver
<= 1.6.10
1.6.11
Связанные уязвимости
Sliver is a command and control framework that uses a custom Wireguard netstack. Prior to 1.6.11, a path traversal in the website content subsystem lets an authenticated operator read arbitrary files on the Sliver server host. This is an authenticated path traversal / arbitrary file read issue, and it can expose credentials, configs, and keys. This vulnerability is fixed in 1.6.11.