Jump to content

Recommended Posts

How do you accomplish a secure login in a time seed?  Here's the example that I want to get working:

 

User plugs in a username and password.  The password is MD5 hashed.  The hash is then passed into another function that adds a random number to it, based on the time the login page was generated.  The password hash plug the random number is then hashed out again and posted to the site.

 

How do you get that to work?  That random number is random and dynamic, likely changing on each page view/post.  What would the back-end do to verify how the correct password was entered?

 

I"m seeing more and more login's like this.  For example, the SonicWALL management system "GMS": https://gms.demo.sonicwall.com/  The random number in the Javascript functions changes on each page refresh.  How do they get this working???????

Link to comment
https://forums.phpfreaks.com/topic/120644-secure-login-in-time-seed/
Share on other sites

Using the session ID is an idea, but if it's passed in the Javascript like that, doesn't allow for even easier hijacking?

 

In the GMS example in the first post, the code takes the current timestamp (with milliseconds) then generates a random number off it.  It then cycles the number though a "getNextFloat" or something like that method (it's Java), and depending on what interval the float falls between, it appends a 0-9 integer to a string.  In the end, you get that completely random number that you see passed to the Javascript.

 

It's obviously used to validate the password, if you look at the form fields that are posted.  The password textbox is replaced with "Nice Try" and the hash is placed into another hidden field.

 

So a random number is hashed.  It's obviously a security feature, because I've tried posting my own valid username and password to it with a random number and it fails.  So it's validating that random number somehow.  HOW??!!

 

I'm lost ... my brain is too feeble ... gah!

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.