|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2018-06-22 10:06 UTC] ziyahan at netsparker dot com
Description: ------------ a few days ago, a bug disclosure has been published: https://mp.weixin.qq.com/s?__biz=MzIzMTc1MjExOQ==&mid=2247485036&idx=1&sn=8e9647906c5d94f72564dec5bc51a2ab&chksm=e89e2eb4dfe9a7a28bff2efebb5b2723782dab660acff074c3f18c9e7dca924abdf3da618fb4&mpshare=1&scene=1&srcid=0621gAv1FMtrgoahD01psMZr&pass_ticket=LqhRfckPxAVG2dF%2FjxV%2F9%2FcEb5pShRgewJe%2FttJn2gIlIyGF%2FbsgGmzcbsV%2BLmMK#rd In disclosure, researcher use question mark (?) to bypass validity mechanism of phpmyadmin, however this trick can be used also in pure PHP script. I really don't understand how php interpreter evaluates question mark that given as param to include function. I have a code like below: <?php $page = $_REQUEST["target"]; if(strpos($page,"ziyahan.txt")===0) { include $page; } ?> It does not seem bypassable first, however I realize that a weird payload can bypass this ?target=ziyahan.txt%3f/../../../../../../../../etc/passwd I cannot understand how the payload has an affect there? It seems a bug. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 07:00:02 2025 UTC |
Are you serious? Do I look a one discuss here LFI? I am only trying to understand how the scenario below is possible: <?php include("wrong.php../../../../../../../etc/passwd"); ?> How can it return /etc/passwd In bash, you can try this command ie, cat wrong.php../../../../../etc/passwd Another imporant thing is that, "require" function does not evaluate the same payload in a same way. Could you please investigate the issue instead of judging me.