AP Cybersecurity · Study guide

Making Authentication Stronger

AP® Cybersecurity · Unit 1 · Human-Centered Threats, Authentication & AI Defense

Making Authentication Stronger

Long, random, unique passwords, and a second proof that still protects you when a password is stolen.

1Four habits

Attackers get into accounts by guessing passwords, building guess lists from your life, reusing passwords leaked from other sites, and tricking people into handing them over. Strong authentication answers each of those with a habit:

Figure 1. The habits stack. A long random password does nothing if it leaks from another site; uniqueness does nothing once a password is stolen. Multifactor authentication is the one that still protects you after the password is known.

2Long, random, unique

Long. Every extra character multiplies the number of possible passwords. With 94 keyboard characters to choose from, one more random character makes guessing 94 times harder. Length does more than any special-character rule.

Random. Length only helps if the characters are unpredictable. Summer2024! is 11 characters but follows a recipe attackers try first. A random password has no recipe for a guessing list to follow.

Unique. Use a different password for every account. Sites get breached all the time, and leaked passwords are tried everywhere else. If every password is different, a leak at one site stays at that site.

Avoid anything meaningful. Names, birthdays, anniversaries, teams, pets, street names, and jersey numbers are the raw material of personal guess lists. A strong password has no connection to your life.

Figure 2. Times to try every possibility at a billion guesses a second, the speed of a powerful computer working on stolen password data. A personal-recipe password falls almost at once; random words and random characters hold out for centuries or far longer.

3Password managers and passphrases

No one can remember dozens of long random passwords. Two tools solve this:

A password manager is an app that creates a long random password for each site and remembers it for you. It fills the password in when you log in. You remember one strong main password (and protect the manager with a second proof); the manager handles the rest. A good manager also only fills a password on the real site it was saved for, so it will not hand your password to a lookalike page.

A passphrase is a password made of several words, such as velvet-river-lamp-fender-oak. When the words are chosen at random (rolling dice to pick from a list of 7,776 words is one method), a passphrase is long, hard to guess, and still possible to remember. The words must be random: a song lyric, movie quote, or famous saying is on attackers' lists no matter how long it is.

MethodExampleGood for
Password manager, random characterskq7#Lm2!vZp9@Wx4Almost every account: you never have to type or remember it
Random passphrasevelvet-river-lamp-fender-oakPasswords you must type from memory, like the manager's main password or a computer login
Recipe passwordPepper09!Nothing: it follows the pattern attackers try first

4Multifactor authentication

Even a perfect password can be stolen by a fake login page or a malware infection. Multifactor authentication (MFA) asks for at least two different kinds of proof, so a stolen password alone is not enough. The kinds of proof are called factors:

FactorExamples
Something you knowA password, a passphrase, a PIN
Something you haveA one-time code from a phone app or text message, a physical security key
Something you areA fingerprint or face scan

Two passwords are not MFA: both are something you know, and both can be phished the same way. MFA means two different categories.

Figure 3. With multifactor authentication, a stolen password opens nothing on its own.

Not all second factors are equally strong. Codes sent by text message are better than nothing, but an attacker can sometimes take over a phone number or talk someone into reading the code out. Codes from an authenticator app are stronger. A physical security key is strongest, because it checks which site is asking and will not respond to a lookalike page.

The key idea

MFA is the only one of these habits that still protects you after your password is known. Turn it on wherever it is offered, starting with email (which can reset everything else), school, and banking. And never share the code: a code you read out to someone is a factor you gave away.

5Worked examples

Worked Example 1 Repairing a weak password

Fixing Pepper09!

A student's email password is Pepper09! (their dog's name and birth year), and they use it on three other sites. Recommend changes and say what each one fixes.

  1. 1
    Problem: built from personal facts in the most common recipe. Fix: replace it with a random password from a password manager, or a random passphrase of five or more words. That stops personal guess lists and dictionary attacks.
  2. 2
    Problem: reused on four sites. Fix: a different password for every site, generated and stored by the manager. A leak at one site no longer opens the others.
  3. 3
    Problem: if the new password is ever stolen, it is enough on its own. Fix: turn on MFA with an authenticator app, starting with the email account.
  4. 4
    Order matters: secure the email first, because “forgot password” links for every other account go to that email.
Answer: Random (not personal), unique per site, stored in a password manager, and backed by MFA. Each change blocks a different attack.
Worked Example 2 Comparing options

Which password is strongest?

Rank these: (a) Pepper09! (b) Tr0ub4dor&3 (c) correct-river-lamp-velvet-oak-fender, six words chosen by dice (d) kq7#Lm2!vZp9@Wx4, from a password manager.

  1. 1
    (a) Personal recipe: a pet name, a year, a symbol. On a personal guess list. Weakest.
  2. 2
    (b) Looks complex, but it is one common word with predictable letter-to-number swaps and a symbol. Guessing tools try those swaps. Weak.
  3. 3
    (c) Six randomly chosen words: 7,776 choices for each word gives about 2.2 × 10²³ possibilities. Strong and memorable.
  4. 4
    (d) 16 random characters: about 3.7 × 10³¹ possibilities. Strongest, but only practical with a manager.
Answer: (d) strongest, then (c), then (b) and (a), both weak. Randomness and length matter; symbols and swaps on a common word do not.
Worked Example 3 Passphrases

The famous quote

A student wants to use tobeornottobethatisthequestion as a password. It is 30 characters long. Is it strong?

  1. 1
    Length alone would suggest yes.
  2. 2
    But it is a famous line, not a random choice. Attacker word lists include quotes, lyrics, and sayings.
  3. 3
    To a list-based attack it is a single guess, no matter how many characters it has.
Answer: Weak. A passphrase is strong only when its words are picked at random. Choose words with dice or let a password manager generate them.
Worked Example 4 MFA against stuffing

The leaked password that didn't work

A student's password leaks in a breach at a gaming site, and they reused it for email. Their email has MFA with an authenticator app. An attacker tries the leaked password on the email account. What happens?

  1. 1
    The password is correct, so the first factor passes.
  2. 2
    The site asks for a code from the authenticator app. The app lives on the student's phone; the attacker does not have it.
  3. 3
    The login stops. Many services also alert the student about a sign-in attempt with the correct password.
  4. 4
    The student should still change that email password and stop reusing it, because the leak is real.
Answer: MFA blocked the takeover even though the password was stolen. The alert is the student's cue to change the password everywhere it was used.
Worked Example 5 Limits of MFA

The code read out over the phone

A user with text-message MFA gets a call from someone claiming to be the bank, asking them to read out the code just sent. They do. Did MFA fail?

  1. 1
    The attacker already had the password (the first factor).
  2. 2
    The code went to the right phone: the second factor worked as designed.
  3. 3
    The user then handed the code to the attacker, so the attacker had both factors.
  4. 4
    A security key or app that only works on the real site would have resisted this, and so would the rule “never share a code.”
Answer: MFA was defeated by social engineering, not by a technical flaw. MFA protects you only while the second factor stays with you.
Worked Example 6 Choosing what to protect first

Turning on MFA with limited time

A student has 25 accounts and time to turn on MFA for only three today. Which three should come first?

  1. 1
    Email: “forgot password” for nearly every other account sends a reset link there. Whoever controls the email can take over the rest.
  2. 2
    The password manager, if they use one: it holds every other password.
  3. 3
    School or bank accounts: they hold grades, money, or personal records.
Answer: Email first, then the password manager, then the account holding the most valuable data. Protect the accounts that unlock other accounts.

6Common mistakes

Common Mistake 1 · Making it complex instead of long

Tr0ub4dor&3 looks tough but follows common swaps. Length with randomness does more than any number of symbols.

Common Mistake 2 · Reusing one strong password

A great password used on ten sites is only as safe as the worst-protected of those ten. When one leaks, all ten are exposed.

Common Mistake 3 · Counting two passwords as MFA

A password plus a security question is two things you know. MFA needs different kinds of proof: something you know plus something you have or are.

Common Mistake 4 · Choosing a passphrase you picked yourself

Words a person picks (a favorite lyric, a team name, the family's pets) are not random. Use dice or a generator.

Common Mistake 5 · Treating MFA as unbreakable

MFA fails if you give away the code or approve a sign-in you did not start. Never read out a code, and deny login prompts you did not ask for.

Explain a recommendation like this

“The user should replace Pepper09! with a long, random password generated by a password manager, because a random password cannot be built from their personal details or found in a dictionary. It should be unique to this account so a breach elsewhere does not expose it. They should also enable multifactor authentication, which requires a code from their phone in addition to the password, so an attacker who steals the password still cannot sign in.”

For each recommendation, say which weakness it fixes and which attack it stops.