网鼎杯 2020 朱雀组 phpweb

**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** 2024-06-03 12:35:13 pm 一直刷新 直接抓包看参数 读 index.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","call_user_func","array_filter", "array_walk", "array_map","registregister_shutdown_function","register_tick_function","filter_var", "filter_var_array", "uasort", "uksort", "array_reduce","array_walk", "array_walk_recursive","pcntl_exec","fopen","fwrite","file_put_contents"); function gettime($func, $p) { $result = call_user_func($func, $p); $a= gettype($result); if ($a == "string") { return $result; } else {return "";} } class Test { var $p = "Y-m-d h:i:s a"; var $func = "date"; function __destruct() { if ($this->func != "") { echo gettime($this->func, $this->p); } } } $func = $_REQUEST["func"]; $p = $_REQUEST["p"]; if ($func != null) { $func = strtolower($func); if (!in_array($func,$disable_fun)) { echo gettime($func, $p); }else { die("Hacker..."); } } ?> 非预期: 命名空间绕过: \system 等价于 system ...

六月 3, 2024 · 1 分钟 · 239 字 · J1rrY

CTF题型 SSTI(3) Smart SSTI 例题和题记

CTF题型 匿名函数考法&例题总结 一 .原理分析 匿名函数特点:无函数名,使用一次就被丢弃,一般可以动态执行php代码 二 .重点匿名函数利用 请熟记并理解为后面php代码审计打基础 ...

二月 6, 2024 · 4 分钟 · 1792 字 · J1rrY

CTF题型 SSTI(3) Smart SSTI 例题和题记

CTF题型 SSTI(3) Smart SSTI 例题和题记 前面我们学习了Flask SSTI Smart SSTI和Flask SSTI 不同 Smart SSTI 是基于php的,居然可以在其中直接执行任意的php代码 参考 Smart中文手册 https://www.smarty.net/docs/zh_CN/ ...

二月 5, 2024 · 1 分钟 · 342 字 · J1rrY

CTF题型 php反序列化进阶(1) php原生文件操作类 例题和总结

CTF题型 php反序列化进阶(1) php原生文件操作类 例题和总结 特征 在php反序列化中 没有直接的利用点 可以直接rce 而是echo new $a($b); echo 可以触发类的 toString方法 ...

十一月 2, 2023 · 6 分钟 · 2727 字 · J1rrY