What are we proving
- Jackson Databind Deserialization vulnerability
Context of application
- Microservice based on Spark Framework (http://sparkjava.com/)
- Depends on
- com.fasterxml.jackson.core:jackson-databind:2.8.8
- xalan:xalan:2.7.2
- Unsafe deserializaiton (Polymorphic Typing)
- Untrusted input acceptance
Directory Structure
- src/... : Source code to depict Deserializaiton Exploit (uses http://sparkjava.com/)
- exploit : Source code to craft a gadget/exploit for DeSerializaiton Vulnerability
- attackscripts : Misc shell scripts to induce normal and malicious requests upon applicaiton service
How can I use this?
Spin up a shell prompt (start vulnerable web instance)
- git clone https://github.com/conikeec/jackspoilt.git
- cd jackspoilt
- mvn package
- Start application server : java -jar target/jackspoilt-1.0-SNAPSHOT.jar
Spin up a shell prompt (To create gadget or exploit)
- cd jackspoilt
- mvn exec:java -D"exec.mainClass"="EncodeExploit"
- The command above creates attack.json in the attackscripts directory
- cd attackscripts
- ./add.sh
- ./list.sh
- ./exploit.sh - This command will ineject the malicious payload, trigger gadget chain (Edit exploit/Exploit.java to add your exploit command of choice)