> 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/user-groups/proxy-group-linux-privilege-escalation.md).

# proxy 组滥用 - Linux 权限提升

## 这是什么

危险的本地组成员关系即使不需要内核漏洞利用，也可能暴露特权资源。docker、lxd、adm 或 proxy 等组可能赋予主机控制权、敏感日志访问权限，或提供对横向移动和提权有用的配置路径。本页具体聚焦于 **用户组（proxy）** 并保持利用流程切合实际：识别条件，安全验证，然后运行证明影响所需的最小载荷。

## 枚举

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

```bash
id
groups
```

## 示例

代理和主机名滥用

通过审计用户的组，我们看到我们属于 proxy 组。我们正在查找相关文件：

<figure><img src="/files/c33841d3d52d7b48e1e58d97af1a53ecdca3808f" alt=""><figcaption></figcaption></figure>

在检查 Squid 日志（`/var/log/squid/access.log.1`）时，我们查找与代理相关的条目和由该组拥有的文件：

```bash
find / -group proxy 2>/dev/null
```

<figure><img src="/files/39dae3a5fb0a33ded2006e8718c3c92da0cfeed4" alt=""><figcaption></figcaption></figure>

我们发现一个内部子域名： `offramp.expressway.htb`.

```bash
cat /var/log/squid/access.log.1 | grep httpp
```

<figure><img src="/files/13bbb16817a418bd741d2b497ae25e889b326a85" alt=""><figcaption></figcaption></figure>

通过检查此特定区域的 sudo 策略，我们发现我们拥有完全权限：

```bash
sudo -h offramp.expressway.htb -l
```

结果：我们可以在此主机上下文中以 root 身份执行任何命令。

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

**最终以 Root 执行：**

```bash
sudo -h offramp.expressway.htb /bin/bash
```

<figure><img src="/files/7014b9bf09fac661dea4b3ab46e63ccc3a36ce8c" 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/user-groups/proxy-group-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.
