If a password is hard-coded into a variable in source code such as VB, could someone extract this password by looking at the compiled executable code?
If so, what can be done to avoid this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes, someone could.
Nothing can be done to avoid it. Obfuscation will make it slightly harder.
In the worst case, if someone didn’t understand your obfuscated code, they could run your executable in a debugger and read the password from memory just before you use it.
The solution is, of course, not to hard-code important passwords into your binaries.