It appears that Discourse does not take measures to detect and prevent multiple wrong sign ins.
Good security practices should essentially be in core.
brute force attack is common attack, a successful attack mean the attacker had enough time and he was not detected.
The following method is to weaken this sort of attacks.
The system should keep track of fail attempt per account login
After 5 false login attempts, the user will have to answer Captcha challenge with the following attempts
After 10 failed attempts, transparently deactivate logins for this account for 24 hours
Ignoring the login silently at this point will make it even more difficult for that attacker as it will not know that the attempt was voided.
At this point even the legitimate user / the victim will not be able to login, The system will send
an email to the account owner letting him know that there was suspicious activity and regular login is suspended to protect him.
The email will contain a link to a tokenized login page that the legitimate user will be able to login from in the next 24 hours ( basically 2 way authentication )
2 . Session management - and remote logout
Allow the user to logout / destroy all open session,
This feature is to allow a user who logged on a computer (library, school, friend, apple store, and forgot to logout ( I can’t count on one hand any more the times that I saw open hotmail/gmail session in public places.
Email change - should require password
It appears that changing an email does not require a password, for cases like section 2 above, it will make it very easy to hijack an account for good.
corrective measures
require the user login information before changing email or any element that has impact on the ownership of security of the account
Login with email only. (configurable)
Username are public information, for more security conscious setups. Allowing logins by emails only, will add another layer of security, An attacker will have to find out 2 secrets (1st the email associated with the account and the password)
I think an easier solution is to simply slow down logins a bit on each failed login, up to a limit of say 1 minute. Then brute force takes a very long time, and existing users who happen to fail login a lot will be only mildly inconvenienced.
1 minute slow down, will still allow 1440 tries a day.
And can potentially prevent the legit user from login completely, The user will have to try real hard or be lucky that is own login attempt will register before that attacker attempt.
Note that technically suspending Login for attacked account, will not necessarily affect the legitimate user that is already signed in.It will only affect him if he signed out and have to sign in again. ( or if the attack persist for long period of time )
This is not a good idea, because it’s a very easy denial of service against an account. Lockouts should never be on an account, but on an IP address.
Yes. To prevent denial of service. The system will generate a “back door” a tokenized login link that will be sent by email to the account holder.
And the user only have to log in if they logout, so it is unlikely to cause major inconvenience.
IP blocking can also be used to cause denial of service for users sharing IP for example users on the same NAT network in an organization or In bigger scale a mobile network provider where many users can share same public ip. VPN provider. Etc.
At a certain level IP blocking is also an effective and common solution.
my proposed mechanism can provide a really high account security. making it extremely unlikely that even an attacker
with resources (botnet, captcha solvers for hire) to mange to successfully brute force a password.
Another thing, continuing a little bit from this topic: It has always irked me (not in Discourse, but elsewhere) when I forget my password, but I’m also unaware what the original password requirements were, so I don’t know what I would have chosen as my password. I then do a password reset, am reminded of the requirements, and end up choosing the same password I had originally.
Displaying the password requirements after the second or third failure would be a nice feature. It doesn’t detract from security, because password requirements are not fundamentally sensitive (i.e. they are displayed to all new registrants).
I use this for everything work related and soon everything home related. It generates passwords to so you don’t pull a junk one from your mind. And over time the goal will be that no two websites have the same bunko passwords…ever.
You can export your password file to other instances…mobile too.