变量1

flag In the variable ! <?php  

error_reporting(0);
include "flag1.php";
highlight_file(__file__);
if(isset($_GET['args'])){
    $args = $_GET['args'];
    if(!preg_match("/^\w+$/",$args)){
        die("args error!");
    }
    eval("var_dump($$args);");
}
?>

分析代码可以发现是PHP变量覆盖漏洞,构造payload

http://120.24.86.145:8004/index1.php?args=GLOBALS

打印变量表中的所有变量,即可获得flag一枚 

猜你喜欢

转载自blog.csdn.net/tc125/article/details/81098000
今日推荐