SMF Login vulnerability: Change your passwords

Author Topic: SMF Login vulnerability: Change your passwords  (Read 22014 times)

Badspot

  • Administrator
Damn, does it really not salt hashed passwords? SMF is worse than I thought.

To be fair, it sort of does.  There is a password_salt field which is not used for salting the password, but is used as part of the login cookie and changes every time you log in.  The passwd field itself is sha1(username + password).  Why they did not at least switch to the built in password_hash php function for smf 2.x remains a mystery. 

Of course talk of secure hashing is academic when you can just walk up to the server and brute force any password using the un-logged, un-rate-limited, ssi_checkPassword function which existed for years as part of smf 1.1

Badspot

  • Administrator
i cant change my password because i lost the privilege to edit my profile.

How about now?




When can we expect to get a forum theme?

whats the new max avatar file size? could you increase the attachment file size or will that just make the servers cost more?


Old accounts are 'deactivated' and if you send an activation letter, you get this


To be fair, it sort of does.  There is a password_salt field which is not used for salting the password, but is used as part of the login cookie and changes every time you log in.  The passwd field itself is sha1(username + password).  Why they did not at least switch to the built in password_hash php function for smf 2.x remains a mystery. 

I haven't read the source of SMF, but shouldn't it be quite easy to add an extra field in the DB and each time you log in you do the following pseudo code:
Code: [Select]
if (new field is not empty) then
    if (password_verify with new field) then
        logged in
    else
        invalid login
    end
else
    if (sha1 password verify with old field) then
        update new field with password_hash with retrieved password
        logged in
    else
        invalid login
    end
end

It sounds simple, but feel free to tear it apart.
« Last Edit: July 15, 2018, 02:15:22 AM by mctwist »

"""Team"""
Badspot has multiple personality disorder

"""Team"""
badspot administrates, rotondo moderates, and kompressor just looks cool
perfect team

kompressor isnt even a forum admin, ephi was the only other one afaik and he left years ago

Badspot

  • Administrator
Old accounts are 'deactivated' and if you send an activation letter, you get this
https://i.imgur.com/Go1ZdIm.png

Welp, the activation codes don't work the same way as the password recovery codes, even though they use the same field in the database.  Trying again.