How to hide important values โ€‹โ€‹of string variables in exe

I want to hide important values โ€‹โ€‹of string variables such as passwords, username, ip and url, etc. in .Net application (C #, VB.NET) In the process explorer we can view the line in the image or in memory, I want to hide the image line

enter image description here

+4
source share
3 answers

You can stop static analysis, for example, by encrypting strings and decrypting them at run time in SecureString .

The SecureString class is specifically designed to prevent things such as passwords from being discovered in memory.

However, note that you can still attach the debugger to your process and see the lines, so you will also need to confuse the use of something like Dotfuscator to make it even harder to see sensitive lines.

Here is an article about some issues with SecureString .

Despite my shortcomings, I believe that this is still the best.

+8
source

Encode it at compile time, decode at runtime? Someone can still find it, since it can decompile your .exe and see the decryption algorithm, but some protection> no protection.

+1
source

Source: https://habr.com/ru/post/1481665/


All Articles