File Inclusion
File Inclusion
原理:通过对url的操作,越权访问文件
Low
?page=../flag.txt
Medium
?page=..././flag.php
1 |
|
str_replace( array( "http://", "https://" ), "", $file );
该字符串或数组是将 subject 中全部的 search 都被 replace 替换之后的结果。只进行一次。
High
!fnmatch( "file*", $file )
fnmatch() checks if the passed filename would match the given shell wildcard pattern.
*:0~任意多个字符
[ ]:仅括号里的一个字符
!:非括号里的所有字符
?:仅一个字符
\:仅斜线后面的当字符(精准)
file://协议
Impossible

in_array($file, $configFileNames)
Searches for needle in haystack using loose comparison unless strict is set.(如果设置了,则会检查变量类型)
其他-
in_array绕过
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 Ocean and Star!