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 logons by account and IP, filtering for >10 attempts.

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

    Why it's wrong here

    The query uses EventID 4625 which is failed logon, not success.

  • To calculate the total number of failed logons per hour.

    Why it's wrong here

    The query does not include a time bin.

  • To detect account lockout events.

    Why it's wrong here

    Account lockout is EventID 4740, not 4625.

About these practice questions

One of 208 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.