Cybersecurity — University of Bologna, ISI LM

User Authentication

Chapter 3 — Computer Security: Principles and Practice (Stallings & Brown)

In this lesson

1. What Is User Authentication?

User authentication is the fundamental building block of computer security and the primary line of defense. It is the process of verifying an identity claimed by or for a system entity (RFC 2828). It consists of two distinct steps:

Think about it

Face ID: is your face your identifier or your password? The answer is that your face is your identifier only if the system recognises you as a specific individual (identification). In most phone implementations, your face is a password used to verify that you are the authorised owner of the device — the identifier is the device itself.

The user ID serves three critical security purposes: (1) it determines whether the user is authorised to access the system, (2) it determines the user's privileges, and (3) it is used in discretionary access control (e.g., granting permission to other users to read files you own).

2. The Four Means of Authentication

There are four general means of authenticating a user's identity, which can be used alone or in combination:

Exam tip

The four means are a classic exam question. Memorise the categories and be ready to give examples for each. The password recovery (security) questions fall under "something the individual knows" — and they must be as secure as the password itself.

3. Password-Based Authentication

Password authentication is the most widely used line of defense against intruders. The user provides a name/login (user ID) and a password; the system compares the password with the one stored for that login.

Despite its many security vulnerabilities, passwords remain the most commonly used user authentication technique for several reasons: client-side hardware (fingerprint scanners, smart card readers) requires software support on both client and server, creating a who-goes-first stalemate; physical tokens are expensive or inconvenient; single sign-on creates a single point of risk; and automated password managers have poor roaming/synchronisation support.

4. Password Vulnerabilities and Attacks

The textbook identifies the following principal attack strategies against passwords:

AttackDescriptionCountermeasure
Offline dictionary attackAttacker obtains the password file, compares hashes against common passwordsAccess control on password file, intrusion detection, rapid password reissuance
Specific account attackAttacker targets a specific account with repeated password guessesAccount lockout after a limited number of failed attempts (typically 5)
Popular password attackAttacker tries a popular password against many user IDsPolicies against common passwords; scan IP addresses and client cookies
Password guessing against single userAttacker uses personal knowledge about the account holderTraining and enforcement of strong password policies
Workstation hijackingAttacker uses an unattended logged-in workstationAutomatic logout after inactivity; intrusion detection
Exploiting user mistakesWritten passwords, social engineering, preconfigured passwordsUser training, intrusion detection, multi-factor authentication
Exploiting multiple password useSame password on different network devicesPolicy forbidding same/similar passwords on different devices
Electronic monitoringEavesdropping on passwords communicated across a networkEncryption, challenge-response protocols
Important nuance

Simple encryption of a password does NOT fix the eavesdropping problem — the encrypted password becomes the password itself and can be observed and replayed by an adversary. What is needed is a challenge-response protocol (discussed below).

5. Online vs Offline Attacks

A crucial distinction in password attacks is whether the attack is performed online or offline:

CharacteristicOnline AttackOffline Attack
InteractionInteracts with a live service or resourceNo direct interaction with the target system
Data neededOnly the service endpointIntercepted or stolen data (e.g., password file)
DetectionPossible — rate limiting, lockout, loggingVery difficult — entirely under attacker's control
SpeedLimited by network latency and server rate limitsOnly limited by hardware (CPU/GPU speed)
ExampleSSH brute-force, web login guessingCracking a stolen /etc/shadow file with JtR

Offline attacks are significantly more dangerous because once the attacker has the password file, they can dedicate unlimited computational resources to cracking it without any interaction with the target system. This is why protecting the password file is critical.

6. Hashed and Salted Passwords

Storing passwords in cleartext is a very bad idea. A widely used security technique is to store hashed passwords with a salt value.

Loading a New Password

  1. The user selects (or is assigned) a password.
  2. A random salt value is generated — unique for each password.
  3. The password and salt are combined as input to a slow hash function.
  4. The resulting hash code is stored in the password file together with the salt value (in cleartext).

Verifying a Password

  1. The user provides their ID and password.
  2. The system retrieves the salt and stored hash for that user ID.
  3. The salt and provided password are hashed together.
  4. If the result matches the stored hash, the password is accepted.

Why Salt?

Unix Implementations

SchemeHashSaltOutputStatus
Original crypt(3)DES-based, 25 iterations12-bit11-char (56-bit key)Inadequate, broken
MD5 cryptMD5, 1000 iterationsUp to 48-bit128-bitReplaced by SHA-512
SHA-512 cryptSHA-51248+ bit512-bitCurrent standard
Bcrypt (OpenBSD)Blowfish-based128-bit192-bitMost secure, configurable cost
Exam tip

Know the three purposes of salt — this is a frequently asked question. Also understand why salt prevents detection of same-password users across systems: different salts mean different stored hashes even when the password is identical.

7. Password Cracking Techniques

Dictionary Attacks

The attacker develops a large dictionary of likely passwords and tries each against the password file. Each candidate password must be hashed using each stored salt value and compared to the stored hashes. If no match is found, the cracker tries variations: backward spelling, added numbers/symbols, character substitutions, etc.

Rainbow Table Attacks

To trade space for time, the attacker pre-computes a mammoth table of hash values for all possible (password, salt) combinations. This can crack passwords very quickly once the table is built. The defence is a sufficiently large salt value and hash length — both FreeBSD (MD5/SHA-512) and OpenBSD (Bcrypt) approaches are secure from this attack for the foreseeable future.

Modern Approaches

Key insight

Studies show that passwords provide fewer than 10 bits of security against online trawling attacks and only about 20 bits against optimal offline dictionary attacks. An attacker making 10 guesses per account (within rate limits) will compromise around 1% of accounts.

8. Password File Access Control

A key defence against password cracking is to deny the attacker access to the password file. Modern Unix-like systems use a shadow password file: the hashed passwords are stored in a separate file (e.g., /etc/shadow) accessible only by privileged users, while the user IDs remain in a world-readable file (/etc/passwd).

However, even with file protection, vulnerabilities remain:

Vulnerability

A shadow password file alone is not sufficient. After a data breach, the attacker may obtain the file through OS exploits, backup media, or permission accidents. Password selection policies must complement access control.

9. Password Selection Strategies

Four basic techniques are used to eliminate guessable passwords while allowing users to select memorable ones:

StrategyHow it worksProsCons
User educationTeach users importance of strong passwords and provide guidelinesLow cost, easy to implementOften ignored; users are poor judges of password strength
Computer-generated passwordsSystem assigns random passwords (e.g., FIPS 181 pronounceable syllables)Very strong against guessingHard to remember; users write them down; poor acceptance
Reactive password checkingSystem periodically runs its own password cracker, cancels guessed passwordsFinds weak passwords in useResource intensive; existing passwords remain vulnerable until found
Proactive password checkingSystem checks password at selection time and rejects weak onesBalances security and memorability; users choose their ownMust strike balance between acceptability and strength

Proactive Checking Approaches

Good practice

The best advice for choosing a password: use the first letter of each word of a phrase. Not a well-known phrase like "An apple a day keeps the doctor away" (Aaadktda), but something personal like "My dog's first name is Rex" (MdfniR) or "My sister Peg is 24 years old" (MsPi24yo).

10. Token-Based Authentication

Objects that a user possesses for user authentication are called tokens. The two most important categories are memory cards and smart cards.

Memory Cards

Memory cards can store but do not process data. The most common example is the magnetic stripe bank card. They can be used alone for physical access (hotel rooms) but provide significantly greater security when combined with a password or PIN (ATMs).

Drawbacks: require a special reader, token can be lost, information is often stored in cleartext, and hotel locks must be properly reprogrammed at each room change.

Smart Cards

Smart cards include an embedded microprocessor with processor, memory (ROM, EEPROM, RAM), and I/O ports. Some include cryptographic co-processors. They are categorised along four dimensions:

Exam tip

Be ready to explain the difference between memory cards and smart cards, the three authentication protocol types for smart tokens (static, dynamic password generator, challenge-response), and the difference between contact and contactless interfaces.

11. Biometric Authentication

Biometric authentication authenticates an individual based on unique physical characteristics. It is based on pattern recognition — unlike passwords, biometric samples rarely match exactly.

Physical Characteristics

Face
Low accuracy, low cost
Fingerprint
High accuracy, medium cost
Hand geometry
Low accuracy, low cost
Iris
Very high accuracy, high cost
Retina
High accuracy, high cost
Signature
Medium accuracy, low cost
Voice
Medium accuracy, low cost

Operation of a Biometric System

Enrollment: The user presents a name and PIN/password; the system senses the biometric characteristic, digitises it, extracts features, and stores the resulting template associated with the user ID.

Verification (1:1 matching): The user enters a PIN and provides a biometric sample. The system extracts the feature and compares it to the stored template for that user. Match = authenticated.

Identification (1:N matching): The user provides only the biometric sample. The system compares against all stored templates. Match = identified.

Exam tip

Know the difference between verification (1:1, user claims an identity) and identification (1:N, system finds the identity). Be able to give examples of both static (fingerprint, retina, face) and dynamic (voice, handwriting, typing rhythm) biometrics.

12. Multi-Factor Authentication

Multi-factor authentication (MFA) refers to the use of more than one of the four authentication means. Systems using two factors are stronger than those using one; systems using three are stronger than those using two.

Example (two-step authentication):

  1. Step 1: Something the user knows (username + password)
  2. Step 2: Something generated by a device owned by the user (dynamic PIN or one-time code delivered by SMS)
NIST deprecation

NIST has deprecated out-of-band verification using SMS: "Out of band verification using SMS is deprecated, and will no longer be allowed in future releases of this guidance." SMS is not good for security because it is vulnerable to SIM-swapping attacks.

A critical consideration is whether the second factor uses an in-band or out-of-band channel. If a single device (e.g., a PC) is used to input both factors, and that device is compromised, both factors are compromised. Always carefully consider the threat model — the security of the channel used for the second step is paramount.

13. Passkeys

Passkeys represent the next step in user authentication, aiming to completely replace traditional usernames and passwords:

Current status

Passkeys are only partially supported and deployed. Even if standardised, there are relevant limitations in interoperability. As with any authentication mechanism, the threat model must be carefully considered.

Legal note

Authentication based on biometrics can have different legal protection than passwords. The legal implications of passkeys (which combine biometrics with public-key cryptography) are still evolving.

14. Tutorial: John the Ripper

John the Ripper (JtR) is the most famous open-source password cracking tool. It is used for both offensive testing and defensive verification of password quality. Its efficiency depends on the available hardware (CPU vs GPU) and the cracking mode selected.

Understanding the Output

JtR combines different cracking modes in the most appropriate order: single crack mode first (quick, uses info from the input file), then wordlist mode with common dictionaries, optionally with rules for variations, and finally incremental mode (exhaustive brute-force). Runtime details are logged in john.log.

PDF Cracking with JtR

JtR can also verify passwords used to protect PDF documents. A protected PDF contains a hashed version of the password. Use pdf2john.pl to extract the hash, then crack it with:

./pdf2john.pl document.pdf > hash.txt
./john --format=pdf hash.txt
Think about it

Why do PDFs include a hashed version of the password? Without it, the only way to verify the password would be to attempt decryption — which is far more expensive. The hashed password enables quick verification but at the cost of enabling offline cracking attacks.

GPU-Based Cracking

GPUs enable significant speedup for password cracking due to their massive parallelism and hardware implementation of encryption ciphers. While JtR has limited GPU support, dedicated tools like Hashcat are better suited for GPU-accelerated cracking.

Past Exam Questions

What is a Registration Authority (RA)?

An RA (Registration Authority) is a trusted entity that establishes and vouches for the identity of an applicant to a Credential Service Provider (CSP). In the NIST SP 800-63-3 model, the applicant applies to the RA to become a subscriber of a CSP. The RA performs identity proofing before the CSP issues credentials.

What is a Credential Service Provider (CSP)?

A CSP (Credential Service Provider) is an entity that issues electronic credentials to subscribers. After the RA verifies the applicant's identity, the CSP engages in an exchange with the subscriber to issue a credential — a data structure that authoritatively binds an identity and attributes to a token possessed by the subscriber.

What is meant by User Authentication?

User authentication is the process of verifying an identity claimed by or for a system entity (RFC 2828). It consists of two steps: identification (presenting an identifier) and verification (presenting authentication information that corroborates the binding between the entity and the identifier). It is the fundamental building block and primary line of defense for access control and user accountability.

What can be used to authenticate a user?

Four means: something the individual knows (password, PIN, security answers), something the individual possesses (token, smartcard, key), something the individual is (static biometrics: fingerprint, retina, face), and something the individual does (dynamic biometrics: voice pattern, handwriting, typing rhythm).

What is multi-factor authentication?

Multi-factor authentication (MFA) refers to the use of more than one of the four authentication means. Implementations using two factors are stronger than those using only one. Example: password (something you know) + SMS code or dynamic PIN from a device (something you possess).

What is Assurance Level? And Potential Impact?

Assurance level describes an organisation's degree of certainty that a user has presented a credential referring to their identity. NIST SP 800-63-3 defines four levels (1 = little confidence to 4 = very high confidence). Potential impact (FIPS 199) defines the severity of an authentication error: Low (limited adverse effect), Moderate (significant adverse effect), or High (severe/catastrophic adverse effect). Higher impact systems require higher assurance levels.

How does password-based authentication work?

The user provides a name/login (user ID) and a password. The system compares the password against the stored value for that user ID. The user ID determines whether the user is authorised, determines their privileges, and is used in discretionary access control. Modern systems store hashed (not plaintext) passwords with a salt value.

What are the most common attacks against password-based authentication?

Offline dictionary attack, specific account attack, popular password attack, password guessing against single user, workstation hijacking, exploiting user mistakes (social engineering, written passwords, default passwords), exploiting multiple password use across devices, and electronic monitoring (eavesdropping on network traffic).

What is the salt value in authentication? What are its three purposes?

A salt is a random value combined with the password before hashing. Three purposes: (1) prevents duplicate passwords from being visible in the password file — different salts produce different hashes even for the same password; (2) greatly increases the difficulty of offline dictionary attacks — for a b-bit salt, the search space increases by a factor of 2b; (3) makes it nearly impossible to detect whether a user has the same password on different systems.

Where is the salt value stored? When is it generated? Does it change over time?

The salt is stored in cleartext in the password file alongside the hashed password. It is generated at the time the password is created or changed (using a pseudorandom or random number). The salt does not change over time — it remains constant for a given password. If the user changes their password, a new salt is generated.

What method do Unix systems use to manage passwords?

Unix systems use hashed passwords with a salt. The original scheme (crypt(3)) used DES-based hashing with a 12-bit salt, 25 iterations, producing an 11-character hash. This is now considered inadequate. Modern schemes use MD5/SHA-512 with larger salts (48+ bits) and more iterations (1000+). OpenBSD uses Bcrypt (Blowfish-based) with 128-bit salt and a configurable cost factor.

What is a password dictionary?

A password dictionary is a collection of common words, phrases, and variations used in dictionary attacks. It may include words from online dictionaries, common passwords from data breaches, personal information patterns, and permutations (backward spelling, number substitutions, capitalisation variants). Tools like John the Ripper come with built-in wordlists.

What is OpenBSD?

OpenBSD is a widely used open-source Unix-like operating system known for its focus on security. It developed Bcrypt, a hash function based on the Blowfish symmetric block cipher that is considered the most secure Unix hash/salt scheme. Bcrypt uses a 128-bit salt, produces a 192-bit hash, and includes a configurable cost variable that increases computation time.

What is John the Ripper?

John the Ripper (JtR) is the most famous open-source password cracking tool, first developed in 1996. It supports multiple cracking modes: single crack (using information from input file), wordlist/dictionary mode, rules-based mode (applying variations to dictionary words), and incremental (brute-force) mode. It is used for both offensive testing and defensive password quality verification.

What vulnerabilities remain if we encrypt the password file?

Even with encryption: (1) software vulnerabilities in the OS may allow bypassing access controls; (2) accidents of protection may render the file readable; (3) users who reuse passwords on other machines create cross-system vulnerabilities; (4) weak physical security may expose backup media; (5) network sniffing can capture passwords in transit.

What strategies can be adopted for choosing passwords?

Four strategies: (1) user education — teaching users to choose strong passwords; (2) computer-generated passwords — system assigns random (possibly pronounceable) passwords; (3) reactive password checking — system periodically runs a password cracker to find weak passwords; (4) proactive password checking (complex password policy) — system checks passwords at selection time and rejects weak ones.

What problems do computer-generated passwords have?

If highly random, users cannot remember them and tend to write them down, creating a security risk. Even pronounceable generated passwords are hard to remember. Computer-generated password schemes historically have poor user acceptance. FIPS 181 defines a well-designed generator that creates pronounceable syllables, but user acceptance remains a challenge.

Why is forcing users to use long passwords (e.g., 16 characters, basic16) a reasonable but recommended choice?

NIST SP 800-63-2 offers two equivalent options: basic16 (16+ characters) and comprehensive8 (8+ characters with uppercase, lowercase, digit, symbol, no dictionary words). Research by [KELL12] found basic16 is superior against large numbers of guesses. [KOMA11] found it is also easier for users. Longer passwords resist both brute-force and dictionary attacks more effectively while being easier for users to create (e.g., passphrases).

What should a password checker do?

A proactive password checker should: reject passwords that are too short or too weak; check against dictionaries of common/forbidden passwords; enforce rules (e.g., must include different character types); optionally use neural-network evaluation or check against public data breaches (e.g., Have I Been Pwned API). The goal is to eliminate guessable passwords while allowing users to select memorable ones.

What is Token-Based Authentication?

Token-based authentication uses objects that a user possesses (tokens) for authentication. Types include memory cards (store but don't process data, e.g., magnetic stripe cards) and smart cards (include an embedded microprocessor with processing capability). Tokens are often combined with a password or PIN for stronger security (two-factor authentication).

What is a Memory Card? Why is it not a good idea to use it alone? What is it usually combined with? Give an example.

A memory card stores data but does not process it. The most common example is a magnetic stripe bank card. Using it alone is not secure because the data is often stored in cleartext and can be read/copied. It is usually combined with a PIN (e.g., ATM: card + PIN). Drawbacks: requires a special reader, token loss, information stored in cleartext.

What is a Smart Card? How does it differ from a Memory Card?

A smart card contains an embedded microprocessor with processor, memory (ROM, EEPROM, RAM), and I/O ports, allowing it to process data and execute cryptographic operations. The key difference from a memory card is that smart cards can process data, not just store it. This enables more secure authentication protocols (dynamic password generation, challenge-response). Some smart cards include cryptographic co-processors.

What is the difference between Contact and Contactless smart cards?

Contact smart cards must be inserted into a reader with direct physical connection to gold-plated contacts on the card surface. Contactless cards communicate via radio frequencies using an embedded antenna, requiring only close proximity (~0.5 to 3 inches). Contactless cards derive power from the electromagnetic signal, making them ideal for applications requiring very fast interaction (building entry, payments).

Smart token authentication protocols: what is the difference between Static, Dynamic Password Generator, and Challenge-Response?

Static: the token authenticates the user to the computer, similar to a memory token. Dynamic password generator: the token periodically generates a unique password (e.g., every minute); both token and system must be synchronised. Challenge-response: the computer sends a challenge (e.g., random string), and the token generates a response (e.g., encrypts the challenge with a private key); no synchronisation needed.

What is meant by Remote User Authentication?

Remote user authentication is authentication over a network, the Internet, or a communications link. It is more complex than local authentication due to additional threats: eavesdropping, capturing passwords, and replaying observed authentication sequences. It generally relies on challenge-response protocols to counter these threats.

How does the Basic Challenge-Response Protocol work in Remote User Authentication? What advantages does it have?

The user transmits their identity to the host. The host generates a random number (nonce) and returns it with function identifiers. The user responds with f(r', h(P')) — the hash of their password combined with the nonce. The host compares this to its stored f(r, h(P(U))). Advantages: (1) host stores only the hash, not the password; (2) the password hash is never transmitted directly; (3) the random nonce prevents replay attacks.

What attacks threaten User Authentication?

Client attacks (guessing, exhaustive search, false match for biometrics), host attacks (plaintext theft, dictionary search, template theft), eavesdropping/theft/copying (shoulder surfing, token theft, biometric spoofing), replay attacks (reusing captured authentication data), Trojan horse attacks (rogue client/capture device), and denial-of-service (lockout via multiple failed attempts).

What are Client Attacks? What are Host Attacks?

Client attacks are attempts by an adversary to masquerade as a legitimate user without accessing the remote host or communications path — e.g., password guessing, exhaustive search, false biometric match. Countermeasures include large entropy, limited attempts. Host attacks target the user file at the host where passwords, passcodes, or templates are stored — e.g., plaintext theft, dictionary search, template theft. Countermeasures include hashing, access control, one-time passcodes.

What is an Eavesdropping attack?

In the context of passwords, eavesdropping refers to learning the password by observing the user (shoulder surfing), finding a written copy, or keystroke logging (keylogging) — installing malicious hardware/software to capture keystrokes. For tokens, the analogous threat is theft or physical copying. For biometrics, it is copying or imitating the biometric parameter. Multi-factor authentication is resistant to many eavesdropping attacks.

How can a Replay attack be useful in User Authentication? How can it be countered?

A replay attack involves an adversary repeating a previously captured user authentication response (e.g., re-sending a captured encrypted password). The most common countermeasure is the challenge-response protocol, where the host generates a unique random number (nonce) for each authentication session. Because the response depends on this nonce, a previously captured response is invalid for a new session.

What is a Trojan Horse Attack?

In a Trojan horse attack, a malicious application or physical device masquerades as an authentic one to capture a user's password, passcode, or biometric. Example: a rogue ATM or a fake login page that records the user's credentials. The adversary then uses the captured information to masquerade as the legitimate user. Countermeasures include authenticating the client or capture device within a trusted security perimeter.

Describe and evaluate: Computer-generated passwords, Reactive password checking, Proactive password checking.

Computer-generated passwords are strong against guessing but users have trouble remembering them, leading them to write passwords down. Poor user acceptance. Reactive password checking: the system periodically runs its own cracker and cancels guessed passwords. Resource-intensive, and existing passwords remain vulnerable until discovered. Proactive password checking: the system checks password strength at selection time and rejects weak passwords. Best balance of security and usability — eliminates guessable passwords while allowing users to choose memorable ones, provided the checker is well-designed.

Describe and comment on single-password authentication.

Single-password authentication is the simplest form: user provides a user ID and password. The user ID identifies the user; the password verifies the claim. It is widely used but has many vulnerabilities: susceptible to guessing, eavesdropping, phishing, dictionary attacks, and social engineering. It provides only one factor (something you know). While convenient and inexpensive, it is increasingly inadequate as a sole mechanism, which is why modern systems are moving toward multi-factor authentication and passkeys.

User and super-user: why do they exist? What are the problems in DAC? (Set user ID and group ID)

Users exist for accountability and access control: each user has specific privileges. The super-user (root/administrator) has unrestricted access for system administration. In Discretionary Access Control (DAC), users control access to their own resources. Problems include: the set-user-ID (SUID) mechanism can lead to privilege escalation if a vulnerable program runs with super-user privileges; users may inadvertently grant excessive permissions; and shared group IDs can lead to unintended access. Careful management of SUID/SGID bits is essential.

Check Your Understanding

1. What are the four means of authenticating a user's identity?

Something the individual knows (password, PIN), something the individual possesses (token, smartcard), something the individual is (static biometrics: fingerprint, retina, face), and something the individual does (dynamic biometrics: voice pattern, handwriting, typing rhythm).

2. What three purposes does the salt value serve in password hashing?

(1) Prevents duplicate passwords from being visible — different salts produce different hashes for the same password. (2) Greatly increases offline dictionary attack difficulty — a b-bit salt multiplies the search space by 2b. (3) Makes it nearly impossible to determine if a user has the same password on different systems.

3. What is the difference between verification and identification in biometric systems?

Verification (1:1 matching): the user claims an identity (e.g., enters a PIN) and provides a biometric sample; the system compares against the single stored template for that identity. Identification (1:N matching): the user provides only a biometric sample; the system searches all stored templates to find a match.

4. What is the difference between a memory card and a smart card?

A memory card stores data but does not process it (e.g., magnetic stripe card). A smart card contains an embedded microprocessor that can process data, execute cryptographic operations, and support advanced authentication protocols (dynamic password generation, challenge-response).

5. What is the main difference between online and offline password attacks?

Online attacks interact with a live service — they are detectable and limited by network latency and rate limiting. Offline attacks use stolen/intercepted data (e.g., the password file) with no interaction with the target system — they are undetectable and limited only by the attacker's hardware. Offline attacks are far more dangerous.

6. Why does NIST deprecate SMS-based two-factor authentication?

SMS is vulnerable to SIM-swapping attacks, where an attacker convinces the mobile carrier to transfer the victim's phone number to a SIM card controlled by the attacker. This allows interception of SMS verification codes. NIST recommends using authenticator apps or hardware tokens instead of SMS for out-of-band verification.