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

Goal: 1000 CNY · Raised: 1336 CNY

100%

CVE-2021-29505 PoC — XStream is vulnerable to a Remote Command Execution attack

Source
Associated Vulnerability
Title: XStream is vulnerable to a Remote Command Execution attack (CVE-2021-29505)
Description:XStream is software for serializing Java objects to XML and back again. A vulnerability in XStream versions prior to 1.4.17 may allow a remote attacker has sufficient rights to execute commands of the host only by manipulating the processed input stream. No user who followed the recommendation to setup XStream's security framework with a whitelist limited to the minimal required types is affected. The vulnerability is patched in version 1.4.17.
Description
对CVE-2021-29505进行复现,并分析学了下Xstream反序列化过程
Readme
## 复现过程
在IDEA中导入xstream组件的jar包,本次复现所使用的是CommonsCollections6链来进行利用,故导入commons-collections组件jar包,POC详见附件。
首先使用ysoserial启动一个恶意RMI服务端进行监听,并利用了CommonsCollections6链进行命令执行,如下所示:
```txt
java -cp .\ysoserial.jar ysoserial.exploit.JRMPListener 1099 CommonsCollections6  "calc"
```
![1.png](1.png)
同时根据该漏洞对Xstrean的反序列化流程进行了分析调试做了记录,详见`xstream反序列化流程分析.pdf`

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 →