Current location: Hot Scripts Forums » Programming Languages » PHP » Password Security Idea


Password Security Idea

Reply
  #1 (permalink)  
Old 09-28-08, 01:45 PM
redfrog redfrog is offline
New Member
 
Join Date: Sep 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Password Security Idea

Please give me feedback about my idea, outlined below, for maintaining a "secure" Content Management System (CMS) built into a website.

1. If you are not an "admin", you browse the site as a regular user like any other informational website

2. if you are an admin, you click on an "Admin" link in the bottom navigation, and enter a login and password combo

3. if the login/password are valid, here is what happens:
3a. your IP is logged
3b. a unique 32 character token is created
3c. the current time is logged (and everytime you hit a new page, if the session is < 2 hours, a new time for this account is logged)
3d. all of the things mentioned are logged to a database for that user, and your login name and the unique 32 char token is saved to a cookie on your machine

4. everytime you try to make a change using the CMS, the cookie's "user name" and "32 char token" is checked against the user name in the database to make sure the tokens match AND it has been less than 2 hours AND the IPs match too. If it all checks out, the change is allowed, if not an error message will be shown

What do you think of this scheme?

Thanks,
redfrog
Reply With Quote
  #2 (permalink)  
Old 09-28-08, 01:49 PM
redfrog redfrog is offline
New Member
 
Join Date: Sep 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
In a nutshell, the "key" to the scheme is the 32 char token saved to a cookie. Because it is created after a valid login, and only good for 2 hours, it is much better than using a permanent "password" saved to a cookie.

In the event that someone copies the cookie info associated with a particular username, they will only have 2 hours to login. (And even then will have to spoof the IP as well.)

I know this system is not perfect -- I would not use it for banking, for instance -- but as a lightweight system for protecting content, I feel it is sufficient.

Your thoughts?
- redfrog
Reply With Quote
  #3 (permalink)  
Old 09-28-08, 03:45 PM
End User's Avatar
End User End User is offline
Level II Curmudgeon
 
Join Date: Dec 2004
Posts: 3,027
Thanks: 14
Thanked 35 Times in 33 Posts
Use session_regenerate_id() and that will help make things a little bit harder for an attacker.
__________________
I don't live on the edge, but sometimes I go there to visit.
-------------------------------------------------------------------------
Sanitize Your Data | Oracle Date & Substring Functions | Code Snippet Library | [url=http://www.codmb.com/Call Of Duty[/url]
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
idea box mrmaxey Script Requests 1 06-30-07 12:44 AM
Password Problems in VB6 iceiceady Visual Basic 6 03-28-06 03:17 PM
FYI: Shout goes out over PHP security bugs nugensoftware PHP 0 11-01-05 11:43 PM
From idea to inception at zero cost !!! JasonD General Advertisements 0 06-06-03 03:37 PM


All times are GMT -5. The time now is 08:20 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.