> For the complete documentation index, see [llms.txt](https://hacktricks.xsx.tw/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hacktricks.xsx.tw/network-services-pentesting/3128-pentesting-squid.md).

# 3128 - Pentesting Squid

<details>

<summary><strong>从零开始学习AWS黑客技术，成为专家</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE（HackTricks AWS Red Team Expert）</strong></a><strong>！</strong></summary>

其他支持HackTricks的方式：

* 如果您想看到您的**公司在HackTricks中做广告**或**下载PDF格式的HackTricks**，请查看[**订阅计划**](https://github.com/sponsors/carlospolop)!
* 获取[**官方PEASS & HackTricks周边产品**](https://peass.creator-spring.com)
* 探索[**PEASS家族**](https://opensea.io/collection/the-peass-family)，我们的独家[**NFTs**](https://opensea.io/collection/the-peass-family)
* **加入** 💬 [**Discord群**](https://discord.gg/hRep4RUj7f) 或 [**电报群**](https://t.me/peass) 或 **关注**我们的**Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**。**
* 通过向[**HackTricks**](https://github.com/carlospolop/hacktricks)和[**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github仓库提交PR来分享您的黑客技巧。

</details>

## 基本信息

来自[Wikipedia](https://en.wikipedia.org/wiki/Squid_\(software\))：

> **Squid**是一个缓存和转发的HTTP网络代理。它有各种用途，包括通过缓存重复请求来加快Web服务器的速度，为共享网络资源的一组人员缓存Web、DNS和其他计算机网络查找，并通过过滤流量来帮助安全性。尽管主要用于HTTP和FTP，Squid还包括对几种其他协议的有限支持，包括Internet Gopher、SSL、TLS和HTTPS。与Privoxy不同，Squid不支持SOCKS协议，但可以与Privoxy一起使用以提供SOCKS支持。

**默认端口：** 3128

```
PORT     STATE  SERVICE      VERSION
3128/tcp open   http-proxy   Squid http proxy 4.11
```

## 枚举

### Web代理

您可以尝试将发现的服务设置为浏览器中的代理。但是，如果它配置了HTTP身份验证，您将被要求输入用户名和密码。

```bash
# Try to proxify curl
curl --proxy http://10.10.11.131:3128 http://10.10.11.131
```

### Nmap 代理化

您还可以尝试滥用代理来**扫描内部端口并代理 nmap**。\
配置 proxychains 使用 squid 代理，在 proxichains.conf 文件末尾添加以下行：`http 10.10.10.10 3128`。\
对于需要身份验证的代理，通过在配置中包含用户名和密码来附加凭据：`http 10.10.10.10 3128 username passw0rd`。

然后使用 proxychains 运行 nmap 来**从本地扫描主机**：`proxychains nmap -sT -n -p- localhost`

### SPOSE 扫描器

另外，可以使用 Squid Pivoting Open Port Scanner ([spose.py](https://github.com/aancw/spose))。

```bash
python spose.py --proxy http://10.10.11.131:3128 --target 10.10.11.131
```

<details>

<summary><strong>从零开始学习AWS黑客技术，成为专家</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE（HackTricks AWS红队专家）</strong></a><strong>！</strong></summary>

其他支持HackTricks的方式：

* 如果您想看到您的**公司在HackTricks中做广告**或**下载PDF格式的HackTricks**，请查看[**订阅计划**](https://github.com/sponsors/carlospolop)!
* 获取[**官方PEASS & HackTricks周边产品**](https://peass.creator-spring.com)
* 探索[**PEASS家族**](https://opensea.io/collection/the-peass-family)，我们的独家[**NFTs**](https://opensea.io/collection/the-peass-family)
* **加入** 💬 [**Discord群**](https://discord.gg/hRep4RUj7f) 或 [**电报群**](https://t.me/peass) 或 **关注**我们的**Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**。**
* 通过向[**HackTricks**](https://github.com/carlospolop/hacktricks)和[**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github仓库提交PR来分享您的黑客技巧。

</details>
