# Java RMI

## Enumerate

Check if class loader is enabled:

```
msf > use auxiliary/scanner/misc/java_rmi_server
msf > set RHOSTS file:java_rmi.txt
msf > set THREADS 25
msf > run
```

Dump registry with MSF:

```
msf > use auxiliary/gather/java_rmi_registry
msf > set RHOSTS file:java_rmi.txt
msf > run
```

Dump registry with Nmap:

```
$ sudo nmap -sV --script "rmi-dumpregistry or rmi-vuln-classloader" 192.168.1.11 -p1098
```

## BaRMIe

* <https://github.com/NickstaDB/BaRMIe>

```
$ java -jar BaRMIe.jar -enum 192.168.1.11 1098
$ java -jar BaRMIe.jar -attack 192.168.1.11 1098
```

## remote-method-guesser

* <https://github.com/qtc-de/remote-method-guesser>

```
$ java -jar rmg-3.0.0-jar-with-dependencies.jar 192.168.1.11 1098 enum
```

## rmiscout

* <https://github.com/BishopFox/rmiscout>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ppn.snovvcra.sh/pentest/perimeter/java-rmi.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
