RCE

mac2022-06-30  68

RCE

remote command/code execute

远程系统命令/代码执行

系统从设计上需要给用户提供指定的远程命令操作的接口。可以测试一下自动运维平台。

在PHP中,使用system、exec、shell_ exec、passthru、pcntl_exec、popen、proc_popen等函数可以执行系统命令。

系统命令拼接

windows

“|”:管道符,前面命令标准输出,后面命令的标准输入。例如:help |more“&” commandA & commandB 先运行命令A然后运行命令B“||” commandA || commandB 运行命令A,如果失败则运行命令B“&&” commandA && commandB 运行命令A,如果成功则运行命令B

linux

“|”:管道符,前面命令标准输出,后面命令的标准输入。例如:help |more“&” commandA & commandB 先运行命令A然后运行命令B“||” commandA || commandB 运行命令A,如果失败则运行命令B“&&” commandA && commandB 运行命令A,如果成功则运行命令B“;” commandA && commandB执行完A执行B

代码执行

大部分语言有类似eval()函数,将字符串当作代码执行。可以尝试写webshell。

PHP:eval,assert,preg_replace()+/e 模式Javascript:eval Vbscript:Execute、Eval Python: exec Java: Java中没有类似php中eval函数这种直接可以将字符串转化为代码执行的函数,但是有反射机制,并且有各种基于反射机制的表达式引擎,如: OGNL、SpEL、MVEL等,这些都能够造成代码执行漏洞。

https://blog.csdn.net/sdb5858874/article/details/80788933

https://www.kanxue.com/book-6-320.htm

https://blog.zeddyu.info/2019/01/17/命令执行/#命令分隔与执行多条命令

转载于:https://www.cnblogs.com/wan-xiang/p/11550588.html

相关资源:无参数 rce.md
最新回复(0)