Preventing Brute Force Logins on Websites

前端 未结 14 1307
小鲜肉
小鲜肉 2020-11-27 10:18

As a response to the recent Twitter hijackings and Jeff\'s post on Dictionary Attacks, what is the best way to secure your website against brute force login attacks?

14条回答
  •  隐瞒了意图╮
    2020-11-27 10:32

    There are several aspects to be considered to prevent brute-force. consider given aspects.

    1. Password Strenght

      Force users to create a password to meet specific criteria

      • Password should contain at least one uppercase, lowercase, digit and symbol(special character).
      • Password should have a minimum length defined according to your criteria.
      • Password should not contain a user name or the public user id.

      By creating the minimum password strength policy, brute-force will take time to guess the password. meanwhile, your app can identify such thing and migrate it.

    2. reCaptcha

      You can use reCaptcha to prevent bot scripts having brute-force function. It's fairly easy to implement the reCaptcha in web application. You can use Google reCaptcha. it has several flavors of reCaptcha like Invisible reCaptcha and reCaptcha v3.

    3. Dynamic IP filtering Policy

      You can dynamically identify the pattern of request and block the IP if the pattern matches the attack vector criteria. one of the most popular technique to filter the login attempts is Throttling. Read the Throttling Technique using php to know more. A good dynamic IP filtering policy also protects you from attacks like DoS and DDos. However, it doesn't help to prevent DRDos.

    4. CSRF Prevention Mechanism

      the csrf is known as cross-site request forgery. Means the other sites are submitting forms on your PHP script/Controller. Laravel has a pretty well-defined approach to prevent csrf. However, if you are not using such a framework, you have to design your own JWT based csrf prevention mechanism. If your site is CSRF Protected, then there is no chance to launch brute-force on any forms on your website. It's just like the main gate you closed.

提交回复
热议问题