I have a desktop app, that send e-mail, using remote smtp-server. So in code I have smth like this:
string userName = "Alex";
string pass = "123456";
sendEmail(userName, pass);
Anyone, who reverse my app will have access to my mail-server. I wonder, is there any solutions to protect sensitive data (userName, pass) from reversing? Without obfuscating.
Thanks, Alex.
Move your SMTP credentials and other sensitive data to app.config and make use of section encryption.
If you supply a username and a password in your app, you should consider it exposed to the user - there is really no way to guarantee that the user does not examine your app or sniff the network connection.
Also, if is common to block SMTP traffic in firewalls and maintain a single smarthost, to avoid compromised machines becoming spambots. Even if you successfully manage to hide the credentials, using SMTP like this might be an unreliable choice.
You essentially have three options:
The last option can of course be combined with authentication of the user against your own user database - that way you can shut down misbehaving users.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With