DVWA-4.4 File Inclusion(文件包含)-Impossible-白名单

 
更多

Impossible Level

查看源码

<?php

// The page we wish to display
$file = $_GET[ 'page' ];

// Only allow include.php or file{1..3}.php
if( $file != "include.php" && $file != "file1.php" && $file != "file2.php" && $file != "file3.php" ) {
    // This isn't the page we want!
    echo "ERROR: File not found!";
    exit;
}

?>

可以看到,Impossible级别的代码使用了白名单机制进行防护,简单粗暴,page参数必须为“include.php”、“file1.php”、“file2.php”、“file3.php”之一,彻底杜绝了文件包含漏洞。

 

参考:https://www.freebuf.com/articles/web/119150.html

打赏

本文固定链接: https://www.cxy163.net/archives/4910 | 绝缘体

该日志由 绝缘体.. 于 2020年05月06日 发表在 未分类 分类下, 你可以发表评论,并在保留原文地址及作者的情况下引用到你的网站或博客。
原创文章转载请注明: DVWA-4.4 File Inclusion(文件包含)-Impossible-白名单 | 绝缘体
关键字: , , , ,

DVWA-4.4 File Inclusion(文件包含)-Impossible-白名单:等您坐沙发呢!

发表评论


快捷键:Ctrl+Enter