AP Cybersecurity · Study guide

Hardening Login Settings

AP® Cybersecurity · Unit 4 · Device Security, Malware & Authentication

Hardening Login Settings

The five login settings that make passwords harder to guess and crack: complexity, minimum length, maximum age, password history, and account lockout.

1Login settings are controls

Operating systems and services let administrators configure rules for passwords and logins. These settings turn good password habits into requirements, so security does not depend on each user's choices. Five settings matter most.

2Complexity

When complexity is required, a new password must include at least one character from each character set:

Character setCharactersHow many
Uppercase lettersA to Z26
Lowercase lettersa to z26
Digits0 to 910
Special characters! " # $ % & ' ( ) * + , - . / : ; < = > ? @ [ \ ] ^ _ ` { | } ~32

Passwords using all four sets are far harder for a cracking tool to guess than passwords using one or two, because each position has 94 possible characters instead of 26.

3Minimum length

A minimum password length requires at least a certain number of characters. The longer and more complex a password, the longer a tool takes to crack it: every extra character multiplies the possibilities.

Figure 1. Requiring all four character sets and a longer minimum length makes the number of possible passwords, and the time to crack them, grow enormously.

4Maximum password age

A maximum password age prompts users to change their password a set number of days after the last change, often every 90 or 120 days. If a password was secretly compromised, changing it could lock the adversary out.

However, some national standards now recommend not forcing changes on a fixed schedule, because users respond with predictable patterns (PasswordFall2028, then PasswordWinter2028) that attackers can guess. Many organizations instead require a change only when there is evidence a password was compromised.

5Password history

A password history setting stores a number of each user's previous password hashes, so a user cannot reuse a recent password. Many organizations remember the last 5 to 10. Without it, a forced change could be undone by switching right back to the old password.

6Account lockout

An account lockout setting locks an account for a period after a certain number of invalid login attempts, often 3 to 5. This stops an adversary from continuously trying wrong passwords on the login page. With 5 attempts and a 15-minute lockout, an attacker can try at most 5 guesses every 15 minutes: 480 a day instead of thousands a second.

Lockout protects the live login page only. It does nothing against an offline attack on stolen password hashes.

7A complete policy

Example login settings
Account policy: staff accounts
  Password must meet complexity requirements ...... Enabled
     (at least one: A-Z, a-z, 0-9, special)
  Minimum password length ......................... 14 characters
  Maximum password age ............................ 0 (never expires; change only if compromised)
  Enforce password history ........................ 8 passwords remembered
  Account lockout threshold ....................... 5 invalid attempts
  Account lockout duration ........................ 15 minutes
The key idea

Complexity and length make passwords hard to crack; history stops reuse; lockout slows online guessing; password age forces changes, but scheduled changes can backfire, so many organizations change passwords only after a compromise.

8Worked examples

Worked Example 1 Count the possibilities

What complexity buys

How many more 8-character passwords are possible using all four character sets than using lowercase letters only?

  1. 1
    Lowercase only: 268 = 208,827,064,576 (about 2.1 × 1011).
  2. 2
    All four sets: 948 ≈ 6.1 × 1015.
  3. 3
    Ratio: 6.1 × 1015 ÷ 2.1 × 1011 ≈ 29,000.
Answer: About 29,000 times as many, for the same length. Adding length multiplies it further.
Worked Example 2 Pick the setting

Match the threat

Which setting addresses each? (a) An attacker trying thousands of passwords on the login page. (b) Users switching back to an old password after a forced change. (c) Users choosing password. (d) A user choosing Ab1!.

  1. 1
    (a) Account lockout after a few invalid attempts.
  2. 2
    (b) Password history: remember the last 5 to 10 hashes.
  3. 3
    (c) Complexity: requires all four character sets (and a banned-password list helps further).
  4. 4
    (d) Minimum length: four characters is far too short, even with complexity.
Answer: (a) lockout, (b) history, (c) complexity, (d) minimum length.
Worked Example 3 Lockout math

How much does lockout slow an attacker?

An account locks for 15 minutes after 5 invalid attempts. At most how many guesses can an online attacker make in a day?

  1. 1
    A day has 24 × 60 = 1,440 minutes, which is 1,440 ÷ 15 = 96 lockout windows.
  2. 2
    5 guesses per window: 96 × 5 = 480 guesses per day.
  3. 3
    Without lockout, an automated tool could make thousands of guesses per second.
Answer: 480 a day. Lockout makes online guessing extremely slow, which is why attackers prefer stealing hashes or spraying.
Worked Example 4 The age trade-off

Every 90 days

A school forces password changes every 90 days. The IT team notices many passwords like Tigers2027Spring becoming Tigers2027Summer. What is the problem, and what is the alternative?

  1. 1
    Scheduled changes push users toward predictable patterns.
  2. 2
    An attacker who learns one password can guess the next.
  3. 3
    Some national standards recommend against fixed-interval changes. Alternative: require changes when a compromise is suspected, plus strong length, complexity, history, and MFA.
Answer: Forced schedules created guessable patterns. Change passwords on evidence of compromise instead.

9Common mistakes

Common Mistake 1 · Thinking complexity alone is enough

Ab1! meets complexity but is tiny. Length matters as much as character variety.

Common Mistake 2 · Thinking lockout stops cracking

Lockout protects the login page. Offline attacks on stolen hashes never trigger it.

Common Mistake 3 · Assuming frequent changes are always better

Scheduled changes can lead to predictable patterns. Many organizations now change passwords only when a compromise is suspected.

Common Mistake 4 · Forgetting history

Without password history, users can cycle back to old passwords immediately after a forced change.

Recommend login settings like this

“The organization should require a minimum length of 14 characters with complexity, remember the last 8 password hashes to prevent reuse, and lock accounts for 15 minutes after 5 invalid attempts. Length and complexity make cracking slower, history stops reuse, and lockout limits online guessing to a few attempts at a time.”

Name each setting with a value and say which attack it slows or stops.