Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

is it safe to store password on asp server side script

Posted on 2013-01-30
5
Medium Priority
?
413 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 2000 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article is written by John Gates, CISSP. Gates, the SNUG President-Elect, currently holds the position of Manager of Information Systems at Lake Park High School in Roselle, Illinois.
The well known Cerber ransomware continues to spread this summer through spear phishing email campaigns targeting enterprises. Learn how it easily bypasses traditional defenses - and what you can do to protect your data.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
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…

670 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