AP Cybersecurity · Study guide

Signs of an Online Password Attack

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

Signs of an Online Password Attack

How to spot someone guessing their way into an account by reading the login record.

1What an online password attack is

In an online password attack, an attacker tries to log in to a real device or service by submitting password guesses, one login attempt at a time. “Online” means each guess goes to the live login page or service, the same place you sign in.

The guesses usually come from three places:

  • Common passwords: the passwords people pick most, such as 123456, password, or qwerty.
  • Common patterns: a word plus a year plus a symbol, such as Soccer2009!, built from details about the target.
  • Stolen passwords: usernames and passwords leaked from other sites, tried in case the person reused them.

Attackers rarely type these guesses by hand. A program sends them automatically, often hundreds per minute. Because every guess is a real login attempt, the service records it. That record is where the attack shows itself.

Online versus offline

In an offline attack, the attacker has already stolen a file of scrambled passwords and tests guesses on their own computer. The service never sees those guesses, so its login records show nothing. Everything on this page is about online attacks, where the guessing happens against the live service.

2The warning signs

Three signs point to an online password attack:

SignWhat it looks likeWhy it shows up
Many failed logins in a short timeDozens of failures in seconds or minutesA program is working through a list of guesses faster than any person types
Logins at unusual timesAttempts at 3:00 AM on an account only used during school hoursThe attacker's program runs on the attacker's schedule, not the user's
Logins from unknown devicesA device, browser, or address the account has never usedThe attempts are not coming from the real user's phone or laptop

Two more details help: an attempt from an unfamiliar place or network address, and above all a success after a run of failures. The failures are the warning. A success at the end of them means the guessing worked and someone may now be inside the account.

The key idea

Any one sign can have an innocent explanation: people forget passwords, work late, and buy new phones. Several signs together (many fast failures, at 3 AM, from a device nobody has seen) are not a coincidence.

3Reading a login log

A log is a record of events that a computer or service keeps. A login log (also called an authentication log) writes one line for every sign-in attempt. Formats differ between systems, but the lines answer the same questions.

Figure 1. A login log records every attempt, successful or not. Each line answers the same few questions, so a pattern of attempts can be read like a story.

A reliable way to read a block of log lines:

  1. Group the lines by account and by source address.
  2. Count and time the failures. How many, and how long from the first to the last? Steady gaps of a few seconds suggest a program, not a person.
  3. Compare with normal. When does this person usually sign in, and from which device or address?
  4. Look for the success. Is there an accepted login from the same source after the failures?
  5. State what the evidence shows, quoting the lines, and what you would check next.

The address after from or src= is an IP address, the number that identifies where on the internet a connection came from. Addresses starting with 10. are inside the school or company network. An unfamiliar outside address is a reason to look closer, though one address can be shared by many devices, so it is a clue rather than a name.

4Three shapes of attack

Figure 2. The same three signs (many failures, odd times, unknown sources) show up in different shapes. Guessing piles failures on one account; spraying and stuffing spread them across many.
Pattern in the logLikely attackWhy it looks that way
Many failures, one account, one source, close togetherGuessing (often called brute force)A program tries password after password on one account
One or two failures per account, many accounts, spread over hoursPassword sprayingOne common password is tried against everyone, slowly, so no single account looks alarming
One attempt per account, many accounts, one source, very fastCredential stuffingStolen username and password pairs are tested; accounts with reused passwords succeed
Failures followed by a success from the same sourceA successful attackThe guess list finally contained the right password

Spraying is the hardest to spot. A rule like “lock an account after 5 failures” never fires when each account gets only one or two. It shows up only when you count across all accounts at once.

5Worked examples

In these logs, highlighted lines are the ones the example focuses on. Addresses beginning with 10. are inside the organization's network.

Worked Example 1 Many fast failures

Five failures for root

A school server is maintained only between 07:00 and 18:00. Its login log shows the lines below. Identify the signs.

May 09 03:10:58 lab01 sshd[4410]: Failed password for root from 203.0.113.52 port 52010 ssh2
May 09 03:11:02 lab01 sshd[4414]: Failed password for root from 203.0.113.52 port 52018 ssh2
May 09 03:11:07 lab01 sshd[4421]: Failed password for root from 203.0.113.52 port 52029 ssh2
May 09 03:11:11 lab01 sshd[4429]: Failed password for root from 203.0.113.52 port 52036 ssh2
May 09 03:11:16 lab01 sshd[4436]: Failed password for root from 203.0.113.52 port 52044 ssh2
  1. 1
    Count and time: 5 failed passwords from 03:10:58 to 03:11:16, which is 18 seconds. The gaps are 4, 5, 4, and 5 seconds: steady, like a program.
  2. 2
    Check the account: root is the all-powerful administrator account on Linux. Attackers guess it because it exists on almost every Linux server.
  3. 3
    Check the time: 03:10 is outside the 07:00 to 18:00 maintenance window.
  4. 4
    Check the source: 203.0.113.52 is an outside address, not one of the school's 10. addresses.
  5. 5
    Look for a success: none in these lines. Keep watching the log for an accepted login from that address.
Answer: Three signs: many failures in a short time, an unusual hour, and an unknown source. This is an online guessing attack on the root account that has not succeeded yet.
Worked Example 2 Failures, then a success

The login that got through

A student account's log for one night and morning:

2026-03-14 02:41:07  user=avega  result=FAIL  src=203.0.113.44  device=new (command-line tool)
2026-03-14 02:41:09  user=avega  result=FAIL  src=203.0.113.44  device=new (command-line tool)
2026-03-14 02:41:11  user=avega  result=FAIL  src=203.0.113.44  device=new (command-line tool)
2026-03-14 02:41:14  user=avega  result=FAIL  src=203.0.113.44  device=new (command-line tool)
2026-03-14 02:41:16  user=avega  result=OK    src=203.0.113.44  device=new (command-line tool)
2026-03-14 09:02:55  user=avega  result=OK    src=198.51.100.7  device=known (school laptop)
  1. 1
    Count and time: 4 failures and then a success between 02:41:07 and 02:41:16, all within 9 seconds.
  2. 2
    Check the device: a new command-line tool, not a browser on the student's laptop. A person signing in normally would not use one.
  3. 3
    Check the time: 2:41 AM.
  4. 4
    Read the last highlighted line: result=OK from the same source. The fifth guess worked.
  5. 5
    Read the 09:02 line: the real student signs in later from their known laptop, unaware that someone else got in hours earlier.
Answer: This is not a failed attack; it is a successful one. The account should be treated as taken over: reset the password, sign out all sessions, and check what the account was used for.
Worked Example 3 Spread out over hours

One failure each

A company's login log over two hours shows these lines among normal traffic. No account has been locked.

2026-04-02 13:05:12  user=bnguyen   result=FAIL  src=198.51.100.23
2026-04-02 13:22:40  user=cmorales  result=FAIL  src=192.0.2.181
2026-04-02 13:48:03  user=dpatel    result=FAIL  src=203.0.113.90
2026-04-02 14:10:57  user=eokafor   result=FAIL  src=198.51.100.140
2026-04-02 14:31:26  user=fsato     result=FAIL  src=192.0.2.47
2026-04-02 14:59:09  user=gwhite    result=OK    src=203.0.113.12
  1. 1
    Look at one account at a time: each has a single attempt. Nothing looks wrong.
  2. 2
    Change the view: 6 different accounts, 6 different source addresses, attempts spaced about 20 minutes apart, all outside the company network.
  3. 3
    Ask what they share: an outside source and a failure, at a steady pace. This is password spraying: one common password tried against many accounts, slowly, from rotating addresses so no single source stands out.
  4. 4
    Find the success: gwhite was signed in successfully from an unfamiliar outside address. That account likely used the common password.
Answer: Password spraying, with one account compromised. It only shows up when failures are counted across all accounts, not per account.
Worked Example 4 When it is not an attack

The forgetful teacher

A teacher's account shows:

2026-05-06 08:52:31  user=jliu  result=FAIL  src=10.0.4.61  device=known (staff laptop)
2026-05-06 08:52:48  user=jliu  result=FAIL  src=10.0.4.61  device=known (staff laptop)
2026-05-06 08:53:20  user=jliu  result=OK    src=10.0.4.61  device=known (staff laptop)
  1. 1
    Count and time: 2 failures, then a success, within 49 seconds.
  2. 2
    Check the time: 08:52 on a school day, normal for a teacher.
  3. 3
    Check the device: the teacher's known staff laptop, on a school address (10.0.4.61).
  4. 4
    Weigh the signs: a couple of failures alone is what a typo looks like. No other sign is present.
Answer: Not an attack. One weak sign (a few failures) with a normal time and a known device fits a person mistyping a password. Signs matter in combination.
Worked Example 5 Many accounts, one source

The burst across six accounts

A website's log at night shows a burst:

2026-06-11 22:14:03  user=hkim     result=FAIL  src=203.0.113.200
2026-06-11 22:14:04  user=lbrooks  result=FAIL  src=203.0.113.200
2026-06-11 22:14:04  user=mreyes   result=OK    src=203.0.113.200
2026-06-11 22:14:05  user=nadams   result=FAIL  src=203.0.113.200
2026-06-11 22:14:06  user=pcho     result=FAIL  src=203.0.113.200
2026-06-11 22:14:06  user=rgupta   result=FAIL  src=203.0.113.200
  1. 1
    Count and time: 6 different accounts in 3 seconds, one attempt each, all from 203.0.113.200.
  2. 2
    Ask how one source knows six real usernames: they likely came from a list of username and password pairs leaked from another site.
  3. 3
    Name it: credential stuffing. The attacker is testing whether these people reused the same password here.
  4. 4
    Find the success: mreyes logged in. That person almost certainly reused a leaked password.
Answer: Credential stuffing, with one account taken over. Block the source, reset the mreyes password, and warn the others that their passwords leaked elsewhere.
Worked Example 6 A sign the user can see

The new sign-in alert

At 3:12 AM, a student's phone shows an alert from their email service: “New sign-in to your account from Windows computer, Lisbon, Portugal.” The student uses only a phone and a school Chromebook, and lives in Ohio. Which signs are present?

  1. 1
    Unknown device: a Windows computer the student does not own.
  2. 2
    Unusual time: 3:12 AM, while the student was asleep.
  3. 3
    Unfamiliar location: a country the student has never logged in from. Locations from IP addresses can be off, but not usually by an ocean.
  4. 4
    The alert says “sign-in,” not “attempt,” so the attacker may already be in.
Answer: Unknown device, unusual time, and unfamiliar location together. The student should change the password from the real site right away and sign out other sessions.

6Common mistakes

Common Mistake 1 · Stopping at “lots of failures”

The failures are the warning; a success after them is the incident. Always look for an accepted login from the same source, and treat it as a takeover.

Common Mistake 2 · Calling every failure an attack

People mistype passwords all the time. A few failures from a known device during normal hours is usually a typo. Look for several signs together.

Common Mistake 3 · Looking only one account at a time

Spraying keeps each account under any lockout limit. Count failures across all accounts and sources to see it.

Common Mistake 4 · Treating one IP address as one person

Many devices can share an address, and attackers can rotate through many addresses. An address is evidence to combine with time, device, and pattern, not an identity.

Common Mistake 5 · Expecting login logs to catch every password attack

An offline attack happens on the attacker's computer using a stolen password file, so the service never sees the guesses. Login logs catch online attacks only.

7What happens next

Spotting the signs is the first step. The usual responses: block the source address, lock or protect the targeted account, reset the password if an attempt succeeded, sign out all active sessions, and check what the account did while someone else had it. Strong, unique passwords and a second sign-in step stop most of these attacks before they start.

Describe the evidence like this

“Lines 1 to 5 show five failed logins for root in 18 seconds, all from 203.0.113.52, at 03:10, outside the 07:00 to 18:00 maintenance window. The number and speed of the failures, the unusual time, and the unknown outside source together indicate an online password attack. No accepted login appears, so the attack has not succeeded in these lines.”

Quote the lines, name each sign with its evidence, and say whether the attack succeeded.