# LFI2RCE kupitia PHP_SESSION_UPLOAD_PROGRESS
Jifunze kuhusu kudukua AWS kutoka sifuri hadi shujaa na htARTE (HackTricks AWS Red Team Expert)! Njia nyingine za kusaidia HackTricks: * Ikiwa unataka kuona **kampuni yako ikionekana kwenye HackTricks** au **kupakua HackTricks kwa muundo wa PDF** Angalia [**MPANGO WA KUJIUNGA**](https://github.com/sponsors/carlospolop)! * Pata [**swag rasmi ya PEASS & HackTricks**](https://peass.creator-spring.com) * Gundua [**The PEASS Family**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee * **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@hacktricks_live**](https://twitter.com/hacktricks_live)**.** * **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwenye** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
## Taarifa Msingi Ikiwa umepata **Uingizaji wa Faili wa eneo la ndani (LFI)** hata ikiwa **huna kikao** na `session.auto_start` ni `Off`. Ikiwa **`session.upload_progress.enabled`** ni **`On`** na unatoa **`PHP_SESSION_UPLOAD_PROGRESS`** katika data ya **POST ya sehemu nyingi**, PHP ita **kuwezesha kikao kwako**. ```bash $ curl http://127.0.0.1/ -H 'Cookie: PHPSESSID=iamorange' $ ls -a /var/lib/php/sessions/ . .. $ curl http://127.0.0.1/ -H 'Cookie: PHPSESSID=iamorange' -d 'PHP_SESSION_UPLOAD_PROGRESS=blahblahblah' $ ls -a /var/lib/php/sessions/ . .. $ curl http://127.0.0.1/ -H 'Cookie: PHPSESSID=iamorange' -F 'PHP_SESSION_UPLOAD_PROGRESS=blahblahblah' -F 'file=@/etc/passwd' $ ls -a /var/lib/php/sessions/ . .. sess_iamorange In the last example the session will contain the string blahblahblah ``` Tafadhali kumbuka kuwa na **`PHP_SESSION_UPLOAD_PROGRESS`** unaweza **kudhibiti data ndani ya kikao**, kwa hivyo ikiwa unajumuisha faili yako ya kikao unaweza kujumuisha sehemu unayodhibiti (kama vile shellcode ya php). {% hint style="info" %} Ingawa mafunzo mengi kwenye mtandao yanapendekeza kuweka `session.upload_progress.cleanup` kuwa `Off` kwa madhumuni ya kurekebisha makosa. Mazingira ya chaguo-msingi ya `session.upload_progress.cleanup` katika PHP bado ni `On`. Hii inamaanisha kuwa maendeleo yako ya kupakia kwenye kikao yatafutwa haraka iwezekanavyo. Kwa hivyo hii itakuwa **Hali ya Mashindano**. {% endhint %} ### CTF Katika [**CTF asili**](https://blog.orange.tw/2018/10/) ambapo mbinu hii inazungumziwa, haikuwa ya kutosha kuchexploit Hali ya Mashindano lakini yaliyomo yaliyopakiwa pia yalihitaji kuanza na herufi `@ Jifunze kuhusu kudukua AWS kutoka sifuri hadi shujaa na htARTE (HackTricks AWS Red Team Expert)! Njia nyingine za kusaidia HackTricks: * Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa muundo wa PDF** Angalia [**MPANGO WA KUJIUNGA**](https://github.com/sponsors/carlospolop)! * Pata [**swag rasmi wa PEASS & HackTricks**](https://peass.creator-spring.com) * Gundua [**The PEASS Family**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) za kipekee * **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au **kikundi cha telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@hacktricks_live**](https://twitter.com/hacktricks_live)**.** * **Shiriki mbinu zako za kudukua kwa kuwasilisha PR kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.