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