【复习】[网鼎杯 2020 朱雀组]phpweb --- 命名空间绕过黑名单

两个WP
https://www.anquanke.com/post/id/205679
https://www.freesion.com/article/6379840490/

一、自己做:


上来就有报错信息,并且页面不断的刷新。
Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /var/www/html/index.php on line 24 2021-05-16 12:36:22 am

抓包,看到它有传参,而且参数是 func ,想到了回调函数,前面是函数,后面是执行的命令。


然后回头看了一下PHP版本,是5.5.38,这个时候assert还是支持动态函数的。所以能用。assert不让用,,

在这里插入图片描述
assert不行,那怎样 用 动态函数获取flag 啊,,

然后偷看了一眼WP,这就是命令执行嘛,前面一个是命令,后面是参数。
然后尝试show_source来读取文件,看看源码是什么,,这个也别过滤了。。
然后是 readfile,file_get_contents,都行。

只拿下来PHP的那一块。

<?php
    $disable_fun = array("exec","shell_exec","system","passthru","proc_open","show_source","phpinfo","popen","dl","eval","proc_terminate","touch","escapeshellcmd","escapeshellarg","assert","substr_replace","call_user_func_array",
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值