Closed bountyhacking closed 7 months ago
Thank you for sharing your solution!
Just to complete, in cases you don't want to permanent change the PATH and keep other applications using Java 17, you can just install openjdk-11-jdk
and run ysoserial
as follows:
PATH=/usr/lib/jvm/java-11-openjdk-amd64/bin:$PATH java -jar ysoserial-all.jar ...
Please use the discussions feature for questions, comments, or troubleshooting not related to a bug.
DESCRIPTION
During my attempt to complete a hacking C.T.F PortSwigger lab, I encountered an issue with ysoserial. The Kali Linux machines had Java 17 installed, which caused compatibility problems with ysoserial. To overcome this, I needed to install Java 11. Fortunately, I found a solution that allows ysoserial to work seamlessly with Java 11, and I wanted to share it with the community.
SOLUTION
To use ysoserial with Java 11, you can follow these steps:
sudo apt-get install openjdk-11-jdk
nano ~./bashrc
export PATH="/usr/lib/jvm/java-11-openjdk-amd64/bin:$PATH"
source ~/.bashrc
java -jar ysoserial-all.jar CommonsCollections4 'rm /home/carlos/morale.txt' | base64
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
I hope this helps!
REFERENCES
ysoserial stopped working