{% hint style="success" %}
Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
Support HackTricks
* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
* **Join the** ๐ฌ [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** ๐ฆ [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
{% endhint %}
# ๊ธฐ๋ณธ ์ ๋ณด
From [Wikipedia](https://en.wikipedia.org/wiki/Squid\_\(software\)):
> **Squid**๋ ์บ์ฑ ๋ฐ ํฌ์๋ฉ HTTP ์น ํ๋ก์์
๋๋ค. ๋ฐ๋ณต ์์ฒญ์ ์บ์ฑํ์ฌ ์น ์๋ฒ์ ์๋๋ฅผ ๋์ด๊ณ , ๋คํธ์ํฌ ๋ฆฌ์์ค๋ฅผ ๊ณต์ ํ๋ ์ฌ๋๋ค์ ์ํ ์น, DNS ๋ฐ ๊ธฐํ ์ปดํจํฐ ๋คํธ์ํฌ ์กฐํ๋ฅผ ์บ์ฑํ๋ฉฐ, ํธ๋ํฝ ํํฐ๋ง์ ํตํด ๋ณด์์ ์ง์ํ๋ ๋ฑ ๋ค์ํ ์ฉ๋๋ก ์ฌ์ฉ๋ฉ๋๋ค. ์ฃผ๋ก HTTP์ FTP์ ์ฌ์ฉ๋์ง๋ง, Squid๋ Internet Gopher, SSL, TLS ๋ฐ HTTPS๋ฅผ ํฌํจํ ์ฌ๋ฌ ๋ค๋ฅธ ํ๋กํ ์ฝ์ ๋ํ ์ ํ๋ ์ง์์ ํฌํจํฉ๋๋ค. Squid๋ Privoxy์ ๋ฌ๋ฆฌ SOCKS ํ๋กํ ์ฝ์ ์ง์ํ์ง ์์ผ๋ฉฐ, SOCKS ์ง์์ ์ ๊ณตํ๊ธฐ ์ํด Squid์ ํจ๊ป ์ฌ์ฉํ ์ ์์ต๋๋ค.
**๊ธฐ๋ณธ ํฌํธ:** 3128
```
PORT STATE SERVICE VERSION
3128/tcp open http-proxy Squid http proxy 4.11
```
# Enumeration
## Web Proxy
์ด ๋ฐ๊ฒฌ๋ ์๋น์ค๋ฅผ ๋ธ๋ผ์ฐ์ ์์ ํ๋ก์๋ก ์ค์ ํด ๋ณผ ์ ์์ต๋๋ค. ๊ทธ๋ฌ๋ HTTP ์ธ์ฆ์ผ๋ก ๊ตฌ์ฑ๋์ด ์๋ค๋ฉด ์ฌ์ฉ์ ์ด๋ฆ๊ณผ ๋น๋ฐ๋ฒํธ๋ฅผ ์
๋ ฅํ๋ผ๋ ๋ฉ์์ง๊ฐ ํ์๋ฉ๋๋ค.
```bash
# Try to proxify curl
curl --proxy http://10.10.11.131:3128 http://10.10.11.131
```
## Nmap proxified
ํ๋ก์๋ฅผ ์
์ฉํ์ฌ **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 Scanner
๋์์ผ๋ก, 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
```
{% hint style="success" %}
AWS ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
GCP ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
HackTricks ์ง์ํ๊ธฐ
* [**๊ตฌ๋
๊ณํ**](https://github.com/sponsors/carlospolop) ํ์ธํ๊ธฐ!
* **๐ฌ [**Discord ๊ทธ๋ฃน**](https://discord.gg/hRep4RUj7f) ๋๋ [**ํ
๋ ๊ทธ๋จ ๊ทธ๋ฃน**](https://t.me/peass)์ ์ฐธ์ฌํ๊ฑฐ๋ **Twitter** ๐ฆ [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**๋ฅผ ํ๋ก์ฐํ์ธ์.**
* **[**HackTricks**](https://github.com/carlospolop/hacktricks) ๋ฐ [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) ๊นํ๋ธ ๋ฆฌํฌ์งํ ๋ฆฌ์ PR์ ์ ์ถํ์ฌ ํดํน ํ์ ๊ณต์ ํ์ธ์.**
{% endhint %}