{% 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 %}