> For the complete documentation index, see [llms.txt](https://hacking-notes.jord4n.pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hacking-notes.jord4n.pro/zh/privesc/suid/suid-base64-linux-privilege-escalation.md).

# SUID（Base64）- Linux 权限提升

## 这是什么

SUID 二进制文件以其所有者的权限执行，通常是 root。存在漏洞、过时或过于灵活的 SUID 二进制文件可以读取受保护文件、启动具有特权的 shell，或执行由攻击者控制的代码。这个特定页面重点关注 **SUID（Base64）** 并保持利用流程切合实际：识别条件，安全验证，然后运行证明影响所需的最小载荷。

## 枚举

在运行利用路径之前，先确认本地上下文和具体的错误配置。

```bash
find / -perm -4000 -type f 2>/dev/null
```

## 示例

### Base64 示例

搜索 [GTFOBins](https://gtfobins.github.io/) 并按……筛选 **Base64**:

<figure><img src="/files/106a3f4a1f689a3af295d52f61bb67c081378148" alt=""><figcaption></figcaption></figure>

如果我们尝试使用……查看该文件 **cat**，我们没有权限，但如果我们 **转换为 Base64** 将该文件转换后再重新转换回来，我们就能看到内容：

<figure><img src="/files/3592ff7e4857b3503fd15130b28e5a798d445565" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://hacking-notes.jord4n.pro/zh/privesc/suid/suid-base64-linux-privilege-escalation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
