Password Attacks: Brute Force vs Credential Stuffing vs Spraying | AP Cybersecurity

AP Cybersecurity Topics › Password Attacks
Unit 1 • Topic 1.2 • Suspicious Website Logins

Password Attacks Explained: Brute Force, Credential Stuffing & Password Spraying

A password attack tries to gain access by guessing or stealing credentials rather than tricking a person directly. Topic 1.2 asks you to identify the signs of a password attack and explain how adversaries exploit weak authentication.

3common methods
Signsunusual logins, lockouts, new locations
EK 1.2.Aidentify the signs
Brute forceCredential stuffingPassword spraying
Three common password attack methods, each exploiting weak authentication.

How password attacks work

Brute force tries many passwords against one account until one works. Credential stuffing reuses username and password pairs leaked from other breaches, betting that people reuse passwords. Password spraying tries a few common passwords across many accounts to avoid lockouts.

All three exploit weak authentication: short or common passwords, reused passwords, and accounts with no rate limiting or multi-factor authentication (EK 1.2.B).

Scenario

An account log shows dozens of failed logins in one minute from a single source, then one success. What is happening?

Reveal answer

A brute-force or stuffing attack. Rapid repeated failures followed by a success is the classic signature of automated password guessing.

Exam tip

Topic 1.2 questions show a login log or account-activity notice and ask you to identify the sign of a password attack. Look for failures, unfamiliar locations, or logins at impossible times.

Signs of a password attack

The framework wants you to recognize indicators (EK 1.2.A): a burst of failed logins, a successful login from an unfamiliar location or device, sign-ins at times the user is normally offline, and account changes the user did not make.

These signs map directly to the College Board Unit 1 scenario about reviewing account activity to detect unauthorized logins.

Scenario

A student normally logs in on weekends and evenings, but the activity log shows a weekday-morning login from another country. What is the most likely explanation?

Reveal answer

An unauthorized login from a password attack. The unfamiliar time and location, against the user's normal pattern, are the key indicators.

Real-world example

Credential stuffing at scale

Billions of leaked username and password pairs circulate online, and attackers replay them across sites with automated tools. Accounts on streaming, retail, and food-delivery services are routinely taken over this way because people reuse passwords.

Defense: a unique password per site plus MFA.

Key Terms

Brute force Trying many passwords against one account until one works.
Credential stuffing Reusing leaked username and password pairs across sites.
Password spraying Trying a few common passwords across many accounts.
Weak authentication Short, common, or reused passwords with no MFA, which attacks exploit.

Match It Up

Tap a term, then tap its definition. Correct pairs lock in green.
Term
Definition
All matched. Nice work.

Common Mistakes

!

Confusing brute force with spraying

Brute force hammers one account with many passwords; spraying tries a few passwords across many accounts.

!

Thinking a strong password alone is enough

Reused strong passwords still fall to credential stuffing. Uniqueness and MFA matter too.

!

Ignoring location and timing signals

An unfamiliar location or an impossible-time login is a strong sign even without failed attempts.

!

Assuming lockouts always stop attackers

Password spraying is designed to stay under lockout thresholds.

Check for Understanding

Predict your answer before you tap. Click a choice to check it and read why.
Question 1
An attacker tries the five most common passwords across thousands of accounts to avoid triggering lockouts. This is:
B. Trying a few passwords across many accounts to avoid lockouts is password spraying.
Question 2
Which indicators suggest a password attack? I. A burst of failed logins. II. A login from an unfamiliar country at an unusual time. III. The user receiving a normal monthly newsletter.
C. I and II are attack indicators. A routine newsletter is unrelated, so III is not a sign.
Question 3
Why does credential stuffing work so often?
A. Credential stuffing reuses leaked username and password pairs and succeeds because people reuse passwords.
Question 4 Predict first
An account log shows 200 failed logins in 30 seconds from one source. This best indicates:
D. Rapid automated failures against one account is the signature of a brute-force attack.
Question 5
Which is the BEST single defense against credential stuffing?
B. Unique passwords stop reuse, and MFA blocks access even if a password is known. A longer reused password still leaks together.
Question 6
A user normally signs in evenings and weekends, but the log shows a weekday 3 a.m. login from abroad. The strongest interpretation is:
A. An unfamiliar time and location against the user's pattern strongly indicates an unauthorized login.

Frequently Asked Questions

A password attack tries to gain access by guessing or stealing credentials. Common methods are brute force, credential stuffing, and password spraying.
Bursts of failed logins, successful logins from unfamiliar locations or devices, sign-ins at unusual times, and account changes the user did not make.
Use long, unique passwords, enable multi-factor authentication, and watch account-activity logs for unfamiliar locations and times.

Get in Touch

Whether you're a student, parent, or teacher — I'd love to hear from you.

Just want free AP CS resources?

Enter your email below and check the subscribe box — no message needed. Students get daily practice questions and study tips. Teachers get curriculum resources and teaching strategies.

Typically responds within 24 hours

Message Sent!

Thanks for reaching out. I'll get back to you within 24 hours.

🏫 Welcome, fellow educator!

I offer curriculum resources, practice materials, and study guides designed for AP CS teachers. Let me know what you're looking for — whether it's classroom materials, a guest speaker, or Teachers Pay Teachers resources.

Email

[email protected]

📚

Courses

AP CSA, CSP, & Cybersecurity

Response Time

Within 24 hours

Prefer email? Reach me directly at [email protected]