Can Code Virtualizer protect a hard-coded password in a data section?¶
Code Virtualizer virtualizes code, not data sections. You can place a STR_ENCRYPT macro around the code that accesses the password so it remains encrypted while not in use.
Another option is to encrypt the password before protection:
-
Compile the application with the hard-coded password in its data section.
-
Use a separate tool to locate the password string in the compiled application.
-
Replace the original string with an encrypted version.
At runtime, decrypt the password in a function protected by a VIRTUALIZER macro. Remove the plaintext from memory, or encrypt it again, as soon as it is no longer needed.