> 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/permissions/smart-enumeration-linux-privilege-escalation.md).

# 智能枚举 - Linux 权限提升

## 这是什么

基于权限的提权会滥用可写文件、薄弱的所有权设置、暴露的机密，或本应只由 root 控制的敏感路径。小小的权限错误一旦影响到认证文件或特权执行路径，就可能直接变成 root 访问。此页面具体聚焦于 **智能枚举工具** 并保持利用流程切合实际：识别条件，安全验证，然后运行证明影响所需的最小载荷。

## 枚举

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

```bash
find / -writable 2>/dev/null
ls -la /etc/passwd /etc/shadow 2>/dev/null
```

## 示例

{% embed url="<https://github.com/diego-treitos/linux-smart-enumeration>" %}

> LSE 的设计旨在易于使用，并提供清晰易读的输出，以便于识别安全问题。该工具使用标准 Linux 命令并在命令行上运行，这意味着无需额外软件。此外，它还列出广泛的系统信息，包括用户、组、服务、开放端口、计划任务、文件权限、环境变量和防火墙配置等。

<figure><img src="/files/2ad1adc57d51015c512ca43f10aa3d2db2e07774" alt=""><figcaption></figcaption></figure>

它检测到通过 /etc/passwd 可能存在一个漏洞：

<figure><img src="/files/3ed8ca1ef9982cb36de568aa71bb0bdbacd2996d" 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/permissions/smart-enumeration-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.
