Lecture 4-Password Authentication
Lecture 4-Password Authentication
• Overview
• Authentication Mechanism
o Something you know, you have, you are
• Attacks
o On authentication process
o Searching password (Exhaustive, Guessing, Dictionary)
o Stealing of password
• Password Strength and Entropy
• Multi-Factor Authentication & Multi-Step Authentication
0 Admin
Admin
• Quiz 2
o Open at 12 PM, closed tomm 23.59. NO extension will be given
• Assignment 1
o Deadline: 7th March 2025
o Piazza for questions
o Zoom consultation with assignment TA next week: 20th Feb, 2 PM – 4 PM
o Submission guidelines
o Plagiarism
1 Recap
Integrity and Authentication
• MAC and digital signature provides communicating entity and data origin
authentication
• To attain communicating entity authentication, we need some information
bound to the owner.
• Credentials: pieces of information that verify the identity of an individual
o A user provides credentials to prove their identity.
o If a user can provide the credentials, it is proof that the user is indeed who they claim to be.
Credentials: Three types
• Commonly used for used login system, device access, Wi-Fi security, etc
Passwords vs Secret Key
• Similarity:
o Both can be used for entity authentication
o Both are sensitive information, if compromised can lead to breaches
• Difference:
o Passwords are generated by human and can be remembered by human
o Secret keys are long binary sequence that are infeasible to be remembered by human
o Secret keys can be randomly generated or derived from password
Password System: Three Stages
(4) Registered
Password File
Bob 123456
Ali SesameOpen
Secure Alice OpenSesaMe
storage …
1. Bootstrapping Mechanism
(5) OTP
Server
(3) https://aaa.com/reset?OTP=13ac92DadvSEga5
aaa.com
(2) https://aaa.com/reset?OTP=13ac92DadvSEga5
• Security questions (or challenge questions) are used to authenticate users who
have lost their passwords.
• Idea: User may not remember arbitrary strings (i.e., password) but should know
the answers to personal questions without needing to memorize or guess.
o This mechanism was very common but less so now.
What property of
hash function is
• Password file never stored in clear text important here?
Hash
function
• Use of hashed passwords and a fixed-length
Why salt
random salt value (virtually all UNIX variants) Hash + salt important?
Password File
• Password + salt is hashed and stored in the User id Salt Hash
password file "nitya" 35ddc4dafe 42f749ade7
…
4 Attacks on Bootstrapping and Resetting
Attack the Bootstrapping: Default Password
• Goal:
o OTP (or token) that is included in the reset link
(https://aaa.com/reset?OTP=13ac92DadvSEga5)
o Change the victim’s password and take control of their account.
(4)https://evil.com/reset? (3)https://evil.com/reset?
OTP=13ac92DadvSEga5 OTP=13ac92DadvSEga5
• Input Validation: Ensure robust validation and sanitization of HTTP headers and
user inputs.
• Secure URL Generation: Use server-side configuration for generating URLs
• User Awareness: Educate users about recognizing phishing attempts and
verifying password reset emails.
• Mitigation using CAPTCHAs: ask a question about an image or audio file that
had been previously specified by the user.
5 Searching for Password
Password Guessing
• Goal: The attacker wants to find the password for some of them. Canvas
Guessed
• Step: writes an automated script that attempt to login to Canvas Passwords
using guessed passwords for each nusnet id. "abcdef"
• Guessing password: using some social information about the user. "123456"
• Mitigation: rate limiting and account lockout; strong password policy. …
• Tool: Hydra (open-source network login cracker) …
Dictionary Attacks: Offline Dictionary Attack
Password Hash
• Mitigation: adding salt to password and then
"abcdef" 42f749ade7f
hash lead to increased attack complexity Comp
are? "123456" 195bf4753fd
• Tool: John the Ripper
…
Other Mitigation Techniques
• Limited login attempts (for online password cracking): Add delay into login
session, lock the account after a few failed attempts
• Password checker or metering (for offline password cracking): System checks
for weak password when user registers/ changes password
• Password usage policy: Users must use strong passwords
• User Training:
o Workshop, reminders
o Embedded Phishing Exercise
− Similar to fire drill, authorized entities send out “phishing” emails to employees.
• Blacklisting
o Repository site keeping lists of phishing site. Example: https://phishtank.com/
o Organization actively monitor for phishing site. When a site is found, blacklist it.
o Blacklist used by browser or firewall.
7 Password Strength
Guidelines for Strong Password
• Proactive password checker: At the time of selection, the system checks to see
if the password is allowable and, if not, rejects it.
o strike a balance between user acceptability and strength
Key Strength vs Password Strength
• In encryption, we “quantify” the key-strength by the size of the key if best known
attack is exhaustive search.
o E.g. Strength of 128-bit AES key is: 128 bits. (exhaustive search goes through 2128 keys)
o E.g. Strength of 256-bit SHA is: 128 bits
src
Example Calculation
• Offline: When offline attacks are possible, the requirement on passwords must
be stricter.
o One would expect that it should be equivalent to requirement of symmetric key.
o Since NIST recommend 128 bits for crypto keys, in this course, let’s take 128 bits entropy as
the requirement.
8 Something the User Is: Biometric
Essentially, Biometric Data is the Password
Enrolment e.g., face, For greater accuracy,
fingerprints, several templates may
iris be recorded, possibly for
Scanner more than one finger.
Database:
Alice – template1.0,1.1,1.2
Bob – template 2.0,2.1,2.2
Verification (Authentication)
Accept
• Time-based:
o Both the user device (e.g., phone) and the server share a secret key.
o Using this secret key and the current time as inputs, an algorithm generates the same OTP on
both the user's device and the server.
o E.g., Google Authenticator
• Sequence-based:
o Both the server and the user's device maintain a counter along with the secret key.
o Upon each event (e.g., button press), the counter increments, and an algorithm uses it with the
shared secret to generate the OTP.
o E.g., hardware tokens
n-Factor Authentication (2FA) and
10 Multi-Step Verification
n-factor Authentication
• Registration: User gives the server his mobile phone number and password.
• Authentication:
o User sends password and username to server.
o Server verifies that the password is correct.
o Server sends a one-time-password (OTP) to the user through SMS.
o User receives the SMS and enters the OTP.
o Server verifies that the OTP is correct.
• Authentication:
o User inserts smartcard to the reader.
o The reader obtains the user identity and verifies whether the smart card is authentic. If so, continue.
o User presents fingerprint to the reader.
o The reader performs matching to verify that it is authentic. If so, open door.
• Many online platforms use email account as the additional factor (e.g. to login,
need a password and a link that is sent to the email account).
• Some may argue that since email account can be accessed using another
password, hence basically it is 2-password authentication method.
• Both are “what-you-know” and thus cannot be called “2-factor”.
• Password strength
o Online vs offline dictionary attack.
• Attacks on passwords
• 2-factor vs 2-steps verification.
Optional Slides
Token: ATM Card
• To get authenticated, the user presents (1) a card, and (2) a PIN.
o The card contains a magnetic strip, which stores the user account id.
o The PIN plays the role of password.
• Data are encoded into the magnetic strip using well-known standards.
• Given physical access to a card, anyone (including attackers) can “copy” the card
by reading the info from the card and writing it to the spoofed card.
• So, it is easy to forge the card.
Attack: ATM Skimmer
• A skimmer is a card reader that can be disguised to look like part of an
ATM.
• The skimmer device collects card numbers and PIN codes, which are
then replicated into counterfeit cards.
• For PINS, either a tiny, concealed camera placed near the keypad or
fake keypad is placed over the real one.
• Mitigation: src
o Use of chip-enabled cards, which are more secure than magnetic stripe cards
and harder to skim
o Anti-Skimmer device
o Regular inspection and awareness among users
src
Example of 2FA (3): Password + OTP Token
• Authentication:
o User “presses” the token.
o The token generates and displays a one-time-password.
o User sends password, username, and OTP to server.
o The server can also compute the OTP and verifies that the OTP and password are correct.
• Authentication:
o The Soft token app establishes connection to the server, using the secret key k for authentication.
o User via another apps or browser, send request for a transaction T to the server.
o The apps/browser asked for user password.
o The server contact the Soft-Token and T is displayed on the app. The user confirms the transaction.
o After received confirmation from Soft-Token, carry out the transaction.