首先打开题目得到:
发现url有所不同:
img为base64加密,解码后发现还是base64,继续解码,然后是16进制
在解码得到:
发现img可能存在文件包含漏洞:
将index.php按照加密方法加密请求得到:
发现base64编码解码,得到
发现是index.php源码
<?php
error_reporting(E_ALL || ~ E_NOTICE);
header('content-type:text/html;charset=utf-8');
$cmd = $_GET['cmd'];
if (!isset($_GET['img']) || !isset($_GET['cmd']))
header('Refresh:0;url=./index.php?img=TXpVek5UTTFNbVUzTURabE5qYz0&cmd=');
$file = hex2bin(base64_decode(base64_decode($_GET['img'])));
$file = preg_replace("/[^a-zA-Z0-9.]+/", "", $file);
if (preg_match("/flag/i", $file)) {
echo '&