Solved

is it safe to store password on asp server side script

Posted on 2013-01-30
5
404 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

Business Impact of IT Communications

What are the business impacts of how well businesses communicate during an IT incident? Targeting, speed, and transparency all matter. Find out more in this infographic.

Question has a verified solution.

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

Suggested Solutions

This article describes my battle tested process for setting up delegation. I use this process anywhere that I need to setup delegation. In the article I will show how it applies to Active Directory
No single Antivirus application (despite claims by manufacturers) will catch or protect you from all Virus / Malware or Spyware threats. That doesn't stop you from further protecting yourself however - and this article is to show you how.
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
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…

732 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