Your country

Tools that support it use your country for local currency, number formats, units and paper size. Your choice is saved only in this browser.

Type a name or a two-letter code. Use the up and down arrow keys to move through the countries, Enter to choose one and Escape to close.

IT Support & Help Desk Fundamentals  Module 10 – Accounts, directories and access

Safe password resets and account lockouts

Verify a caller before any reset or MFA change, spot the scripts help-desk scammers follow, trace repeated lockouts through event 4740 and read smart lockout.

  • Intermediate
  • 25 minutes
  • Examples run with Python 3.14.8 and Pyodide 314.0.7
  • By MySmartCoPilot
Free lesson, Pro answers: 25 minutes
Free: the whole lesson. With a pass: the model answers to its 2 interview questions.

What you will learn

  • Verify a caller's identity before any password, MFA or recovery change
  • Recognise the social-engineering patterns aimed at help desks
  • Find the source of repeated account lockouts from security events 4740 and 4625
  • Explain how Microsoft Entra smart lockout differs from a classic lockout counter

Before you start

What you’ll learn · Before you start

What you will learn

  • Verify a caller's identity before any password, MFA or recovery change
  • Recognise the social-engineering patterns aimed at help desks
  • Find the source of repeated account lockouts from security events 4740 and 4625
  • Explain how Microsoft Entra smart lockout differs from a classic lockout counter

Before you start

On this page

A caller says she is Meera from finance: travelling, phone lost, a board call at 10:00, and she needs her password reset and her MFA moved to a new number now. Her employee ID, her manager’s name and her office are all correct, because they came from a social profile and a leaked list. CISA’s advisory on the group it calls Scattered Spider describes exactly this: callers who first learn a help desk’s reset steps, then ring as a chosen employee to have the password reset or the second factor moved to a device they control.

This lesson builds a reset that a prepared caller cannot pass, the script such callers follow and the temporary password that stops working at the first sign-in. Its second half is the other reset ticket a desk sees every day: an account that locks itself every half hour, where event 4740 names the computer behind it, and the difference between an Active Directory lockout and Microsoft Entra’s smart lockout.

A reset is safe only when a stranger could not pass the check

Every fact the caller gave about Meera was true, and none of it proved anything. CISA’s advisory lists where such details come from: social media, open-source information, commercial intelligence tools and leaked databases. Microsoft’s scam guidance adds that callers may spoof the caller ID to show a legitimate number. So the number on the screen is the caller’s choice, and the details are the caller’s homework.

One test sorts every possible check, and passwords, MFA and passkeys applies it to recovery methods: could a stranger who has researched the person complete this step? A call back passes it, because the desk ends the inbound call and rings the number in the HR directory, a record the caller cannot change. A manager who confirms the request on their own directory number passes it. An ID shown on a video call or at the desk, compared with the HR record, passes it. Reading out an employee ID does not.

How strong the check must be depends on the account, so the desk reads the account before it chooses. Step through one request from first contact to the record:

Interactive · stage by stage A reset request, from first contact to the record Step through one request for a password reset and an MFA change. Notice where the desk, not the caller, chooses the channel, and where a failed check goes.
A reset request, from first contact to the record, step 8 of 8. Showing Request, Look up the account, Choose the check, Verify, Reset, Tell the owner, Record. In focus: Record.check failedRequesta call, chat or emailLook up the accountits risk, recent changesChoose the checkstronger for high riskVerifyon a channel you pickResettemporary, ends at useTell the owneron a second channelRecordwho checked, and how

The drawing shows the whole scene; its 8 steps are listed below.

Every step as text
  1. A request arrives. A caller asks for a new password and for their MFA to move to a new phone. The request starts the process and proves nothing, whatever name the caller gives and whatever number the phone shows.
  2. Read the account first. Before deciding how to check, open the account. Is it an administrator, a payroll or finance account, or an executive's? Were its sign-in methods or its phone number changed this week? The answers set the bar.
  3. The risk picks the check. An ordinary account needs a check that a prepared stranger cannot complete, such as a call back to the number in the HR directory. A privileged account needs more: the manager confirms as well, or the person shows ID on a video call or at the desk.
  4. The desk picks the channel. End the call and ring back on the directory number, so the caller never chooses how they are reached. Employee ID, the manager's name and an office address are not a check: anyone who researched the person has them.
  5. A failed check stops here. If the person on the directory number says they never called, nothing is reset. The ticket records the attempt and the security team hears about it the same hour.
  6. Reset with something temporary. When the check passes, give a random temporary password that must change at the next sign-in, or a single-use Temporary Access Pass for registering new MFA, on the verified channel.
  7. The owner hears about it. Send a short notice to the account's owner on a second channel, such as their manager or an address already on record, so that a reset nobody asked for is noticed at once.
  8. The record closes the loop. The ticket names the check, the number rung and who confirmed. The next technician, and any later investigation, can see exactly why the reset was trusted.

Two choices in the flow carry the weight. The look-up comes before the check: an administrator, a payroll or supplier-payment account or an executive’s account needs a second, independent confirmation on top of the call back, and a sign-in method or phone number changed in the last few days is a reason to slow down. And the desk, not the caller, picks every channel: the number rung, the person who confirms, the place the temporary password is given. That is half of the job; the other half, a user being able to check the desk, is in remote support security and scams.

Verifying with questions the caller can answer

Wrong: “Can you confirm your employee ID and your manager’s name?”, then the reset. Right: “I’ll ring you back on the number we hold for you”, then the reset on that call. The questions fail because a prepared caller has the answers; the call back works because the stranger never answers the real number.

Checkpoint

Check: A check a stranger cannot pass

  1. Question 1 of 2 A caller asks for a password reset. Which of these count as a check before the reset? Choose every one.

    Choose every answer that is right.

    Show the answer: Question 1 of 2

    Answer:

    • Ending the call and ringing back on the number in the HR directory
    • The manager confirming the request when you reach them on their directory number

    A check counts only if a prepared stranger could not complete it. Calling back on a number from the HR record and confirming with the manager on a directory number both pass that test; facts about the person and the caller ID fail it.

  2. Question 2 of 2 The caller asks for a reset of an account that releases supplier payments. What changes in your check?

    Choose one answer.

    Show the answer: Question 2 of 2

    Answer: Add a second check, such as the manager confirming on a directory number or ID shown on a video call

    The look-up step decides how strong the check must be. An administrator, a finance or payroll account or an executive's needs a second, independent confirmation on top of the call back.

Social engineering at the desk follows a script you can recognise

The call about Meera was the last of three. CISA’s advisory describes the order: social engineering spread over several calls, first to learn what a help desk needs before a password reset, then to collect those details about a chosen employee, and finally to persuade a technician to reset the password or move the MFA. Step through the three calls as one attacker makes them:

Interactive · message by message Three calls that end in a call back Step through the calls as one attacker makes them. Watch what each call teaches the caller, and the one move that ends the attempt.
Three calls that end in a call back, step 6 of 6. Messages so far: Caller to Help desk: how do resets work?; Help desk to Caller: the checks, in full; Caller to Help desk: ID, manager, office; Caller to Help desk: reset + new MFA phone; Help desk to Real Meera: call back; Real Meera to Help desk: I did not call.Callersays: MeeraHelp deskReal MeeraHR numberhow do resets work?the checks, in fullID, manager, officereset + new MFA phonecall backI did not callattempt stopped

The drawing shows the whole scene; its 6 steps are listed below.

Every step as text
  1. Call one asks about the steps. On Monday a caller asks, as if new to the company, what the desk needs before it resets a password. Nothing is requested, so the technician feels safe to explain.
  2. The answer is the attack plan. The technician lists the checks: employee ID, manager's name, office. The caller now knows exactly which three facts to collect, and from which colleague's profile.
  3. Call two rehearses them. On Tuesday, to a different technician, the caller gives Meera's employee ID, her manager and her office, gathered from a social profile and a leaked list, and asks a harmless question to test them.
  4. Call three adds urgency. On Wednesday at 09:40 the caller says Meera is travelling, has lost her phone and has a board call at 10:00: reset the password and move MFA to this new number, now.
  5. The desk rings back. The technician says they will ring back, ends the call and dials the number in the HR directory, not the number the caller offered.
  6. The real Meera never called. Meera is at her desk in Pune and has not lost her phone. Nothing is reset; the technician records all three calls and alerts the security team, who warn the rest of the desk.

The first call did the damage, and it asked for nothing. A technician who explains the checks to an unknown caller has handed over the list of facts to collect. The safe answer to “what would you need from me?” is that the desk will verify them when they ask for a reset, together with the self-service reset page, and no list.

Once you have seen the script, its levers are easy to name. Each has a tell, and each has the same answer:

Lever What the caller says What the desk does
Urgency “The board call starts at 10:00” Rings back on the directory number anyway
Rank “This is the finance director, and I am in a hurry” Applies the same check, whatever the title
True details Employee ID, manager, office, all correct Treats them as homework, not proof
Channel switch “Use this number; my phone is lost” Uses only numbers from the HR record
Both factors “Reset the password and move my MFA” Applies the full check to each change

The last row is the one that completes a takeover. A new MFA method is half of an account, so registering one gets the same check as a password reset, and a request for both in one call is the strongest sign in the table. CompTIA’s A+ Core 2 objectives list impersonation and Social engineering by voice: a phone call in which the caller pretends to be someone else to get information, access or a change to an account. among the social-engineering attacks a technician should be able to tell apart. The calls that tested your desk last week are evidence too, so a technician who stops an attempt tells the security team, who can warn everyone the same caller may ring next.

Checkpoint

Check: Social-engineering scripts at the desk

  1. Question 1 of 2 A caller asks only what the desk needs from someone before it resets a password. What is the best reply?

    Choose one answer.

    Show the answer: Question 1 of 2

    Answer: Say the desk will verify them when they ask for a reset, offer the self-service page, and list no checks

    CISA's advisory describes calls that first learn what a desk needs before a reset. The safe reply helps the person without listing the checks: the verification happens when a reset is actually requested.

  2. Question 2 of 2 In the third call, which request is the strongest warning sign?

    Choose one answer.

    Show the answer: Question 2 of 2

    Answer: Resetting the password and moving MFA to a new phone number in the same call

    A password reset plus an MFA move in one call hands over the whole account. Treat MFA changes with the same check as a password reset, and stop when the two arrive together under pressure.

The reset gives a random password that ends at the first sign-in

Some desks reset every account to the same password, Welcome@123, because “users change it anyway”. Until the user signs in, that password is known to the whole desk and to everyone who has ever been reset there, and it is one of the first a stranger would try.

Microsoft’s tools make the safe version the default. When an administrator resets a password in the Microsoft Entra admin center, Entra ID generates a temporary password, the administrator gives it to the user, and the user must change it during the next sign-in. Microsoft adds that this temporary password never expires on its own: days later it still works, until that first sign-in, so hand it over only on the verified call and check that it was used. In on-premises Active Directory the technician creates the password instead, so make it random and set the account to require a change at the next logon, for example with Set-ADUser -ChangePasswordAtLogon $true. Microsoft notes that a synced user’s password can be reset in the cloud only when password writeback is on and the domain is managed; otherwise the reset happens in Active Directory.

Habit The safe version
The same password for every reset A random password each time
Given on the inbound call Given on the verified call back
Typed into the ticket Never written into the ticket
Changed when the user gets round to it Must change at the next sign-in
The user hears nothing more A notice goes to the owner on a second channel
Password Generator Makes a random temporary password in the browser, with the length and character sets the reset needs.

A lost phone is handled the same way. After the check, give a single-use A time-limited passcode that Microsoft Entra ID issues to one user so that they can sign in once and register new sign-in methods themselves., as joiners, movers and leavers does for a new joiner, so the user registers the new phone themselves; Microsoft’s authentication methods page also lets an administrator require the user to register MFA again and revoke their sessions. Where the user has already registered methods for self-service password reset: A Microsoft Entra ID feature that lets users change or reset their own password with registered authentication methods, without an administrator or help desk ticket. Also known by its initials: SSPR. More in “Cloud identity: Entra ID, SSO and device join”, the safest reset is the one the desk does not do.

The last row of the table comes from NIST SP 800-63B-4, which makes a notification part of every account recovery, to help the owner notice a recovery that was not theirs. A notice on a second channel costs a minute and turns a fraud that slipped past the check into one that is caught the same day.

Checkpoint

Check: A temporary password that ends at first use

  1. Question 1 of 2 An administrator resets a user's password in the Microsoft Entra admin center. What does Microsoft say happens to the password it generates?

    Choose one answer.

    Show the answer: Question 1 of 2

    Answer: The user must change it during the next sign-in

    Microsoft's page says Entra ID generates a temporary password, the administrator gives it to the user, and the user must change it during the next sign-in. It does not expire by time, so it goes only to the verified channel. In on-premises Active Directory the technician creates it instead.

  2. Question 2 of 2 A colleague resets every account to Welcome@123, since users must change it anyway. What is wrong with that?

    Choose one answer.

    Show the answer: Question 2 of 2

    Answer: Anyone who knows the habit can sign in as any account between the reset and the user's first sign-in

    A temporary password must be random each time. A fixed one turns every pending reset into an open account for anyone who knows the desk's habit, and it is an obvious candidate for any password blocklist.

A repeated lockout has a source, and event 4740 names the computer

The real Meera changed her password on Monday, and since then her account locks every half hour. Clearing the lockout each time only resets the clock: something is still trying her old password, and the job is to find it.

Active Directory decides when to lock with three Account Lockout Policy settings, and Microsoft’s pages give each one’s range and advice. The threshold is the number of failed attempts that locks the account, from 1 to 999; 0 means never, which is the default domain policy’s value, and Windows security baselines suggest 10 as a starting point. The duration is how many minutes the account stays locked, with about 15 advised, and 0 means locked until an administrator clears it. The reset counter setting is how many minutes after a failure the count starts again, and the baselines suggest 15. Microsoft also warns of the trade-off: a threshold lets an attacker lock every account on purpose, so the value is a balance between security and day-to-day work, not the lowest number possible. CompTIA’s hardening objective and CISA’s advice both ask for lockouts after a set number of failed attempts.

Three security events tell you where the failures come from:

Event Logged on What it gives you
4740 A user account was locked out the domain controllers, for a domain account the Caller Computer Name: where the last attempt came from
4625 An account failed to log on the computer that refused the sign-in the Logon Type and the Sub Status, such as 0xC000006A for a bad password
4771 Kerberos pre-authentication failed the domain controllers the client’s IP address, and failure code 0x18 for a wrong password

The Logon Type of 4625 says what kind of thing failed: 2 is someone at the keyboard, 3 a network connection such as a mapped drive, 4 a scheduled task, 5 a service and 10 a remote desktop session. The usual culprits are a second computer still signed in, a mapped drive or a credential saved in Windows (cmdkey /list shows the saved ones), a scheduled task or a service set to run as the user, a remote desktop session left running, and a phone whose mail app still holds the old password. The program below reads a morning of sample events for Meera. Press Edit, add a lockout from another computer, and run it again:

Group a morning of lockouts by the computer behind them Python · lockout-source/lockout_source.py
"""Finds the computer behind a morning of account lockouts.

The rows are a sample written for this lesson in the shape of two Windows Security events: 4740 (an account was
locked out, logged on the domain controllers with the Caller Computer Name) and 4625 (a sign-in failed, logged on the
computer that refused it, with the Logon Type and the Sub Status). Press Edit, add a lockout from another computer or
change a time, and run it again.
"""

from collections import Counter

# 4740 rows: time (UTC+05:30), locked account, Caller Computer Name.
LOCKOUTS = [
    ("08:35", "meera.iyer", "FIN-LT-07"),
    ("09:05", "meera.iyer", "FIN-LT-07"),
    ("09:35", "meera.iyer", "FIN-LT-07"),
    ("09:52", "arun.das", "SALES-PC-03"),
    ("10:05", "meera.iyer", "FIN-LT-07"),
    ("10:35", "meera.iyer", "FIN-LT-07"),
]

# 4625 rows on the file server FS01, written out from bursts: (first minute, failures in the burst). Each failure
# names the account, the Workstation Name, Logon Type 3 (network) and Sub Status 0xC000006A (bad password). The
# sample domain's lockout threshold is 10, so each burst of 10 bad passwords ends in one lockout.
BURSTS = [("08:31", 10), ("09:01", 10), ("09:31", 10), ("10:01", 10), ("10:31", 10)]
FAILURES = [("meera.iyer", "FIN-LT-07", 3, "0xC000006A") for _, count in BURSTS for _ in range(count)]

LOGON_TYPES = {2: "interactive: someone at the keyboard", 3: "network: a share or drive it connects to",
               4: "batch: a scheduled task", 5: "service", 10: "remote desktop"}
SUB_STATUS = {"0xC000006A": "misspelled or bad password", "0xC0000234": "account locked out"}


def minutes(clock):
    hours, mins = clock.split(":")
    return int(hours) * 60 + int(mins)


ACCOUNT = "meera.iyer"
mine = [(t, caller) for t, account, caller in LOCKOUTS if account == ACCOUNT]
print(f"Lockouts of {ACCOUNT} (event 4740): {len(mine)}")
for caller, count in Counter(caller for _, caller in mine).most_common():
    times = [t for t, c in mine if c == caller]
    print(f"  {caller:<10} {count}  at {', '.join(times)}")
    gaps = [minutes(b) - minutes(a) for a, b in zip(times, times[1:])]
    print(f"  minutes between them: {', '.join(map(str, gaps))}")

source = Counter(caller for _, caller in mine).most_common(1)[0][0]
rows = [r for r in FAILURES if r[0] == ACCOUNT and r[1] == source]
print(f"Failed sign-ins for {ACCOUNT} from {source} (event 4625 on FS01): {len(rows)}")
for logon_type, count in Counter(r[2] for r in rows).items():
    print(f"  logon type {logon_type} ({LOGON_TYPES[logon_type]}): {count}")
for status, count in Counter(r[3] for r in rows).items():
    print(f"  sub status {status} ({SUB_STATUS[status]}): {count}")
print(f"Next: on {source}, find the connection to FS01 that still uses the old password, and remove it.")

Output

Lockouts of meera.iyer (event 4740): 5
  FIN-LT-07  5  at 08:35, 09:05, 09:35, 10:05, 10:35
  minutes between them: 30, 30, 30, 30
Failed sign-ins for meera.iyer from FIN-LT-07 (event 4625 on FS01): 50
  logon type 3 (network: a share or drive it connects to): 50
  sub status 0xC000006A (misspelled or bad password): 50
Next: on FIN-LT-07, find the connection to FS01 that still uses the old password, and remove it.

Recorded with Python 3.14.8 on macOS 26 arm64. To run it yourself: mise exec python@3.14.8 -- python3 lockout_source.py

All 5 lockouts name FIN-LT-07, 30 minutes apart, and the 50 failed sign-ins on the file server FS01 are network sign-ins with a bad password, 10 before each lockout, which is the sample domain’s threshold. FIN-LT-07 is the laptop Meera used before her new one: still switched on, still connecting to FS01 with the password she changed on Monday. Remove that saved connection, or sign the old laptop out, and the lockouts stop.

Key idea

A lockout that comes back is a symptom of a device still using an old password. Read the Caller Computer Name in event 4740, then the Logon Type of the failed sign-ins from that computer, and remove the source before you clear the lockout.

Checkpoint

Check: Finding a lockout's source

  1. Question 1 of 2 The failed sign-ins (event 4625) that keep locking an account show Logon Type 4 on the user's old laptop. What is the likely source?

    Choose one answer.

    Show the answer: Question 1 of 2

    Answer: A scheduled task on that laptop that runs as the user with the old password

    The Logon Type of event 4625 says what kind of sign-in failed: 2 interactive, 3 network, 4 batch (scheduled tasks), 5 service, 10 remote desktop. Type 4 sends you to the scheduled tasks of that computer.

  2. Question 2 of 2 Where do you read which computer caused a domain account's lockout?

    Choose one answer.

    Show the answer: Question 2 of 2

    Answer: In event 4740 on the domain controllers, in the Caller Computer Name field

    Event 4740, "A user account was locked out", carries the Caller Computer Name: the computer the last failed attempt came from. The domain controllers' Security logs hold it for domain accounts.

Smart lockout counts a wrong password once and knows familiar places

Microsoft Entra ID locks cloud sign-ins with its own rule, smart lockout, and Microsoft’s page explains how it differs from a counter. By default it locks an account after 10 failed attempts in public cloud tenants (three in Azure US Government), for one minute at first and longer after later failures; Microsoft does not publish how fast the period grows. It keeps separate counters for familiar and unfamiliar locations, so an attacker abroad can be locked out while the user at the office keeps working. And it tracks the last three bad password hashes, so the same wrong password typed again does not count again.

Behaviour Classic AD lockout Microsoft Entra smart lockout
What counts every failed attempt each new wrong password
Where one counter for the account one counter for familiar places, one for unfamiliar
Default no lockout until a threshold is set 10 failed attempts, then one minute at first
Ending it the duration passes, or an administrator clears it the duration passes, a self-service reset, or an administrator’s password reset

The model below runs one stream of failures through both rules: an old phone at the office retrying Meera’s previous password 30 times, then an attacker abroad trying 12 different passwords. It follows the rules Microsoft documents, not the service itself. Press Edit, give the phone two different old passwords, and run it again:

One stream of failed sign-ins, two lockout rules Python · smart-vs-classic/smart_vs_classic.py
"""Runs one stream of failed sign-ins through two lockout rules: a classic counter and a simplified smart lockout.

Classic: every failure counts towards a threshold of 10, as an Active Directory lockout policy with a threshold of
10 does. Smart, as Microsoft documents it for Microsoft Entra ID: a threshold of 10, separate counters for familiar
and unfamiliar locations, and a wrong password that matches one of the last three bad passwords does not count again.
Microsoft does not publish every detail (how fast the lockout period grows, for example), so this is a model of the
documented rules, not the service. Press Edit and change the stream, then run it again.
"""

THRESHOLD = 10

# Meera's old phone retries her previous password 30 times from the office; an attacker abroad tries 12 different
# passwords. "where" is how a sign-in service would see the location: familiar or unfamiliar.
STREAM = [("phone", "familiar", "old-password")] * 30 + [
    ("attacker", "unfamiliar", f"guess-{n}") for n in range(1, 13)
]


def classic(stream):
    count = 0
    for n, (who, _, _) in enumerate(stream, start=1):
        count += 1
        if count == THRESHOLD:
            return f"locked at attempt {n} ({who}): the account is locked for everyone"
    return "never locked"


def smart(stream):
    counters = {"familiar": 0, "unfamiliar": 0}
    recent_bad = []  # the last three bad passwords seen
    locked = {}
    for n, (who, where, password) in enumerate(stream, start=1):
        if password not in recent_bad:
            counters[where] += 1
            recent_bad = (recent_bad + [password])[-3:]
        if counters[where] == THRESHOLD and where not in locked:
            locked[where] = f"locked at attempt {n} ({who})"
    lines = [f"{where} counter {counters[where]}: {locked.get(where, 'not locked')}" for where in counters]
    return "; ".join(lines)


print(f"{len(STREAM)} failed sign-ins: {sum(1 for s in STREAM if s[0] == 'phone')} from the phone, "
      f"{sum(1 for s in STREAM if s[0] == 'attacker')} from the attacker")
print("Classic counter:", classic(STREAM))
print("Smart lockout:  ", smart(STREAM))

Output

42 failed sign-ins: 30 from the phone, 12 from the attacker
Classic counter: locked at attempt 10 (phone): the account is locked for everyone
Smart lockout:   familiar counter 1: not locked; unfamiliar counter 12: locked at attempt 40 (attacker)

Recorded with Python 3.14.8 on macOS 26 arm64. To run it yourself: mise exec python@3.14.8 -- python3 smart_vs_classic.py

The classic counter locks Meera at attempt 10, the phone’s tenth retry, and she is locked out everywhere. Smart lockout’s familiar counter stays at 1, and only the unfamiliar counter locks, at attempt 40, the attacker’s tenth guess. A locked user sees “Your account is temporarily locked to prevent unauthorized use”; Microsoft adds that choosing “I forgot my password” in self-service password reset resets the lockout duration to zero, while “I know my password” leaves the timer running.

Hybrid setups need the two rules to agree. With pass-through authentication the password is checked on-premises, so Microsoft says the hash tracking is not available, and it asks for the Entra threshold to be lower than the Active Directory one, with AD at least two or three times higher (its example is 10 in Entra and 20 in AD), and for the Entra lockout to last longer than the AD lockout. Entra then stops a password-spraying attacker before the on-premises accounts lock.

Not affiliated

MySmartCoPilot is not affiliated with Microsoft, CISA or CompTIA. Event, setting and product names follow each organisation’s own documentation.

Checkpoint

Check: Smart lockout against a classic counter

  1. Question 1 of 2 An old phone retries the same wrong password 30 times from the office. Under Microsoft Entra smart lockout's documented rule, how much do those 30 failures add to the lockout counter?

    Choose one answer.

    Show the answer: Question 1 of 2

    Answer: One, because a repeat of one of the last three bad passwords is not counted again

    In the lesson's model the classic counter locks at attempt 10, while smart lockout's familiar counter ends at 1. Microsoft notes that this hash tracking is not available with pass-through authentication.

  2. Question 2 of 2 An organisation uses pass-through authentication and keeps the Microsoft Entra smart lockout threshold at 10. Following Microsoft's own example, what should the Active Directory account lockout threshold be?

    Type a number.

    A hint

    Microsoft wants the on-premises threshold two or three times the cloud one.

    Show the answer: Question 2 of 2

    Answer: 20 failed attempts

    Microsoft says the Entra threshold must be lower than the AD DS threshold, with AD at least two or three times higher, and gives 10 and 20 as its example. Entra then locks attackers out before they lock the on-premises account.

Practise: find the computers behind a lockout

The exercise turns the first half of the lesson’s lockout program into a function. Given a list of exported security events and an account name, it counts that account’s lockouts by Caller Computer Name, most frequent first, so the computer to visit is at the top. The sample tests check the ordering, other accounts and the failed sign-ins (event 4625) mixed into the export.

Exercise · Easy · Python

Find the computers that keep locking an account

Write lockout_sources(events, account). It reads a list of Windows Security events exported from the domain controllers and says which computers keep locking one account, most frequent first, so a technician knows where to look.

Each event is a dict. Lockout events have "event": 4740, a "time", the locked "account" and the "caller", the Caller Computer Name. The export also holds other events, such as failed sign-ins ("event": 4625), which have an "account" but no "caller".

Return a list of (caller, count) tuples for the lockouts of account:

  1. Count only 4740 events whose account is account. Account names are not case-sensitive: Meera.Iyer and meera.iyer are the same account.
  2. Caller names are not case-sensitive either: report each one in upper case, and count fin-lt-07 and FIN-LT-07 as one computer.
  3. A 4740 event whose caller is missing or empty is counted under "(blank)".
  4. Sort by count, highest first; when two counts are equal, sort by the caller's name.
  5. An account with no lockouts gives an empty list.

Starter code · lockout_sources.py

def lockout_sources(events, account):
    """Return [(caller, count), ...] for the 4740 lockouts of account, most frequent first.

    TODO: keep only lockout events (4740) of this account, compare names without regard to case, report callers
    in upper case with "(blank)" for a missing one, and sort by count, then by name. Right now it counts every
    event of the account under whatever caller it has, in no particular order.
    """
    counts = {}
    for event in events:
        if event["account"] == account:
            caller = event.get("caller")
            counts[caller] = counts.get(caller, 0) + 1
    return list(counts.items())
The sample tests · test_lockout_sources.py
from lockout_sources import lockout_sources

MORNING = [
    {"event": 4740, "time": "08:35", "account": "meera.iyer", "caller": "FIN-LT-07"},
    {"event": 4740, "time": "09:05", "account": "meera.iyer", "caller": "FIN-LT-07"},
    {"event": 4740, "time": "09:20", "account": "meera.iyer", "caller": "FIN-PC-12"},
    {"event": 4740, "time": "09:35", "account": "meera.iyer", "caller": "FIN-LT-07"},
    {"event": 4740, "time": "09:52", "account": "arun.das", "caller": "SALES-PC-03"},
]


def test_the_computer_with_most_lockouts_comes_first():
    assert lockout_sources(MORNING, "meera.iyer") == [("FIN-LT-07", 3), ("FIN-PC-12", 1)]


def test_other_accounts_are_left_out():
    assert lockout_sources(MORNING, "arun.das") == [("SALES-PC-03", 1)]


def test_failed_sign_ins_are_not_lockouts():
    events = MORNING + [
        {"event": 4625, "time": "09:34", "account": "meera.iyer"},
        {"event": 4625, "time": "09:34", "account": "meera.iyer"},
    ]
    assert lockout_sources(events, "meera.iyer") == [("FIN-LT-07", 3), ("FIN-PC-12", 1)]


def test_an_account_with_no_lockouts_gives_an_empty_list():
    assert lockout_sources(MORNING, "priya.nair") == []
A hint

Build a collections.Counter keyed by the caller in upper case, adding one for each event where event["event"] == 4740 and event["account"].lower() == account.lower(); use event.get("caller") or "(blank)" for a missing caller. Then sort its items with the key (-count, caller).

The sample tests run on this device, in your browser (Pyodide): nothing is sent to mysmartcopilot.com. The first run downloads Python (about 13.5 MB), which is kept for the next runs. A check in your browser is feedback for you, not proof that the code is right for every input.

The self-check below picks its next question from your answers so far, the weakest concept first:

Practice that adapts to you

Practise this lesson

12 questions about 5 ideas of this lesson. Each answer is explained at once, and what you get right is kept in this browser.

  1. Question 1 of 12 Why is the number shown by caller ID not a check of who is calling?

    Choose one answer.

    Show the answer: Question 1 of 12

    Answer: Callers can spoof it to show a number they do not own

    The number on screen is chosen by the caller's equipment. The desk's own call back, on a number from the HR record, is what a stranger cannot redirect.

  2. Question 2 of 12 The finance director, abroad, asks on a video call for her MFA to be moved to a new phone. Her face matches the HR photo, but she cannot show ID right now. Her manager is the chief executive. What is the safest next step?

    Choose one answer.

    Show the answer: Question 2 of 12

    Answer: Confirm with the chief executive on a directory number, then issue a single-use pass for her to register the new phone

    The account's risk calls for a second independent confirmation. The manager reached on a directory number gives it, and a single-use Temporary Access Pass lets her register her new phone herself.

  3. Question 3 of 12 Which of these are levers that social-engineering callers use on a help desk? Choose every one.

    Choose every answer that is right.

    Show the answer: Question 3 of 12

    Answer:

    • Urgency, such as a meeting about to start
    • True personal details gathered in advance
    • Rank, such as claiming to be a senior person

    Urgency, rank and researched true details are the usual levers. A call back on the desk's terms defeats all three, because the stranger never answers the directory number.

  4. Question 4 of 12 A caller does not want a password reset, only to "add a new phone" to their MFA because the old one broke. How do you treat the request?

    Choose one answer.

    Show the answer: Question 4 of 12

    Answer: With the same check as a password reset, because a new MFA method is half of a takeover

    MFA registration is a change of the account's proof of identity, so it gets the same check as a reset. The safe route after the check is a single-use pass the person uses to register the new phone themselves.

  5. Question 5 of 12 In on-premises Active Directory, what setting makes a temporary password end at the first sign-in?

    Choose one answer.

    Show the answer: Question 5 of 12

    Answer: User must change password at next logon, set for example with Set-ADUser -ChangePasswordAtLogon

    In AD the technician creates the temporary password and sets the account to require a change at the next logon, so the password lives only until the user's first sign-in.

  6. Question 6 of 12 You have verified the caller by ringing back on the directory number. How do you give them the temporary password?

    Choose one answer.

    Show the answer: Question 6 of 12

    Answer: Read it to them on that call back, then confirm they changed it

    Hand the temporary password over on the channel you verified, and only there. Then check that the first sign-in replaced it, and record the reset.

  7. Question 7 of 12 After a reset, why send a notice to the account owner on a second channel, when they have just spoken to you?

    Choose one answer.

    Show the answer: Question 7 of 12

    Answer: If the reset was a fraud that slipped through, the real owner learns of it at once

    NIST SP 800-63B-4 says an account recovery always sends one or more notifications to the subscriber, to help detect fraudulent use. A notice on a second channel lets the real owner react to a reset they never asked for.

  8. Question 8 of 12 In the lesson's example, the failed sign-ins on FS01 show Logon Type 3. What does type 3 mean?

    Choose one answer.

    Show the answer: Question 8 of 12

    Answer: A network sign-in, such as a share or drive the computer connects to

    Type 3, network, points at something on FIN-LT-07 that connects to FS01 with the old password: a mapped drive or a saved connection, which is where the example's next step sends you.

  9. Question 9 of 12 Event 4740 names RDS01, a remote desktop server, as the caller for every lockout, and the failed sign-ins there show Logon Type 10. What do you check first?

    Choose one answer.

    Show the answer: Question 9 of 12

    Answer: Whether the user still has a disconnected remote desktop session on RDS01 from before the password change

    The Caller Computer Name says where the attempts arrived, and the Logon Type says how. A remote desktop server with type 10 failures points at a session there, often a disconnected one, still using the old password.

  10. Question 10 of 12 By default, after how many failed attempts does Microsoft Entra smart lockout lock an account in a public cloud tenant?

    Choose one answer.

    Show the answer: Question 10 of 12

    Answer: 10

    Smart lockout locks after 10 failed attempts by default in public tenants, for one minute at first and longer on later lockouts. Changing those values needs a Microsoft Entra ID P1 licence or higher.

  11. Question 11 of 12 A user locked out by smart lockout uses self-service password reset. Which choice ends the lockout at once?

    Choose one answer.

    Show the answer: Question 11 of 12

    Answer: "I forgot my password", which resets the lockout duration to 0 seconds

    After a smart lockout, SSPR's "I forgot my password" path resets the lockout duration to zero; "I know my password" leaves the timer running until the password is changed or the lockout expires.

  12. Question 12 of 12 An organisation moves from password hash sync to pass-through authentication. The old phone in the lesson's model retries the same password 30 times. What changes?

    Choose one answer.

    Show the answer: Question 12 of 12

    Answer: Each retry can now count, because hash tracking is not available with pass-through authentication

    With pass-through authentication the password is checked on-premises, so smart lockout cannot recognise a repeated bad password. The lesson's phone would then count like a classic counter, which is one reason to keep the AD threshold two or three times the Entra one.

Interview questions

Warm-up (fresher): why does a help desk ring a caller back on the number in the HR directory before a reset, instead of trusting the number on its screen?

Because the number on the screen is the caller’s choice and the number in the HR directory is not. Microsoft’s scam guidance warns that callers may spoof the caller ID so it shows a legitimate number, and CISA describes attackers who arrive with the employee ID, the manager’s name and the office already collected from social media and leaks. A call back on the directory number is a check a prepared stranger cannot pass: the desk ends the inbound call, rings the number on record, and the stranger never answers it. If the person who answers says they did not call, nothing is reset and the attempt goes to the security team. For a high-risk account the desk adds a second, independent check, such as the manager confirming on their own directory number.

The two important questions below move the same rules into cases this lesson did not walk through. Decide what you would check first and whose agreement you would need, then compare with the first step on each question’s page:

Model answers open with any pass: ₹79 for 1 week ($2.99), one payment that never renews.

  1. Mid to senior

    The managing director's assistant, whom the desk knows well, calls: the director is at a conference abroad, has lost her phone and cannot sign in. The assistant runs the director's mailbox and calendar and asks you to move the director's MFA to the assistant's phone for two days. What do you do?

    Model answer, Pro. Model answers open with any pass; prices are in the notice on this page. First step and follow-ups

  2. Mid to senior

    Since changing his password, Ravi's account locks every few minutes. Every event 4740 names NPS01, the server that authenticates the office Wi-Fi, as the caller computer, not any PC. Ravi has a laptop, a phone and a tablet. How do you find the device behind the lockouts and stop them?

    Model answer, Pro. First step and follow-ups

Flashcards · 6 cards

Recall it, then check

Say the answer to yourself before you look: recalling it is what makes it stick.

  1. Why does the desk ring a caller back on the number in the HR directory?

    The number on the screen is the caller's choice and can be spoofed; the directory's number is not. Personal details prove nothing either, since attackers gather them in advance.

  2. What does a help-desk social-engineering attempt usually look like?

    A script of several calls using urgency, rank, true details and a switch of channel. The desk never describes its checks to an unknown caller, and an MFA change gets the same check as a password reset.

  3. What does a safe password reset hand over?

    A random temporary password that must change at the next sign-in, or a single-use Temporary Access Pass for new MFA, given on the verified channel and followed by a notice to the owner on a second channel.

  4. An account keeps locking out. How do you find what is doing it?

    Event 4740 on the domain controllers names the caller computer, and the Logon Type of the failed sign-ins from it says whether a drive, a task, a service or a session holds the old password. Remove that source before you clear the lockout.

  5. How does Microsoft Entra smart lockout count failed sign-ins?

    Each new wrong password counts once, familiar and unfamiliar places keep separate counters, and the first lockout lasts a minute.

  6. With pass-through authentication, how is the Active Directory lockout threshold set against Entra's?

    Two or three times higher than the Entra smart lockout threshold.

Key takeaways

  • A reset is safe only when its check could not be passed by a stranger who researched the person: ring back on the number in the HR directory, add a second independent check for high-risk accounts, and never treat caller ID or personal details as proof.
  • Help-desk social engineering follows a script of several calls, using urgency, rank, true details and a switch of channel, so the desk never describes its checks to an unknown caller and gives MFA changes the same check as a password reset.
  • The reset itself is a random temporary password that must change at the next sign-in, or a single-use Temporary Access Pass for new MFA, given on the verified channel and followed by a notice to the owner on a second channel.
  • A lockout that keeps coming back has a source: event 4740 on the domain controllers names the caller computer, and the Logon Type of the failed sign-ins from it says whether a drive, a task, a service or a session holds the old password.
  • Microsoft Entra smart lockout counts each new wrong password once, keeps separate counters for familiar and unfamiliar places and locks for a minute at first, so with pass-through authentication the Active Directory threshold is set two or three times higher than the Entra one.

References

Related tools

Report a problem with this lesson

Quick answers and tool search

Type to search tools or to get a quick answer, for example 18% of 2500. Use the up and down arrow keys to move through the results, Enter to choose, and Escape to close.