Перейти к содержанию

Web security

Authentification

“Invalid Username or Password”, a useless security measure

You can confirm if an username exist by trying to create an new account with the same username.

https://kev.inburke.com/kevin/invalid-username-or-password-useless/

  • Rate limiting can go a fair way to preventing brute force attacks. To find email addresses, an attacker is going to need to try a lot of email addresses and/or a lot of passwords, and get a lot of them wrong. Consider throttling invalid login attempts by IP address or subnet. Check submitted passwords against a dictionary of common passwords (123456, monkey, etc) and ban that traffic extra hard. Exponential backoff (forcing attackers to try again after 1, 2, 4, 8, 16.. seconds) is useful.
  • Give guidance to users about creating strong passwords. Allow easy integration with LastPass or 1Password.
  • Add a 2-factor auth option to your website. Encourage users to use it.
  • Warn users about malicious behavior ("someone is trying to snoop your password") and contact them about suspicious logins.

Password

Password rules

User (advices):

  • use long password
  • use mix of special chars, numbers, higher case and lowercase

Implementation:

Password strength:

SSO (Single sign-on)

If credentials leak, this could give access to more than one application/website.

Examples: OAuth, Google, Facebook, Twitter, LinkedIn, Github, etc.

Password hash cracking

Fcrack zip

sudo port install fcrackzip

-l (#-#): specify the minimum and maximum length of passwords to check -b : use brute force to crack the password -c (charset): specify the character set to use -u : unzip / filter incorrect passwords

Client certificate

Authenticate clients with certificates