Solved

is it safe to store password on asp server side script

Posted on 2013-01-30
5
409 Views
Last Modified: 2013-02-01
Hi,

I have a webpage that is a form which displays the results upon submission of form.

I use html forms along with asp script to connect to a webservice to query from.

The form also has got a password field which i submit along with form data and validate in the asp code itself.  This technique is able to hide the password from my users in the webpage-->view source  area since the server side code is never visible.

I wanted a simple and low maintenance security solution and all my users should be able to share the same password therefore i used this technique.

Now my question is: how secure is this technique?  is asp server side code a good place to hide important information?

Thanks.
0
Comment
Question by:neptuneit
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 13

Expert Comment

by:Surone1
ID: 38835474
how secure is your website host? i have found several places that allowed other customers  read and sometimes even write access to all of the other customers documents on the webserver. i must admit it was free hosting, but still...
0
 
LVL 53

Accepted Solution

by:
Scott Fell,  EE MVE earned 500 total points
ID: 38835552
It does not matter if you are using asp, php, python or whatever your serverside code of choice is.   Storing passwords is as safe as your webhost as somebody browsing your site can no access anything between the asp tags <% %> unless you do a response.write or have some type of error (this is why iis7 defaults to not showing errors).

Storing your passwords on the page is just about as safe as storing the passwords in the DB.  

However, things can get compromised and for that reason, sensitive items in the database are typically stored with either one or two way encryption depending on the data.  A password would be stored with a one way encryption like sha1 or md5(less secure).

Basically when a password is saved to the DB you use serverside code to encrypt it.  The code could be as easy as
<%
pass=request.form("password")
pass=sha1(pass) ' where you have the function sha1 loaded in your page
' even more secure is using secret keys or "salt"
pass=sha1(pass&"somepassword"&"anotherpassword"&adate&an_id)

%>
You can read up on this http://en.wikipedia.org/wiki/SHA-1  and use functions for encryption http://code.google.com/p/crypto-js/

But the short answer for your question, is go ahead and use simple passwords.  


<%
showPage=0
pass=request.form("password")
if pass="xyzabc123" then
  showPage=1
end if

if showPage<>1 then
    response.redirect("anotherpage.asp")
end if
%>

The only way somebody can see anything between the<%%> is if they get ftp access to your server and can download the page.  Oh, see security of ftp  http://en.wikipedia.org/wiki/File_Transfer_Protocol
0
 
LVL 1

Author Comment

by:neptuneit
ID: 38835957
Thanks Padas for such detailed explanation.
0
 
LVL 1

Author Comment

by:neptuneit
ID: 38844405
Hi,
for the problem described above, is it okay to leave the following IIS 7 setting as is?

'Enable Server Side Debugging === True'

are there any other setttings i should worry about?

Thanks.
0
 
LVL 53

Expert Comment

by:Scott Fell, EE MVE
ID: 38844473
Turn that off as well as send errors to the browser unless the only way you can debug is seeing the actual errors.  Just turn it off when you are done.
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The conference as a whole was very interesting, although if one has to make a choice between this one and some others, you may want to check out the others.  This conference is aimed mainly at government agencies.  So it addresses the various compli…
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question