hacktricks/pentesting-web/http-connection-request-smuggling.md

62 lines
3.9 KiB
Markdown
Raw Normal View History

# HTTP Connection Request Smuggling
{% hint style="success" %}
Learn & practice AWS Hacking:<img src="/.gitbook/assets/arte.png" alt="" data-size="line">[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)<img src="/.gitbook/assets/arte.png" alt="" data-size="line">\
Learn & practice GCP Hacking: <img src="/.gitbook/assets/grte.png" alt="" data-size="line">[**HackTricks Training GCP Red Team Expert (GRTE)**<img src="/.gitbook/assets/grte.png" alt="" data-size="line">](https://training.hacktricks.xyz/courses/grte)
2022-08-21 14:40:42 +00:00
<details>
<summary>Support HackTricks</summary>
2022-08-21 14:40:42 +00:00
* 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.
2022-08-21 14:40:42 +00:00
</details>
{% endhint %}
2022-08-21 14:40:42 +00:00
**Ovo je sažetak posta** [**https://portswigger.net/research/browser-powered-desync-attacks**](https://portswigger.net/research/browser-powered-desync-attacks)
2022-08-21 14:40:42 +00:00
## Napadi na stanje veze <a href="#state" id="state"></a>
2022-08-21 14:40:42 +00:00
### Validacija prvog zahteva
2022-08-21 14:40:42 +00:00
Kada usmeravaju zahteve, reverzni proksi mogu zavisiti od **Host header** da odrede odredišni back-end server, često se oslanjajući na belu listu hostova kojima je dozvoljen pristup. Međutim, postoji ranjivost u nekim proksijima gde se bela lista primenjuje samo na inicijalni zahtev u vezi. Kao rezultat, napadači bi mogli iskoristiti ovo tako što bi prvo poslali zahtev ka dozvoljenom hostu, a zatim tražili interni sajt kroz istu vezu:
```
2022-08-21 14:40:42 +00:00
GET / HTTP/1.1
2024-02-06 03:10:38 +00:00
Host: [allowed-external-host]
2022-08-21 14:40:42 +00:00
GET / HTTP/1.1
2024-02-06 03:10:38 +00:00
Host: [internal-host]
2022-08-21 14:40:42 +00:00
```
### Prvo-zahtjev Usmjeravanje
2022-08-21 14:40:42 +00:00
U nekim konfiguracijama, front-end server može koristiti **Host zaglavlje prvog zahtjeva** da odredi pozadinsko usmjeravanje za taj zahtjev, a zatim trajno usmjerava sve naredne zahtjeve iz iste klijentske veze na istu pozadinsku vezu. Ovo se može demonstrirati kao:
```
2022-08-21 14:40:42 +00:00
GET / HTTP/1.1
Host: example.com
POST /pwreset HTTP/1.1
Host: psres.net
```
Ovaj problem se potencijalno može kombinovati sa [napadima na Host header](https://portswigger.net/web-security/host-header), kao što su trovanje resetovanjem lozinke ili [trovanje web kešom](https://portswigger.net/web-security/web-cache-poisoning), kako bi se iskoristile druge ranjivosti ili dobio neovlašćen pristup dodatnim virtuelnim hostovima.
2022-08-21 14:40:42 +00:00
{% hint style="info" %}
Da bi se identifikovale ove ranjivosti, može se iskoristiti funkcija 'connection-state probe' u HTTP Request Smuggler.
2022-08-21 14:40:42 +00:00
{% endhint %}
{% hint style="success" %}
Učite i vežbajte AWS Hacking:<img src="/.gitbook/assets/arte.png" alt="" data-size="line">[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)<img src="/.gitbook/assets/arte.png" alt="" data-size="line">\
Učite i vežbajte GCP Hacking: <img src="/.gitbook/assets/grte.png" alt="" data-size="line">[**HackTricks Training GCP Red Team Expert (GRTE)**<img src="/.gitbook/assets/grte.png" alt="" data-size="line">](https://training.hacktricks.xyz/courses/grte)
2022-11-04 15:54:08 +00:00
<details>
2022-08-21 14:40:42 +00:00
<summary>Podržite HackTricks</summary>
2022-08-21 14:40:42 +00:00
* Proverite [**planove pretplate**](https://github.com/sponsors/carlospolop)!
* **Pridružite se** 💬 [**Discord grupi**](https://discord.gg/hRep4RUj7f) ili [**telegram grupi**](https://t.me/peass) ili **pratite** nas na **Twitteru** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
* **Podelite hakerske trikove slanjem PR-ova na** [**HackTricks**](https://github.com/carlospolop/hacktricks) i [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repozitorijume.
2022-08-21 14:40:42 +00:00
</details>
{% endhint %}