...
Wiki Markup |
---|
Java 5 introduced the JVM Tool Interface (JVMTI) \[[Sun 04d|AA. Bibliography#SunReferences#Sun 04d]\], replacing both the JVM Profiler Interface (JVMPI) and the JVM Debug Interface (JVMDI), which are now deprecated. |
...
Wiki Markup |
---|
The Java Platform Debugger Architecture (JPDA) builds on the JVMTI and provides high-level facilities for debugging Java systems while they are running \[[JPDA 2004|AA. Bibliography#JPDAReferences#JPDA 2004]\]. |
The JPDA facilities are similar to the reflection API, which is described in rule SEC05-J. Do not use reflection to increase accessibility of classes, methods, or fields. In particular, the JPDA provides methods to get and set field and array values. Access control is not enforced, so that even the values of private fields can be set by a remote process via the JPDA.
...
Wiki Markup |
---|
Java contains extensive facilities for monitoring and managing a JVM \[[JMX 2006|AA. Bibliography#JMXReferences#JMX 2006]\]. In particular, the Java Management Extension (JMX) API enables the monitoring and control of class loading, thread state and stack traces, deadlock detection, memory usage, garbage collection, operating system information, and other operations \[[Sun 04a|AA. Bibliography#SunReferences#Sun 04a]\]. It also has facilities for logging monitoring and management. |
...
Wiki Markup |
---|
When remote monitoring and management is enabled, access is password-controlled by default. However, password control can be disabled. Disabling password authentication is insecure because any user who can discover the port number that the JMX service is listening on can monitor and control the Java applications running on the JVM \[[JMXG 2006|AA. Bibliography#JMXGReferences#JMXG 06]\]. |
Wiki Markup |
---|
The JVM remote monitoring and management facility uses a secure communication channel (Secure Sockets Layer [SSL]) by default. However, if an attacker can start a bogus remote method invocation (RMI) registry server on the monitored machine before the legitimate RMI registry server is started, JMX passwords can be intercepted. Also, SSL can be disabled when using remote monitoring and management, which could, again, compromise security. See _The Java SE Monitoring and Management Guide_ \[[JMXG 2006|AA. Bibliography#JMXGReferences#JMXG 06]\] for further details and for mitigation strategies. |
...
Wiki Markup |
---|
Some JVMs allow agents to be started when the JVM is already running. This is insecure in a production environment. Refer to the JVMTI documentation \[[JVMTI 2006|AA. Bibliography#JVMTIReferences#JVMTI 06]\] for platform-specific information on enabling/disabling this feature. |
Wiki Markup |
---|
Platforms that support environment variables allow agents to be specified in such variables. "Platforms may disable this feature in cases where security is a concern; for example, the Reference Implementation disables this feature on UNIX systems when the effective user or group ID differs from the real ID" \[[JVMTI 2006|AA. Bibliography#JVMTIReferences#JVMTI 06]\]. |
Agents may run under the default security manager without requiring any permissions to be granted. While the JVMTI is useful for debuggers and profilers, such levels of access are inappropriate for deployed production code.
...
Wiki Markup |
---|
The _Java SE Monitoring and Management Guide_ \[[JMXG 2006|AA. Bibliography#JMXGReferences#JMXG 06]\] provides further advice: |
...
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="6cdc16a3bff76a15-46341317-4cd140f4-ad229cc7-858b34c28d8bc9717fffe29a"><ac:plain-text-body><![CDATA[ | [[JMX 2006 | AA. Bibliography#JMX References#JMX 06]] |
| ]]></ac:plain-text-body></ac:structured-macro> | |
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="6db7214ecf130244-c0918926-4c71478d-b43eb398-37682503e7c098ef9adc735e"><ac:plain-text-body><![CDATA[ | [[JMXG 2006 | AA. Bibliography#JMXG References#JMXG 06]] |
| ]]></ac:plain-text-body></ac:structured-macro> | |
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="2f55ff8ec8ed6571-fce0a9ad-4d444f39-b36ab816-9733992eed75073c239bb238"><ac:plain-text-body><![CDATA[ | [[JPDA 2004 | AA. Bibliography#JPDA References#JPDA 04]] |
| ]]></ac:plain-text-body></ac:structured-macro> | |
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="f8a5798118d42828-0ebde2db-405249dc-898ab059-81b1a429a7f41431ac315407"><ac:plain-text-body><![CDATA[ | [[JVMTI 2006 | AA. Bibliography#JVMTI References#JVMTI 06]] |
| ]]></ac:plain-text-body></ac:structured-macro> | |
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="b45cb4f767d0d111-b0fef78b-437743e2-99939e3d-e70aaf2d2c311089a071e4e3"><ac:plain-text-body><![CDATA[ | [[Long 2005 | AA. Bibliography#Long References#Long 05]] | Section 2.6, The JVM Tool Interface; Section 2.7, Debugging; Section 2.8, Monitoring and Management | ]]></ac:plain-text-body></ac:structured-macro> | |
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="1140c53f6c8ee53a-f63fcf2e-4f3a465c-9be9b3ac-d10524ea0c99792a2ff337bb"><ac:plain-text-body><![CDATA[ | [[Reflect 2006 | AA. Bibliography#Reflect References#Reflect 06]] | [Reflection | http://java.sun.com/javase/6/docs/technotes/guides/reflection/index.html], Sun Microsystems, Inc. (2006) | ]]></ac:plain-text-body></ac:structured-macro> |
...