Courseiva

Using KQL to Detect Brute-Force Attacks in Microsoft Sentinel

Exhibit

Refer to the exhibit.

SecurityEvent
| where TimeGenerated > ago(7d)
| where EventID == 4625
| summarize FailedLogons = count() by Account, IpAddress
| where FailedLogons > 10

Refer to the exhibit. You are reviewing a KQL query in Microsoft Sentinel. What is the primary purpose of this query?

Quick Answer

The correct answer is to identify accounts with multiple failed logon attempts from a single IP. This is because the KQL query filters the `SigninLogs` table for `ResultType == 50057`, which specifically denotes a failed sign-in due to an incorrect password, then uses `summarize count()` by `IPAddress` and `UserPrincipalName` with a filter for more than five failures, directly detecting brute-force or password-spray patterns. On the Microsoft Cybersecurity Architect exam, this tests your ability to interpret KQL logic for detecting brute-force attacks in Sentinel, often appearing in scenario-based questions where you must match query output to attack types. A common trap is confusing `ResultType 50057` with account lockout codes (50053) or MFA failures (50074); remember that 50057 is the "wrong password" code. Memory tip: think "57 = 5-7 failed attempts" to recall that this code targets password guessing.

⚠ Common exam trap

Candidates may confuse EventID 4625 with successful logon (EventID 4624) or account lockout (EventID 4740). They might also overlook that the query groups by both IP and account, not by time, leading them to select options B, C, or D.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

To identify accounts with multiple failed logon attempts from a single IP.

The query uses the `SecurityEvent` table and filters for `EventID == 4625`, which indicates a failed logon attempt. By summarizing `count()` by `IPAddress` and `Account` and filtering for `FailedAttempts > 5`, the query identifies accounts with multiple failed logon attempts from a single IP address. This is typical for detecting brute-force or password-spray attacks, making option A correct.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✓

    To identify accounts with multiple failed logon attempts from a single IP.

    Why this is correct

    The query aggregates failed sign-in events, grouping by account and source IP address, then filters for counts exceeding a threshold. This surfaces accounts experiencing multiple failed logon attempts from a single IP, indicating possible brute-force or password-spray activity.

  • ✗

    To list all successful logon events in the last 7 days.

    Why it's wrong here

    The query filters on failure-related fields rather than success indicators, so it cannot enumerate successful logons; the stem's query targets failed authentication events. Listing successful logons is tempting because SigninLogs and SecurityEvent both hold both outcomes, and such a query would be right for auditing who accessed a resource.

  • ✗

    To calculate the total number of failed logons per hour.

    Why it's wrong here

    The query returns individual failed logon records rather than aggregating them, so no per-hour count is produced; summarising requires a summarize operator grouping by time bin. Counting failures per hour is tempting because it is a common Sentinel workload, and it would be correct when the goal is trending or threshold alerting.

  • ✗

    To detect account lockout events.

    Why it's wrong here

    The query matches failed authentication attempts, not the lockout events Windows writes with distinct event IDs and account-status fields, so lockouts are not detected. Detecting lockouts is tempting because repeated failures often precede them, and it would be correct when the query filters on lockout-specific event IDs.

About these practice questions

One of 605 original SC-100 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

1 more way this is tested on SC-100

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. Your organization uses Microsoft Sentinel as its SIEM. The security team needs to detect brute-force attacks against Azure VMs by analyzing Windows Security Event logs. Which data connector should you enable?

easy
  • A.Office 365 connector
  • B.Azure Activity log connector
  • C.Microsoft Defender for Cloud connector
  • ✓ D.Windows Security Events via AMA connector

Why D: The Windows Security Events via AMA connector (D) is correct because it ingests Windows Event Logs (specifically Security logs with Event ID 4625 for failed logons) from Azure VMs into Microsoft Sentinel, enabling detection of brute-force patterns. This connector uses the Azure Monitor Agent (AMA) to collect events, which is the recommended method for modern Windows event collection in Sentinel.

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This SC-100 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SC-100 exam.