Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to hide important string variable values in exe

Tags:

c#

I want to hide important string variable values like passwords,username,ip and url,etc in .Net application (C#,VB.NET) In process explorer we can view string in image or Memory ,I want to hide image string

enter image description here

like image 359
Elshan Avatar asked May 19 '13 21:05

Elshan


1 Answers

You can stop static analysis like that by encrypting the strings and decrypting them at runtime into a SecureString.

The SecureString class is designed specifically to help prevent things like passwords being discoverable in memory.

However, note that it is still possible to attach a debugger to your process and see the strings, so you will need to also obfuscate using something like Dotfuscator to make it even more difficult to see the sensitive strings.

Here is an article about some of the problems with SecureString.

Despite its drawbacks, I think it's still your best best.

like image 117
Matthew Watson Avatar answered Nov 06 '22 17:11

Matthew Watson