Skip to content

Instantly share code, notes, and snippets.

@artem-smotrakov
Last active June 2, 2021 13:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save artem-smotrakov/5b9ec83e0b04d05aaf5ac5d808452d78 to your computer and use it in GitHub Desktop.
Save artem-smotrakov/5b9ec83e0b04d05aaf5ac5d808452d78 to your computer and use it in GitHub Desktop.
Example of a vulnerable RMI object
public class Server {
public void bindRemoteObject(Registry registry) throws Exception {
registry.bind("unsafe", UnicastRemoteObject.exportObject(new RemoteObjectImpl()));
}
}
interface RemoteObject extends Remote {
// this remote method is vulnerable because it accepts a complex parameter
void action(Object obj) throws RemoteException;
}
class RemoteObjectImpl implements RemoteObject {
// ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment