PORT 1100/tcp - Java RMI

The Java Remote Method Invocation, or Java RMI, is a mechanism that allows an object that exists in one Java virtual machine to access and call methods that are contained in another one.

Enumeration

We can enumerate RMI ports with nmap.

nmap -sV --script "rmi-dumpregistry or rmi-vuln-classloader" -p <PORT> <IP>

<PORT>/tcp  open  java-rmi     Java RMI
| rmi-dumpregistry:
|   creamtec/ajaxswing/JVMFactory
|     com.creamtec.ajaxswing.core.JVMFactory_Stub
|     @127.0.0.1:49157
|     extends
|       java.rmi.server.RemoteStub
|       extends
|_        java.rmi.server.RemoteObject

BaRMIe.jar

If we can dump the registry of the java-rmi instance is the case where the machine may be vulnerable to a deserialization exploit. To exploit this deserialization on RMI ports I'm going to use BaRMIe.jar. We can download the file on the following link.

You need to select some parameters such as target, attack, payload and OS command, here and example of usage with a nishang reverse shell. I used Apache Commons for payload but you can use one different.

Last updated

Was this helpful?