Learn & practice AWS Hacking:<imgsrc="/.gitbook/assets/arte.png"alt=""data-size="line">[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)<imgsrc="/.gitbook/assets/arte.png"alt=""data-size="line">\
Learn & practice GCP Hacking: <imgsrc="/.gitbook/assets/grte.png"alt=""data-size="line">[**HackTricks Training GCP Red Team Expert (GRTE)**<imgsrc="/.gitbook/assets/grte.png"alt=""data-size="line">](https://training.hacktricks.xyz/courses/grte)
* 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.
Katika [**Sekaictf2022 - safelist**](https://github.com/project-sekai-ctf/sekaictf-2022/tree/main/web/safelist/solution) changamoto, [**@Strellic\_**](https://twitter.com/Strellic\_) anatoa mfano wa jinsi ya kutumia **mabadiliko** ya mbinu ya **Connection Pool** kutekeleza **XS-Leak**.
Katika changamoto hii, lengo ni kutolewa bendera ambayo itaonekana katika kikao cha wavuti cha bots ndani ya chapisho. Hizi ndizo mali ambazo mshambuliaji ana:
* **Bot** itakayo **tembelea****URL** iliyotolewa na mshambuliaji
* Mshambuliaji anaweza **kuingiza HTML** kwenye ukurasa (lakini hakuna JS, dompurify inatumika) akitumia **CSRF** kufanya **bot kuunda chapisho** na HTML hiyo.
* Mshambuliaji anaweza kutumia CSRF kufanya **bot****ifute****chapisho** la **kwanza** ndani ya wavuti.
* Kwa sababu **chapisho** zimepangwa **kikaboni**, wakati **chapisho la kwanza linapofutwa**, ikiwa **maudhui ya HTML** ya mshambuliaji yana **pakizwa** inamaanisha kwamba ilikuwa **kaboni kabla ya bendera**.
Ikiwa **chapisho kilichofutwa** kilikuwa **bendera**, hii inamaanisha kwamba **picha** zote **zilizoingizwa** kwenye HTML zitakuwa **zinapigana** na **maombi 5 ya nasibu** kwa ajili ya hiyo **soketi isiyozuiwa**. Hii inamaanisha kwamba muda uliopimwa utakuwa mkubwa kuliko hali nyingine.
Ikiwa **chapisho kilichofutwa** kilikuwa **HTML**, **maombi 5 ya nasibu** yatakuwa **haraka** kwa sababu hayahitaji kupigana kwa hiyo soketi na HTML iliyoungizwa.
Hii ni msimbo wa exploit, uliochukuliwa kutoka [https://github.com/project-sekai-ctf/sekaictf-2022/blob/main/web/safelist/solution/solve.html](https://github.com/project-sekai-ctf/sekaictf-2022/blob/main/web/safelist/solution/solve.html):
Mbinu sawa lakini msimbo tofauti kutoka [https://blog.huli.tw/2022/10/05/en/sekaictf2022-safelist-xsleak/](https://blog.huli.tw/2022/10/05/en/sekaictf2022-safelist-xsleak/)
Katika kesi hii, hatua ya kwanza ya exploit ilikuwa kutumia CSRF kubadilisha ukurasa ambapo bendera inapatikana ili iwe na **maudhui mengi zaidi** (na hivyo kuifanya kuchukua muda mrefu zaidi kuipakia), na kisha **kutumia connection pool kupima muda inachukua kufikia ukurasa** ambao unaweza kuwa na bendera.
* Anza bruteforcing kwa kufikia ukurasa wa uwezekano wenye bendera
* Ukurasa wa uwezekano utafikiriwa na mara moja URL inayodhibitiwa na mshambuliaji pia itafikiwa ili kuangalia ni muda gani maombi yote mawili yanachukua.
<p>Step 1: CSRF the admin user, to set a super long title for the flag note (LAX + POST form only possible for 2 minutes after cookies is created)</p>
<buttononclick="csrf()">do csrf</button>
<p>Step 2: XS-Search with <ahref="https://xsleaks.dev/docs/attacks/timing-attacks/connection-pool/">connection-pool timing leak</a>, we have to use window.open (LAX cookie)</p>
Jifunze na fanya mazoezi ya AWS Hacking:<imgsrc="/.gitbook/assets/arte.png"alt=""data-size="line">[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)<imgsrc="/.gitbook/assets/arte.png"alt=""data-size="line">\
Jifunze na fanya mazoezi ya GCP Hacking: <imgsrc="/.gitbook/assets/grte.png"alt=""data-size="line">[**HackTricks Training GCP Red Team Expert (GRTE)**<imgsrc="/.gitbook/assets/grte.png"alt=""data-size="line">](https://training.hacktricks.xyz/courses/grte)
* Angalia [**mpango wa usajili**](https://github.com/sponsors/carlospolop)!
* **Jiunge na** 💬 [**kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **tufuatilie** kwenye **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
* **Shiriki mbinu za hacking kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.