diff --git a/.gitbook/assets/image (1) (3) (2) (1).png b/.gitbook/assets/image (1) (3) (2) (1).png new file mode 100644 index 000000000..42cd08409 Binary files /dev/null and b/.gitbook/assets/image (1) (3) (2) (1).png differ diff --git a/.gitbook/assets/image (1) (3) (2).png b/.gitbook/assets/image (1) (3) (2).png index 42cd08409..aa0bbae17 100644 Binary files a/.gitbook/assets/image (1) (3) (2).png and b/.gitbook/assets/image (1) (3) (2).png differ diff --git a/.gitbook/assets/image (1) (3).png b/.gitbook/assets/image (1) (3).png index aa0bbae17..9b4be1f50 100644 Binary files a/.gitbook/assets/image (1) (3).png and b/.gitbook/assets/image (1) (3).png differ diff --git a/.gitbook/assets/image (1).png b/.gitbook/assets/image (1).png index 9b4be1f50..3e0f45008 100644 Binary files a/.gitbook/assets/image (1).png and b/.gitbook/assets/image (1).png differ diff --git a/README.md b/README.md index 7ab2aed12..374b8578e 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ You can check their **blog** in [**https://blog.stmcyber.com**](https://blog.stm ### [RootedCON](https://www.rootedcon.com/) -
+
[**RootedCON**](https://www.rootedcon.com) is the most relevant cybersecurity event in **Spain** and one of the most important in **Europe**. With **the mission of promoting technical knowledge**, this congress is a boiling meeting point for technology and cybersecurity professionals in every discipline. @@ -74,15 +74,15 @@ Get Access Today: **HackenProof is home to all crypto bug bounties.** **Get rewarded without delays**\ -****HackenProof bounties launch only when their customers deposit the reward budget. You'll get the reward after the bug is verified. +\*\*\*\*HackenProof bounties launch only when their customers deposit the reward budget. You'll get the reward after the bug is verified. **Get experience in web3 pentesting**\ -****Blockchain protocols and smart contracts are the new Internet! Master web3 security at its rising days. +\*\*\*\*Blockchain protocols and smart contracts are the new Internet! Master web3 security at its rising days. **Become the web3 hacker legend**\ -****Gain reputation points with each verified bug and conquer the top of the weekly leaderboard. +\*\*\*\*Gain reputation points with each verified bug and conquer the top of the weekly leaderboard. -[**Sign up on HackenProof**](https://hackenproof.com/register?referral_code=i_E6M25i_Um9gB56o-XsIA) to start earning from your hacks! +[**Sign up on HackenProof**](https://hackenproof.com/register?referral\_code=i\_E6M25i\_Um9gB56o-XsIA) to start earning from your hacks! {% embed url="https://hackenproof.com/register?referral_code=i_E6M25i_Um9gB56o-XsIA" %} diff --git a/SUMMARY.md b/SUMMARY.md index 8c8f95dfc..b20c8f435 100644 --- a/SUMMARY.md +++ b/SUMMARY.md @@ -498,6 +498,7 @@ * [File Upload](pentesting-web/file-upload/README.md) * [PDF Upload - XXE and CORS bypass](pentesting-web/file-upload/pdf-upload-xxe-and-cors-bypass.md) * [Formula/CSV/Doc/LaTeX Injection](pentesting-web/formula-doc-latex-injection.md) +* [HTTP Connection Contamination](pentesting-web/http-connection-contamination.md) * [HTTP Connection Request Smuggling](pentesting-web/http-connection-request-smuggling.md) * [HTTP Request Smuggling / HTTP Desync Attack](pentesting-web/http-request-smuggling/README.md) * [Browser HTTP Request Smuggling](pentesting-web/http-request-smuggling/browser-http-request-smuggling.md) diff --git a/network-services-pentesting/5985-5986-pentesting-omi.md b/network-services-pentesting/5985-5986-pentesting-omi.md index 5e30d56bf..a305ac89c 100644 --- a/network-services-pentesting/5985-5986-pentesting-omi.md +++ b/network-services-pentesting/5985-5986-pentesting-omi.md @@ -25,7 +25,7 @@ OMI is an [open-source](https://github.com/microsoft/omi) remote configuration m When these services are configured, the omiengine process will listen on all interfaces and being running as the root user. -
+
**Default port:** 5985(http), 5986(https) diff --git a/pentesting-web/http-connection-contamination.md b/pentesting-web/http-connection-contamination.md new file mode 100644 index 000000000..4bc5b7a1f --- /dev/null +++ b/pentesting-web/http-connection-contamination.md @@ -0,0 +1,77 @@ +# HTTP Connection Contamination + +
+ +Support HackTricks and get benefits! + +* Do you work in a **cybersecurity company**? Do you want to see your **company advertised in HackTricks**? or do you want to have access to the **latest version of the PEASS or download HackTricks in PDF**? Check the [**SUBSCRIPTION PLANS**](https://github.com/sponsors/carlospolop)! +* Discover [**The PEASS Family**](https://opensea.io/collection/the-peass-family), our collection of exclusive [**NFTs**](https://opensea.io/collection/the-peass-family) +* Get the [**official PEASS & HackTricks swag**](https://peass.creator-spring.com) +* **Join the** [**💬**](https://emojipedia.org/speech-balloon/) [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** me on **Twitter** [**🐦**](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md)[**@carlospolopm**](https://twitter.com/carlospolopm)**.** +* **Share your hacking tricks by submitting PRs to the** [**hacktricks github repo**](https://github.com/carlospolop/hacktricks)**.** + +
+ +**The content of this post was taken from** [**https://portswigger.net/research/http-3-connection-contamination**](https://portswigger.net/research/http-3-connection-contamination)**** + +Web browsers use [**HTTP connection coalescing**](https://daniel.haxx.se/blog/2016/08/18/http2-connection-coalescing), which lets them **reuse** a single **HTTP/2+** **connection** for requests going to **different websites**, provided that the sites **resolve to the same IP** address and use a TLS certificate valid for both hostnames. + +**First-request routing** is a dangerous reverse-proxy behaviour where the **proxy analyses the first request** on a connection to work out **which back-end end** to route it to, and then **sends** all **subsequent requests** on that connection to the **same back-end**. + +**Connection coalescing and first-request routing do not play well together**. For example, imagine secure.example.com and wordpress.example.com are both sat behind a reverse proxy using a certificate valid for \*.example.com: + +```shell-session +$ nslookup wordpress.example.com +52.16.179.7 // reverse proxy that supports HTTP/2 and does first-request routing + +$ nslookup secure.example.com +52.16.179.7 // same reverse proxy + +$ openssl s_client -connect x.portswigger-labs.net:443 +subject=/CN=*.example.com // wildcard TLS certificate +``` + +If a browser tries to send a **request to wordpress.example.com** **followed by secure.example.com**, browser connection coalescing will force **both requests down a single connection** to the front-end. First-request routing will result in the **request to secure.example.com incorrectly being routed to the WordPress back-end**. This means that if you find [XSS](https://portswigger.net/web-security/cross-site-scripting) on wordpress.example.com, you can use it to compromise secure.example.com! + +```javascript +// create HTTP/2+ connection +fetch('https://wordpress.example.com/', {credentials: 'include'}) + +// connection coalescing will force this down the same connection... +// ...leading to the front-end misrouting it to WordPress +// the browser thinks our injected JS is coming from secure.example.com +// exposing saved passwords, cookies, etc. +location='https://secure.example.com/plugin/x?q=