On Fri, 2004-03-05 at 13:57, Jason Holt wrote: > [...] > > var final_to_encode = passwd_enc + form.one_time_token.value; > > form.encoded_pw.value = calcMD5(final_to_encode); > [...] > > > This way the password cannot be "sniffed" and the page is not vulnerable > > to a replay attack. > > Firstly, you'd lose to any kind of active attack, which isn't too much harder > than passively listening. > > But secondly, no, replay is still possible. form.one_time_token.value > corresponds to the output of calcMD5, so I just replay both values. Keeping > track of which value you specified on the server side can help, but is also > trouble-prone
As for the one time token, PHP creates the token on the server before the page is sent to the client and stores it in a SESSION variable, (this site uses no COOKIES, all server side sessions) then the token is sent to the client where it is hashed with the password, the sent encrypted back to server where the server compares newly received hash to the users password stored in the DB and the token in the Session variable. If it passes the test then the authenticating Session is DESTROYED and a new AUTHENTICATED session is created. I know that it's all still vulnerable to a man-in-the middle attack at this point but my goal is to keep the password safe during the authentication process. FYI I'm working on two projects one that Just needs the hashed password sent like described above, The second is a problem where I need to send the password encrypted to the server, but then the Server has to decrypt that password and send it plain text to an LDAP server I'm not too worried about the link between the server and the LDAP server, the traffic between my server and LDAP is all in the datacenter, the only way to sniff the packets is if you were in the datacenter listening. Thank you again for everyone's input on this project I'm learning a lot about encryption. Mark Gardner ____________________ BYU Unix Users Group http://uug.byu.edu/ ___________________________________________________________________ List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list
