justinmayer / kagi

WebAuthn security keys and TOTP multi-factor authentication for Django
BSD 2-Clause "Simplified" License
92 stars 10 forks source link

Brute-force protection on TOTP #50

Open spookylukey opened 2 years ago

spookylukey commented 2 years ago

It looks like there is no brute-force protection on the TOTP implementation, without which it is quite vulnerable (i.e. can be brute-forced within a few hours/days in a typical setup). See https://lukeplant.me.uk/blog/posts/6-digit-otp-for-two-factor-auth-is-brute-forceable-in-3-days/ for more info, and this commit for django-otp where I fixed the issue with exponential backoff throttling (it may have evoloved since then).