Share
Embed
Transcript
164 slides
-
How to Secure Your Secret 2019.05.08 Brice Bang Buzzvil No
one knows but you Security Goal -
How to Secure Your Secret 2019.05.08 Brice Bang Buzzvil No
one knows but you Security Goal Password -
Contents • A Password-ful World • Beyond Password • A
Password-less World -
The input sequence of 我的密嗎(my password) in Chinese Zhuyin Keyboard
https://haveibeenpwned.com/ (HIBP) -
Strong Password Guidelines • Increase Entropy (the number of all
cases) • as long as possible • as random as possible • Do not reuse password • Check if the password is compromised (HIBP) • Its API is implemented with K-Anonymity • Different password for different sites -
Length vs Complexity for Passwords • Password length increases the
complexity exponentially -
Length vs Complexity for Passwords pneumonoultramicroscopicsilicovolcanoconiosis [명] (병리) =pneumoconiosis. 가장
긴 단어로서 종종 인용된다. [N] (pathology) It is often quoted as the longest word. -
Length vs Complexity for Passwords pneumonoultramicroscopicsilicovolcanoconiosis [명] (병리) =pneumoconiosis. 가장
긴 단어로서 종종 인용된다. [N] (pathology) It is often quoted as the longest word. Isn’t it good for password? -
Length vs Complexity for Passwords Do not make the password
too long if you type frequently -
According to the UK Cyber Survey of NCSC Most used
in total Names Premier League football teams Musicians Fictional characters 123456 (23.2m) ashley (432,276) liverpool (280,723) blink182 (285,706) superman (333,139) 123456789 (7.7m) michael (425,291) chelsea (216,677) 50cent (191,153) naruto (242,749) qwerty (3.8m) daniel (368,227) arsenal (179,095) eminem (167,983) tigger (237,290) password (3.6m) jessica (324,125) manutd (59,440) metallica (140,841) pokemon (226,947) 1111111 (3.1m) charlie (308,939) everton (46,619) slipknot (140,833) batman (203,116) -
histories = { 00000: {0: 2, 1: 3}, 00001: {0:
3, 1: 1}, 00010: {0: 9, 1: 0}, 00011: {0: 5, 1: 4}, …. } -
histories = { 00000: {0: 2, 1: 3}, 00001: {0:
3, 1: 1}, 00010: {0: 9, 1: 0}, 00011: {0: 5, 1: 4}, …. } randomize! 🡨 🡨 -
Use Password Generator to Create Random Passwords It also •
Dramatically decreases the probability of using the compromised password • Prevents password reuse -
Strong Password Guidelines • Increase Entropy (the number of all
cases) • as long as possible • as random as possible • Do not reuse password • Check if the password is compromised (HIBP) • Its API is implemented with K-Anonymity • Different password for different sites ✓ ✓ ✓ ✓ -
Strong Password Guidelines • Increase Entropy (the number of all
cases) • as long as possible • as random as possible • Do not reuse password • Check if the password is compromised (HIBP) • Its API is implemented with K-Anonymity • Different password for different sites ✓ ✓ ✓ ✓ -
How to Manage Lots of Password • Limited human memory
• Too many passwords to remember if we use different passwords for different sites • Do you remember the password Chrome suggested? • Write somewhere • In TXT file • Take pictures • In cloud storage with encryption (Evernote, Dropbox, Google Drive, …) • … -
A Password Manager • Assists in • generating and retrieving
complex passwords (password generator) • storing passwords in encrypted database • auto-typing the password in the login form: Autofill • Pros • Only need to remember one master password • Easy to create, store and type the password • Prevent phishing • Cons • Some flaws may be exist • Save my password on cloud Autofill -
Outsider (Korean Rapper) Company ID: Buzzvil ID: brice.bang PW: strongpassword
ID: employee number PW: (same as main page) strongpassword -
Outsider (Korean Rapper) Company ID: Buzzvil ID: brice.bang PW: strongpassword
ID: employee number PW: (same as main page) strongpassword -
Outsider (Korean Rapper) Company ID: Buzzvil ID: brice.bang PW: strongpassword
ID: employee number PW: (same as main page) strongpassword -
Outsider (Korean Rapper) Company ID: Buzzvil ID: brice.bang PW: strongpassword
ID: employee number PW: (same as main page) strongpassword -
Save as Plain Text The hacker uploaded the database dump
on PasteBin Winwinsoft denied our proposal to negotiate with us. But, we are generous and our window to negotiations is still open. We will disclose every information we have in a few days if the negotiation is denied. Until then, stay tuned :) P.S. Here are some informations that we have. -
Save as Plain Text The hacker uploaded the database dump
on PasteBin Winwinsoft denied our proposal to negotiate with us. But, we are generous and our window to negotiations is still open. We will disclose every information we have in a few days if the negotiation is denied. Until then, stay tuned :) P.S. Here are some informations that we have. -
Save as Plain Text The hacker uploaded the database dump
on PasteBin Winwinsoft denied our proposal to negotiate with us. But, we are generous and our window to negotiations is still open. We will disclose every information we have in a few days if the negotiation is denied. Until then, stay tuned :) P.S. Here are some informations that we have. It is dangerous because people generally use the same password on multiple services -
Requirements • Based on user’s password • Available for authentication
• Don’t save as plain text • … Symmetric key cryptography Asymmetric key cryptography Cryptographic hash function One-time password Cryptographic random Public key infrastructure Diffie-Hellman key exchange -
Cryptographic Hash Function • Hash Function with cryptographic properties •
Hash Function • Any function that maps data of arbitrary size to data of a fixed size • Cryptographic Properties • Pre-image resistance • given h1, find m1 that h(m1) = h1 • Second pre-image resistance • given m1, find m2 that h(m1)=h1=h(m2) • Collision resistance • find any m1, m2 that h(m1)=h(m2) • if P = Pi, h(P) = Pi • ex) MD5, SHA-N -
Cryptographic Hash Function • mystrongpassword • 40B4FCF08C5AA55DE46384513B21F0888AAFEEFCD73EB7CBA1BCC 5A84E97117A • mystrongpassword2
• 24038067DB337E1726EDBCBA90ED56EEF17A573A666A73D2E9D1C A628055BBA0 -
Cons of Cryptographic Hash Function • Surprisingly, cryptographic hash functions
are not designed for hashing password • Why? • Recognizability • Too Fast -
Cons of One-Way Hash Function - Recognizability • Same passwords
have same hashes • Rainbow Table id password_hash john 5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8 young 5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8 -
Salt • A random string added to password before hashing
• Saved alongside the hashed output in the database id salt to_be_hashed password_hash john k5kgHa2Rta k5kgHa2Rtapassword e020a56cc237fa2a6640aef6bf5b262256c603bc young sJXIhDiK3q sJXIhDiK3qpassword 9ffbf61794b11ebe929a18b722b0cec38bdefd51 -
Cons of One-Way Hash Function – Speed Original password can
be found on average of • 9.2 hours on a single core • 1.15 hours on a 8 cores -
Key Stretching • Techniques used to make a key more
secure by increasing the resources (time and space) it takes to test each possible key -
Key Derivation Function (KDF) • It derives one or more
secret keys from a secret value using pseudorandom function • Has the characteristics for a password hash function • DK = KDF(key, salt, iterations) • ex) • PBKDF2: NIST standard, government-friendly • bcrypt • scrypt • argon2: Password Hashing Competition Winner Master Key KDF Secret Key -
Our Solutions 1. How to create password securely • Password
generator 2. How to manage password securely • Password manager 3. How to transfer password securely • TLS 1.2+ 4. How to save password securely • argon2, PBKDF2 -
Our Solutions 1. How to create password securely • Password
generator 2. How to manage password securely • Password manager 3. How to transfer password securely • TLS 1.2+ 4. How to save password securely • argon2, PBKDF2 Do you feel safe? -
Vulnerability of Password Managers Password Managers: Under the Hood of
Secrets Management -
Vulnerability of Your Network - Phishing TLS and HTTPS don’t
mean that you’re connecting a safe -
Vulnerability of Your Browser - Phishing What we see is
not always true -
Vulnerability of Your Browser - Phishing What we see is
not always true Fake Address Bar Real Address Bar -
Contents • A Password-ful World • Beyond Password • A
Password-less World -
Contents • A Password-ful World • Beyond Password • A
Password-less World -
FIDO Alliance • FIDO: Fast IDentify Online • Problems •
Create a standard for interoperability among strong authentication devices • Solve the problems users face creating and remembering multiple accounts • Core values • Easy of use • privacy and security • standardizations -
What is the problem of password and OTP? First Factor
Second Factor -
FIDO’s Solutions • FIDO U2F: The Replacement for The Second
Factor • FIDO UAF: The Replacement for The First Factor -
FIDO Universal Second Factor (U2F) • An open authentication standard
that strengthens and simplifies 2FA hosted by the FIDO Alliance • What if I lost? Yubico YubiKey -
FIDO Universal Second Factor (U2F) • An open authentication standard
that strengthens and simplifies 2FA hosted by the FIDO Alliance • What if I lost? • The acquired can use it as his own U2F without knowing my account credentials Yubico YubiKey -
Contents • A Password-ful World • Beyond Password • A
Password-less World -
Contents • A Password-ful World • Beyond Password • A
Password-less World -
Recall Our Solutions 1. How to create password securely •
Password generator 2. How to manage password securely • Password manager 3. How to transfer password securely • TLS 1.2+ 4. How to save password securely • argon2, PBKDF2 5. Beyond Password • Multi-factor authentication (U2F) -
Recall Our Solutions 1. How to create password securely •
Password generator 2. How to manage password securely • Password manager 3. How to transfer password securely • TLS 1.2+ 4. How to save password securely • argon2, PBKDF2 5. Beyond Password • Multi-factor authentication (U2F) What is the REAL problem? -
Security: No one knows but you and server and your
computer and your password manager -
Security: No one knows but you and server and your
computer and your password manager and JD -
Security: No one knows but you and server and your
computer and your password manager and JD -
Authentication with Password Client Server id: user, pw: P@ssw0rd check
hash = H(P@ssw0rd + salt) POST Request (id, pw) Search the ‘user’ entry Get salt and hash Response succeeded or failed -
Authentication without Password Client Server return create_challenge(id) POST Request (id)
return validate(attestation, (challenge, domain), public_key) User verification attestation = sign((challenge, domain), private_key) Send response with the attestation Get public key from database Domain Id Private Key Public Key site.com user 0x570930d6 0x6b6bac8c Id Public Key user 0x6b6bac8c -
Authentication without Password Authenticator (UAF) Server return create_challenge(id) POST Request
(id) return validate(attestation, (challenge, domain), public_key) User verification attestation = sign((challenge, domain), private_key) Send response with the attestation Get public key from database Domain Id Private Key Public Key site.com user 0x570930d6 0x6b6bac8c Id Public Key user 0x6b6bac8c Client -
Authentication without Password Authenticator (UAF) Server return create_challenge(id) POST Request
(id) return validate(attestation, (challenge, domain), public_key) User verification attestation = sign((challenge, domain), private_key) Send response with the attestation Get public key from database Domain Id Private Key Public Key site.com user 0x570930d6 0x6b6bac8c Id Public Key user 0x6b6bac8c Client Password-Less World -
Password-less World • Hackers cannot get the passwords or private
keys • Because it is not in the world • Servers save and manage the public key with a little less effort • Because it is meaningless for others • Client vulnerabilities are meaningless • Because there is no protocol that retrieves the private key from the authenticator • Easy to human beings • Don’t need to create, remember and type the complicated passwords -
Authenticator • There are two things you must keep safe
• The authenticator • The verification code (PIN, biometrics) • The private keys never leave it • Physically separated from other devices • Authenticator doesn’t save your verification code • No one knows but you • Separates user verification from authentication Feitian (飞天) BioPass FIDO2 -
Authentication without Password Authenticator Server return create_challenge(id) POST Request (id)
return validate(attestation, (challenge, domain), public_key) User verification attestation = sign((challenge, domain), private_key) Send response with the attestation Get public key from database Domain Id Private Key Public Key site.com user 0x570930d6 0x6b6bac8c Id Public Key user 0x6b6bac8c Client -
Authentication without Password Authenticator Server return create_challenge(id) POST Request (id)
return validate(attestation, (challenge, domain), public_key) User verification attestation = sign((challenge, domain), private_key) Send response with the attestation Get public key from database Domain Id Private Key Public Key site.com user 0x570930d6 0x6b6bac8c Id Public Key user 0x6b6bac8c Client FIDO UAF (Universal Authentication Framework) -
Authentication without Password Authenticator Server return create_challenge(id) POST Request (id)
return validate(attestation, (challenge, domain), public_key) User verification attestation = sign((challenge, domain), private_key) Send response with the attestation Get public key from database Domain Id Private Key Public Key site.com user 0x570930d6 0x6b6bac8c Id Public Key user 0x6b6bac8c Client FIDO UAF (Universal Authentication Framework) CTAP (Client to Authenticator Protocol) -
Authentication without Password Authenticator Server return create_challenge(id) POST Request (id)
return validate(attestation, (challenge, domain), public_key) User verification attestation = sign((challenge, domain), private_key) Send response with the attestation Get public key from database Domain Id Private Key Public Key site.com user 0x570930d6 0x6b6bac8c Id Public Key user 0x6b6bac8c Client FIDO UAF (Universal Authentication Framework) CTAP (Client to Authenticator Protocol) W3C’s WebAuthn (Web Authentication) -
Authentication without Password Authenticator Server return create_challenge(id) POST Request (id)
return validate(attestation, (challenge, domain), public_key) User verification attestation = sign((challenge, domain), private_key) Send response with the attestation Get public key from database Domain Id Private Key Public Key site.com user 0x570930d6 0x6b6bac8c Id Public Key user 0x6b6bac8c Client FIDO UAF (Universal Authentication Framework) CTAP (Client to Authenticator Protocol) W3C’s WebAuthn (Web Authentication) FIDO2 -
FIDO1 • FIDO U2F (CTAP1) • Universal Second Factor •
Add strong second factor • Press button • FIDO UAF • Universal Authentication Framework • Replace the password • Register the device to the online services • thumbprint, camera, mic, PIN, … -
Status of FIDO2 Authenticator • YubiKey 5 of Yubico •
The popular secret key • https://www.yubico.com/ • concerns • Moved to closed source • Solo • The first open source FIDO2 security key • https://shop.solokeys.com/ -
Recommended Resources • https://fidoalliance.org/fido2/ • https://www.w3.org/TR/webauthn/ • https://medium.com/@herrjemand/introduction-to-webauthn-api-5fd 1fb46c285 •
https://slides.com/fidoalliance/jan-2018-fido-seminar-webauthn-tuto rial • PasswordsCon 2018: WebAuthn and security keys (video, slide) • Google I/O ‘18: What's new with sign up and sign in on the web • BSidesSF 2019 - Navigating Passwordless Authentication with FIDO2 & WebAuthn • Google and Microsoft Debut: Replacing Passwords with FIDO2 Authentication • https://www.reddit.com/r/passwords -
Thank you • TLDL • Use FIDO2 for a first
factor (Former UAF) • Use FIDO2 for a second factor (Former U2F) -
Have I Been Pwned (HIBP) API with K-Anonymity Client Server
Get a string to be checked: P@ssw0rd SHA1(P@ssw0rd)=21BD12DC183F740EE76F27B78EB39C8AD972A 757 GET Request first 5 characters (https://api.pwnedpasswords.com/range/21BD1) Search the hashes start from query param 1.(21BD1) 0018A45C4D1DEF81644B54AB7F969B88D65:1 (password "lauragpe") 2.(21BD1) 00D4F6E8FA6EECAD2A3AA415EEC418D38EC:2 (password "alexguo029") 3.(21BD1) 011053FD0102E94D6AE2F8B83D76FAF94F6:1 (password "BDnd9102") 4.(21BD1) 012A7CA357541F0AC487871FEEC1891C49C:2 (password "melobie") 5.(21BD1) 0136E006E24E7D152139815FB0FC6A50B15:2 (password "quvekyny") Return the list with its count Find the correct hash -
Salt and Pepper • Salt • A random string added
to password before hashing • Saved alongside the hashed output in the database • Pepper • A secret added to password prevent • Stored separately