rlgarris682 has asked for the wisdom of the Perl Monks concerning the following question:
Hello, I am a new Perl Monk and have a brief question concerning security.
I have devised a fairly simple yet I believe very robust security system for acessing a limited access part of website and would like an assement.
I have written an HTML file with a Javascript in it that will be used to gain access to the limited access part of the website.
In this HTML file is two scripts the 1st script contacts the server and the server sends a random chracter string to the client side javascript. The second script concatenates the random string with a second secret string embedded in the HTML file and then SHA1 hashes this into a new string. See http://pajhome.org.uk/crypt/md5/sha1src.html The script sets this string as a cookie and effectively this new string then becomes the session id for the user and the user can proceed to access the limited part of the website for one session. One the server side, the server has a copy of the secret code that the cleint will be using and of course knows the random string it just generated. The server (which is of course mod_perl) will then SHA1 hash the secret code and its randomly generated string to see if the session id is valid. In addition to this is after the challenge, hash, and authentication is completed a password is asked for.
I know this in fact a virtual duplicate of CHAP login method just used in a different way, but I wanted to know if there are any obvious security threats I missed.
For anyone wondering: The HTML file will kept on the client computer and the secret code will be a 192 hex string. The reason I am not just using password security is that I am doing this for a client who has trouble remembering passwords so he keeps his passwords simple. THis security feature prevents random guessing machines from nailing his password. If someone tries to contact the limited part of the site and does not have a valid session id then the server will simply respond with a 404 page not found error -- this will fend off most robots and people for that matter.
2003-04-28 edit ybiC: format with (evidently intended) paragraphs, urlify link
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Security and JavaScript
by Improv (Pilgrim) on Apr 29, 2003 at 00:34 UTC | |
by rlgarris682 (Initiate) on Apr 29, 2003 at 01:27 UTC | |
|
Re: Security and JavaScript
by thraxil (Prior) on Apr 29, 2003 at 00:56 UTC | |
by rlgarris682 (Initiate) on Apr 29, 2003 at 01:43 UTC | |
by thraxil (Prior) on Apr 29, 2003 at 15:23 UTC | |
|
Re: Security and JavaScript
by perrin (Chancellor) on Apr 29, 2003 at 05:26 UTC | |
|
Re: Security and JavaScript
by cLive ;-) (Prior) on Apr 29, 2003 at 01:24 UTC | |
by rlgarris682 (Initiate) on Apr 29, 2003 at 01:58 UTC | |
|
Re: Security and JavaScript
by jonnyfolk (Vicar) on Apr 29, 2003 at 07:29 UTC |