Ahoj. Chcem sa spýtať, či je možné vykonať PHP Injection, keď má skript napríklad overovanie funkciou file_exists(). Napr. skúsim includnut nejaký skript z iného webu a ono mi to vypíše, že súbor neexistuje. Pre vlastnú bezpečnosť, dá sa to nejak obísť? Napríklad pri využití protokolu FTP... ? Neviem, či ste ma správne pochopili, ale ja dúfam, že áno :)
Fórum › PHP
PHP Injection - možné aj pri overovaní f-ciou file_exists() ?

skôr upload, nie?survik1 napsal:
Např. pokud jsi na méně zabezpečeným freehostingu nebo máš nepříliš ošetřený download, pak to jde


pokud includujes soubor z jineho webu tak ti file_exists moc nepomuze (proc vlastne chces includovat soubor z jinyho webu? ) :-)
ale pokud includujes soubor z vlastniho webu tak by byl file_exists naprosto idealni..
if(file_exists("icl/pages/$page.php"))
include("icl/pages/$page.php");
else
chyba();


Ono to našiel som totiž teraz dokonca web (link neudám), ktorý by sa dal hacknúť pomocou PHP Injection. Problém je v tom, že tam zavadzia funkcia file_exists() (podľa všetkého), ktorá overuje, či zadaný súbor existuje. Žiaľ, pokiaľ viem, file_exists() neoveruje vzdialené súbory :) Momentálne sa inak zameriavam trošku na PHP+MySQL bezpečnosť, tak preto skúmam podobné stránky a učím sa na chybách druhých. Ďakujem za ďalšie postrehy.


pokud includujes soubor z jineho webu tak ti file_exists moc nepomuze (proc vlastne chces includovat soubor z jinyho webu? ) :-)
Heh, vieš ty vôbec, čo je PHP Injection? :) Teraz nejde o overovanie lokálneho súboru. To ma netrápi. :D Lenže keď overuješ vzdialený súbor, tak vráti (zrejme) false, lebo táto funkcia nedokáže vzdialené súbory overiť!!!


To Tocimanko : opradu, nemas to moc jasny.
uz jsme to nejak probrali a tady to zamcu, nema to cenu.
pripadne poloz dotaz jasne a znovu.



Přidej příspěvek
Ano, opravdu chci reagovat → zobrazí formulář pro přidání příspěvku
×Vložení zdrojáku
×Vložení obrázku
×Vložení videa
































Uživatelé prohlížející si toto vlákno
Podobná vlákna
PHP - Overovani existence souboru - cyklus — založil MartinD
Upravte mi prosím PHP script proti XSS a SQL Injection — založil Jošta
File_exists() — založil survik1
PHP rychlost při běhu — založil Akimi Keita
Chybová hláška pri použití PHP 5.5.x — založil Niekto
Moderátoři diskuze