rec漏洞
rec漏洞是一种命令执行漏洞 分为代码执行漏洞 和系统命令漏洞
原理:
系统命令执行函数
system() passthru() exec() shell_exec() popen() proc_open() pcntl_exec()
Windows系统命令拼接
“|”:管道符,前面命令标准输出,后面命令的标准输入。例如:help |more
“&” commandA & commandB 先运行命令A,然后运行命令B
“||” commandA || commandB 运行命令A,如果失败则运行命令B
“&&” commandA && commandB 运行命令A,如果成功则运行命令B
常见危险函数
1. Php代码相关
- eval()
- assert()
- preg_replace
- call_user_func()
- call_user_func_array()
- create_function
- array_map()
浙公网安备 33010602011771号