两个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",