InfoSec in Practice
for
Product & Engineering
“SECURING PASSWORDS”
Mandeep Singh
Password Breaches (just a fraction)
Prior
• Yahoo: 3 Billion (Bcrypt
and MD5 hash)
• LinkedIn: 6 million (SHA1
hashed, unsalted)
• Twitter: 250,000
(hashed, salted)
• Adobe: 38 million
password hints, and
hashed passwords
2015
LastPass:
master
passwords
(PBKDF2 and
salts)
2016
Dropbox: 68
million (SHA1
and bcrypt
hashes, salts)
2017
Equifax
(plaintext and
defaults)
2018
Facebook
(plaintext)
2019
Capitol One
(pending?)
IEEE Secure Design – Top 10
1. Never assume trust 6. Use cryptography correctly
2. Use authentication that cannot be bypassed or
tampered
7. Identify sensitive data and how they should be
handled
3. Use authentication that cannot be bypassed or
tampered
8. Always consider the users
4. Strictly separate data and control 9. Understand how integrating external components
changes your attack surface
5. Ensure all data is explicitly validated 10. Be flexible when considering future changes to
objects and actors
Password Attack Approaches
Target Attack Methods Prevention Methods
Application Databases Brute Force
Dictionary
Rainbow Tables
Offline Cracking
Better Implementation
Multifactor
Network Man in the Middle
Certificate High jacking
Secure Protocols
Human Emotions Phishing / Malware Anti-virus/Anti-Malware
Firewall
Multifactor
Human Emotions Social Engineering
Shoulder Surfing,
Guess
Training / Education
Awareness of Surroundings
Multifactor
Corporate Literature Spidering Password Managers
Multifactor
What is the drawback of internet based password protection tools?
Password Hashes
MD5
SHA, SHA256, SHA512, …
PBKDF2
Bcrypt
Scrypt
Argon2 (Winner 2015 password hash competition)
Stronger Algorithms consider:
◦ Time cost, which defines the execution time
◦ Memory cost, which defines the memory/storage usage
◦ Parallelism degree, which defines the number of threads
What are Rainbow Tables?
Precomputed hash chains
Simple cracking to search-and-compare operation on the table.
The exact password string isn’t necessary (Hash Collisions)
Makes it trivial to crack password hashes
How to defeat?
◦ Use of salts
Salt Implementations
Good
• Random number using
standard libraries
• Make salts same length as
hash output
• Hash on server side
Bad
• Keys that cannot be changed
• Same salt for new password
• DO NOT write your own hash
• MD5( SHA1(password,salt))
• SHA1(SHA1(password,salt))
Two Factor / Multi-Factor
• Different Factors
• What you know (passwords)
• What you have (Certificates, RSA FOB, Yubikey)
• Who you are (fingerprint, retina, face, voice, walking,
DNA, etc.)
• Where you are (Location, IP address)
Based On
• Two or more in the same factor type
• Face + fingerprint
Not
Based On
Password less Authentication
Known Devices
• Yubikeys
• PKI Auth
Who you are?
• Using Fingerprints
• Facial Recognition
• Voice Recognition
Where you are?
• IP Address
• Takes into account impossible travel
Takeaway
Do’s
• Build security in at design stage
• Your company standard hash for all
apps
• Large Service account passwords (26
characters)
• Best practices for Salts
• Multi-factor authentication,
whenever possible
• Encrypt all data transport
Don’ts
• Invent your own hashing algorithm
(Kerckhoffs’ principle - 1883)
• Embed db/file passwords in your
applications or databases
• Share service passwords or keys
• Log private data such as passwords,
not even for debugging

Securing Passwords

  • 1.
    InfoSec in Practice for Product& Engineering “SECURING PASSWORDS” Mandeep Singh
  • 2.
    Password Breaches (justa fraction) Prior • Yahoo: 3 Billion (Bcrypt and MD5 hash) • LinkedIn: 6 million (SHA1 hashed, unsalted) • Twitter: 250,000 (hashed, salted) • Adobe: 38 million password hints, and hashed passwords 2015 LastPass: master passwords (PBKDF2 and salts) 2016 Dropbox: 68 million (SHA1 and bcrypt hashes, salts) 2017 Equifax (plaintext and defaults) 2018 Facebook (plaintext) 2019 Capitol One (pending?)
  • 3.
    IEEE Secure Design– Top 10 1. Never assume trust 6. Use cryptography correctly 2. Use authentication that cannot be bypassed or tampered 7. Identify sensitive data and how they should be handled 3. Use authentication that cannot be bypassed or tampered 8. Always consider the users 4. Strictly separate data and control 9. Understand how integrating external components changes your attack surface 5. Ensure all data is explicitly validated 10. Be flexible when considering future changes to objects and actors
  • 4.
    Password Attack Approaches TargetAttack Methods Prevention Methods Application Databases Brute Force Dictionary Rainbow Tables Offline Cracking Better Implementation Multifactor Network Man in the Middle Certificate High jacking Secure Protocols Human Emotions Phishing / Malware Anti-virus/Anti-Malware Firewall Multifactor Human Emotions Social Engineering Shoulder Surfing, Guess Training / Education Awareness of Surroundings Multifactor Corporate Literature Spidering Password Managers Multifactor What is the drawback of internet based password protection tools?
  • 5.
    Password Hashes MD5 SHA, SHA256,SHA512, … PBKDF2 Bcrypt Scrypt Argon2 (Winner 2015 password hash competition) Stronger Algorithms consider: ◦ Time cost, which defines the execution time ◦ Memory cost, which defines the memory/storage usage ◦ Parallelism degree, which defines the number of threads
  • 6.
    What are RainbowTables? Precomputed hash chains Simple cracking to search-and-compare operation on the table. The exact password string isn’t necessary (Hash Collisions) Makes it trivial to crack password hashes How to defeat? ◦ Use of salts
  • 7.
    Salt Implementations Good • Randomnumber using standard libraries • Make salts same length as hash output • Hash on server side Bad • Keys that cannot be changed • Same salt for new password • DO NOT write your own hash • MD5( SHA1(password,salt)) • SHA1(SHA1(password,salt))
  • 8.
    Two Factor /Multi-Factor • Different Factors • What you know (passwords) • What you have (Certificates, RSA FOB, Yubikey) • Who you are (fingerprint, retina, face, voice, walking, DNA, etc.) • Where you are (Location, IP address) Based On • Two or more in the same factor type • Face + fingerprint Not Based On
  • 9.
    Password less Authentication KnownDevices • Yubikeys • PKI Auth Who you are? • Using Fingerprints • Facial Recognition • Voice Recognition Where you are? • IP Address • Takes into account impossible travel
  • 10.
    Takeaway Do’s • Build securityin at design stage • Your company standard hash for all apps • Large Service account passwords (26 characters) • Best practices for Salts • Multi-factor authentication, whenever possible • Encrypt all data transport Don’ts • Invent your own hashing algorithm (Kerckhoffs’ principle - 1883) • Embed db/file passwords in your applications or databases • Share service passwords or keys • Log private data such as passwords, not even for debugging

Editor's Notes

  • #3 Small List, many more incidents exist. No conversation about breach is complete with talking about the Yahoo breach where 3 billion users were compromised. Over 1Billion using MD5 hash.
  • #4 Design flaws that lead to security vulnerabilities. Build security in the design not afterthought otherwise the team deals with it for foreseeable future Remove or block unused execution paths or code branches Eradicate unused features or APIs. We will see what use of bad hashing can result
  • #5 Password managers based on the internet are exposed to all the vulnerabilities of the internet – spoofing, man-in-the-middle, leaked/stolen keys. Examples include Lastpass and others in news multiple times
  • #6 Any cryptographic hash function is that it should be computationally infeasible to find two distinct messages that hash to the same value.
  • #8 Pepper implementations are uncommon and like anything if used improperly will reduce hash entropy
  • #11 Open standards are much better than closed standards (Kerckhoffs’ principle - 1883)