Reputation: 826
Let's say I'm running a program that contains sensitive information. An attacker decides it'd be the best move to attempt to access the JVM while it's running said program. He decides he wants to analyze the contents of the JVM's memory and change it to suit his nefarious desires. Is this even possible?
Upvotes: 2
Views: 142
Reputation: 307
One possible concrete way: the attacker loads up a native agent via the JVM TI.
Agents run in the same process with and communicate directly with the virtual machine executing the application being examined. This communication is through a native interface (JVM TI). The native in-process interface allows maximal control with minimal intrusion on the part of a tool. Typically, agents are relatively compact. They can be controlled by a separate process which implements the bulk of a tool's function without interfering with the target application's normal execution.
Upvotes: 0
Reputation: 43150
An attacker with the same privileges as the process in question will always be able, with sufficient effort, to extract or inject any data he wants.
This applies to all software running in a shared security context, not just a JVM.
If we're not talking about strong security but more about hurdles and obfuscation that might slow an attacker down, then the answer is still no, a generally JVM provides lots of introspection and instrumentation interfaces that make it easy to modify it in a safe manner at runtime if you already have access to it.
Upvotes: 1