This repository contains research materials, proof-of-concept code, and exploitation tools related to Apache Dubbo deserialization vulnerabilities, primarily focusing on CVE-2020-1948.
- Hessian-Deserialize-RCE-master: Research and exploitation techniques for Hessian deserialization vulnerabilities in Dubbo
- JNDI-Injection-Exploit-master: JNDI injection exploitation framework for attacking Dubbo services
- dubbo-dubbo-2.7.5: Apache Dubbo 2.7.5 source code for vulnerability analysis
- dubbo-exp-master: Advanced exploitation framework for Dubbo vulnerabilities
- dubbo-samples-master: Sample Dubbo applications for testing and demonstration
- marshalsec-master: Tools for marshalling/unmarshalling vulnerability testing
- dubboExp.py: Python-based exploit script for CVE-2020-1948
- dubboPoc.py: Proof of concept script to verify vulnerability existence
- payload.ser: Serialized Java payload for exploitation
- ysoserial.jar: Java deserialization payload generation tool
Apache Dubbo versions prior to 2.7.8, 2.6.9, and 2.5.10 are vulnerable to a remote code execution attack (CVE-2020-1948) due to insecure deserialization. The vulnerability affects the Dubbo Provider component, which uses Java native serialization without proper validation.
This vulnerability can be exploited through multiple vectors:
- Hessian Deserialization: Exploiting the Hessian serialization protocol implementation
- JNDI Injection: Leveraging JNDI injection techniques to achieve remote code execution
- Java Serialization: Using traditional Java deserialization attacks with gadget chains
# Clone and build a vulnerable Dubbo version
cd dubbo-dubbo-2.7.5
mvn clean package
# Run the proof of concept
python dubboPoc.py -t <target_ip> -p <target_port>
# Run the exploit
python dubboExp.py -t <target_ip> -p <target_port> -c "command_to_execute"
You can use ysoserial.jar to generate custom payloads:
java -jar ysoserial.jar CommonsCollections1 "command_to_execute" > payload.ser
To protect against these vulnerabilities:
- Upgrade to Apache Dubbo 2.7.8+, 2.6.9+, or 2.5.10+
- Avoid using native Java serialization
- Implement proper input validation and deserialization filtering
- Consider using alternative serialization protocols with proper security controls
- CVE-2020-1948 Details
- Apache Dubbo Security Bulletin
- Java Deserialization Attacks and Defenses
- Understanding JNDI Injection
This repository is for security research and educational purposes only. The provided code and tools should only be used against systems you have permission to test. Any misuse of this information is not the responsibility of the repository owner.