{% 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 %} ## CONNECT 방법 Go ν”„λ‘œκ·Έλž˜λ° μ–Έμ–΄μ—μ„œ HTTP μš”μ²­μ„ μ²˜λ¦¬ν•  λ•Œ, 특히 `net/http` 라이브러리λ₯Ό μ‚¬μš©ν•  λ•Œ 일반적인 관행은 μš”μ²­ 경둜λ₯Ό ν‘œμ€€ν™”λœ ν˜•μ‹μœΌλ‘œ μžλ™ λ³€ν™˜ν•˜λŠ” κ²ƒμž…λ‹ˆλ‹€. 이 과정은 λ‹€μŒμ„ ν¬ν•¨ν•©λ‹ˆλ‹€: - `/`둜 λλ‚˜λŠ” 경둜(` /flag/`)λŠ” μŠ¬λž˜μ‹œκ°€ μ—†λŠ” λŒ€μ‘ 경둜인 `/flag`둜 λ¦¬λ””λ ‰μ…˜λ©λ‹ˆλ‹€. - `/../flag`와 같은 디렉토리 탐색 μ‹œν€€μŠ€λ₯Ό ν¬ν•¨ν•˜λŠ” κ²½λ‘œλŠ” λ‹¨μˆœν™”λ˜μ–΄ `/flag`둜 λ¦¬λ””λ ‰μ…˜λ©λ‹ˆλ‹€. - `/flag/.`와 같이 ν›„ν–‰ λ§ˆμΉ¨ν‘œκ°€ μžˆλŠ” κ²½λ‘œλ„ κΉ¨λ—ν•œ 경둜인 `/flag`둜 λ¦¬λ””λ ‰μ…˜λ©λ‹ˆλ‹€. κ·ΈλŸ¬λ‚˜ `CONNECT` 방법을 μ‚¬μš©ν•  λ•Œ μ˜ˆμ™Έκ°€ κ΄€μ°°λ©λ‹ˆλ‹€. λ‹€λ₯Έ HTTP 방법과 달리 `CONNECT`λŠ” 경둜 μ •κ·œν™” ν”„λ‘œμ„ΈμŠ€λ₯Ό νŠΈλ¦¬κ±°ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. 이 λ™μž‘μ€ 보호된 λ¦¬μ†ŒμŠ€μ— μ ‘κ·Όν•  수 μžˆλŠ” 잠재적인 경둜λ₯Ό μ—΄μ–΄μ€λ‹ˆλ‹€. `curl`μ—μ„œ `--path-as-is` μ˜΅μ…˜κ³Ό ν•¨κ»˜ `CONNECT` 방법을 μ‚¬μš©ν•˜λ©΄ ν‘œμ€€ 경둜 μ •κ·œν™”λ₯Ό μš°νšŒν•˜κ³  μ œν•œλœ μ˜μ—­μ— 도달할 수 μžˆμŠ΅λ‹ˆλ‹€. λ‹€μŒ λͺ…령은 이 λ™μž‘μ„ μ•…μš©ν•˜λŠ” 방법을 λ³΄μ—¬μ€λ‹ˆλ‹€: ```bash curl --path-as-is -X CONNECT http://gofs.web.jctf.pro/../flag ``` [https://github.com/golang/go/blob/9bb97ea047890e900dae04202a231685492c4b18/src/net/http/server.go\#L2354-L2364](https://github.com/golang/go/blob/9bb97ea047890e900dae04202a231685492c4b18/src/net/http/server.go#L2354-L2364) {% 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) github 리포지토리에 PR을 μ œμΆœν•˜μ—¬ ν•΄ν‚Ή νŒμ„ κ³΅μœ ν•˜μ„Έμš”.**
{% endhint %}