hacktricks/pentesting-web/http-connection-contamination.md

46 lines
4.2 KiB
Markdown
Raw Normal View History

# HTTP Connection Contamination
2022-11-07 10:43:41 +00:00
{% 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-11-07 10:43:41 +00:00
<details>
2022-11-07 10:43:41 +00:00
<summary>Support HackTricks</summary>
2024-02-03 12:22:53 +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-11-07 10:43:41 +00:00
</details>
{% endhint %}
2022-11-07 10:43:41 +00:00
**Ovo je sažetak posta: [https://portswigger.net/research/http-3-connection-contamination](https://portswigger.net/research/http-3-connection-contamination)**. Proverite ga za dodatne detalje!
2022-11-07 10:43:41 +00:00
Web pretraživači mogu ponovo koristiti jednu HTTP/2+ vezu za različite veb sajtove putem [HTTP connection coalescing](https://daniel.haxx.se/blog/2016/08/18/http2-connection-coalescing), pod uslovom da imaju zajedničke IP adrese i zajednički TLS sertifikat. Međutim, ovo može doći u sukob sa **first-request routing** u reverznim proxy-ima, gde se naredni zahtevi usmeravaju na pozadinu određenu prvim zahtevom. Ova pogrešna usmeravanja mogu dovesti do sigurnosnih ranjivosti, posebno kada se kombinuju sa wildcard TLS sertifikatima i domenima kao što je `*.example.com`.
2022-11-07 10:43:41 +00:00
Na primer, ako `wordpress.example.com` i `secure.example.com` oboje koriste isti reverzni proxy i imaju zajednički wildcard sertifikat, koalescing veze u pretraživaču može dovesti do toga da zahtevi za `secure.example.com` budu pogrešno obrađeni od strane WordPress pozadine, iskorišćavajući ranjivosti kao što je XSS.
2022-11-07 10:43:41 +00:00
Da biste posmatrali koalescing veze, možete koristiti Chrome-ovu karticu Mreža ili alate kao što je Wireshark. Evo isječka za testiranje:
2022-11-07 10:43:41 +00:00
```javascript
fetch('//sub1.hackxor.net/', {mode: 'no-cors', credentials: 'include'}).then(()=>{ fetch('//sub2.hackxor.net/', {mode: 'no-cors', credentials: 'include'}) })
```
Pretnja je trenutno ograničena zbog retkosti usmeravanja prvog zahteva i složenosti HTTP/2. Međutim, predložene promene u HTTP/3, koje opuštaju zahtev za podudaranje IP adrese, mogle bi proširiti površinu napada, čineći servere sa wildcard sertifikatom ranjivijim bez potrebe za MITM napadom.
2022-11-07 10:43:41 +00:00
Najbolje prakse uključuju izbegavanje usmeravanja prvog zahteva u obrnutim proxy-ima i opreznost sa wildcard TLS sertifikatima, posebno sa pojavom HTTP/3. Redovno testiranje i svest o ovim složenim, međusobno povezanim ranjivostima su ključni za održavanje bezbednosti veba.
2022-11-07 10:43:41 +00:00
{% 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-11-07 10:43:41 +00:00
<details>
2022-11-07 10:43:41 +00:00
<summary>Support HackTricks</summary>
2024-02-03 12:22:53 +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-11-07 10:43:41 +00:00
</details>
{% endhint %}