How to enable memory encryption in jvm? To prevent Dll injections and replace variables using CheatEngine (as in denuvo)

Closed due to the fact that the essence of the question is incomprehensible by the participants Roman C , Suvitruf , Anton Sorokin , LFC , freim on Feb 24 at 11:15 .

Try to write more detailed questions. To get an answer, explain what exactly you see the problem, how to reproduce it, what you want to get as a result, etc. Give an example that clearly demonstrates the problem. If the question can be reformulated according to the rules set out in the certificate , edit it .

  • Is there such a thing? Why don't you encrypt the values ​​themselves? - Anton Sorokin
  • @AntonSorokin, the application is already written. but I don’t really want to rewrite or add crutches - Cus
  • if the answer helped you or solved your problem (or proved that there is no solution), then add it or accept it by clicking on the arrow and the check mark next to it. - Anton Sorokin

1 answer 1

As far as I know, you cannot enable memory encryption in jvm.

If you are storing data in a String :

You can use GuardedString to secure passwords. This is a special String object created to resolve issues related to storing passwords in memory, represented by a String :

Package org.identityconnectors.common.security.GuardedString . Documentation:

Associated with keeping passwords as java.lang.String. This is what it is, it is not represented in a memory for garbage collected. Encrypted form. The encryption key will be a randomly-generated key. In their serialized form, GuardedString will be encrypted using a known default key. This is to provide a minimum level of protection regardless of the transport. It is recommended that you deploy SSL for true encryption. Applications may also wish to persist GuardedStrings. It should be noted that the Identity Manager can be stored and managed using the Identity Manager. APIConfiguration as a whole. It is responsible for the encryption of security (beyond the basic default key encryption).

If the attacker has root access to the computer, he can read all the memory, perform debugging operations, reverse engineer your java bytecode, etc., that is, there is no practical way to prevent the attacker from retrieving data that is hidden somewhere in RAM. You can also encrypt swap file / partition.

You can encrypt the data itself in variables. Also, to make it difficult for alleged hackers to understand your code (that is, how it works), you can obfuscate the code.