Re: Security in windows forms apps
- From: T3Logic <T3Logic@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 10 Oct 2006 10:53:02 -0700
I did it both ways,
Design and programically.
From the looks of things if you dont use an obfusicator all litteral stringsare printed out in the exe.
SqlConnection con = new
SqlConnection(Properties.Settings.Default.MyConnectionString.ToString());
This is how I did it programmically in the app:
SqlConnection con = new SqlConnection("Data Source=MySQLDatabase;Initial
Catalog=TestDatabase;Persist Security Info=True;User
ID='myTestUser';Password=u2IC(~8xE%>82qP7J#");
It printed out my sql connection....
For all I know I might have a setting turned off or not on in vs2005 I will
keep checking but fusicator seems the only thing that encrypts it.
On another note since this is an internal app I am not too worried about it
but if I ever decide to distribute a database app its going to use web
services....
"Noah Sham" wrote:
T3Logic,.
You need to ensure that your not setting these values at design time. If
you have set the connection string at design time in the IDE then those
strings will be in the compiled application.
"T3Logic" <T3Logic@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:99D09176-ED44-42F7-99BA-09E9ACA83193@xxxxxxxxxxxxxxxx
The quick solution to this problem is use a Obfusicator. Visual Studio
2003,
2005 come with a lite version.
Now I am going to spend a little time in regards to cracking the
Obfuscator
and see if it will work.
--
"T3Logic" wrote:
I have tried multiple methods of encrypting the connection string.
Everyone
has made it sound easy.
I have encrypted the connection string in the app.config file, code
behind,
etc.
Basically try this test.
Create a new app and just add a connection string. Add whatever
encryption
that you would like to use. Build the app. Go to the app's bin directory
and
rename the exe to .txt. So it will now be app.txt. Open up in notepad,
go
to the bottom of the file. You will see your connection string in text
all
nice an pretty.
Not secure. Same thing works in vb6.
- References:
- Re: Security in windows forms apps
- From: Noah Sham
- Re: Security in windows forms apps
- Prev by Date: Re: Decoding strategy
- Next by Date: Re: Place of BeginTransaction in code
- Previous by thread: Re: Security in windows forms apps
- Next by thread: Re: Security in windows forms apps
- Index(es):
Relevant Pages
|