+ All Categories
Home > Software > Slow Down Online Guessing Attacks with Device Cookies

Slow Down Online Guessing Attacks with Device Cookies

Date post: 12-Apr-2017
Category:
Upload: anton-dedov
View: 19 times
Download: 0 times
Share this document with a friend
23
Slow Down Online Guessing Attacks with Device Cookies Anton Dedov OWASP Russia Meetup #6, 2017
Transcript
Page 1: Slow Down Online Guessing Attacks with Device Cookies

Slow DownOnline Guessing Attacks

with Device CookiesAnton Dedov

OWASP Russia Meetup #6, 2017

Page 2: Slow Down Online Guessing Attacks with Device Cookies

Anton DedovSecurity ArchitectOdin / Ingram Micro

[email protected]@brutemorse

Page 3: Slow Down Online Guessing Attacks with Device Cookies

Intro: Online guessing attacks

Page 4: Slow Down Online Guessing Attacks with Device Cookies
Page 5: Slow Down Online Guessing Attacks with Device Cookies
Page 6: Slow Down Online Guessing Attacks with Device Cookies
Page 7: Slow Down Online Guessing Attacks with Device Cookies

Attacker goals

Password for specific accountPassword for any account in a systemPassword for any account in any system

Page 8: Slow Down Online Guessing Attacks with Device Cookies

Threats for Authentication

Online attacksOffline attacksPassword leaks

Page 9: Slow Down Online Guessing Attacks with Device Cookies

user : password1

Online guessing attacks

user : password2user : password3

...

Page 10: Slow Down Online Guessing Attacks with Device Cookies

Authentication attacks: Mitigations

M-FA / M-Step UX!Password policy Magic 106

Rate limiting Authentication parameters e.g. time, location, etc.Monitoring e.g. haveibeenpwned.com

Page 12: Slow Down Online Guessing Attacks with Device Cookies

Rate limiting

CAPTCHAAccount lockoutExponential timeoutsProof of work

Page 13: Slow Down Online Guessing Attacks with Device Cookies

Account lockout: simple math

5 attempts ⇒ 20 min. lockout131400 attempts/year

Page 14: Slow Down Online Guessing Attacks with Device Cookies

Account lockoutLock account Effective

Easy DoS

Lock (account, IP) Somewhat DoS mitigationBotnetsProxiesIPv6DoS as a collateral damage

Page 15: Slow Down Online Guessing Attacks with Device Cookies

Device CookieDistinguish known clients from unknown ones

Page 16: Slow Down Online Guessing Attacks with Device Cookies
Page 17: Slow Down Online Guessing Attacks with Device Cookies
Page 18: Slow Down Online Guessing Attacks with Device Cookies

Lockout all unknown devices at once

Lockout individual userper device cookie

user : passworduser : passwordDevice Cookie

Page 19: Slow Down Online Guessing Attacks with Device Cookies

Set-Cookie: KnownDevice=LOGIN|NONCE|HMAC(secret-key,LOGIN|NONCE)

Page 20: Slow Down Online Guessing Attacks with Device Cookies

Set-Cookie: KnownDevice=JWT{ "alg": "HS256", "typ": "JWT”} . { "aud": "device-cookie", "sub": "[email protected]", "jti": "40e2a97a2ab37406”}

Page 21: Slow Down Online Guessing Attacks with Device Cookies

Threats & MitigationsThreat MitigationOnline attack against one user Password policyOnline attack using stolen device cookies Limited, prevent cookie leaks

Online attack against multiple users Not mitigatedSpoof device cookie CryptoTamper with existing device cookie CryptoDoS for specific account OOB device cookie issueDoS for specific account when client is used by different accounts

Device cookies per account

Page 22: Slow Down Online Guessing Attacks with Device Cookies

Implementation recommendations

Use good crypto, like HMAC-SHA2 or signed JWT.Prevent cookie leakage with Secure & HttpOnly flags.Issue cookie for valid reset password link.Issue new device cookie after each successful login.Include user ID into cookie name (privacy concerns?).


Recommended