Building Detections Around Observable Behavior
The security team at a regional credit union inherits a rule called repeated login failures. It produces an enormous number of alerts whenever employees mistype a password or a mobile application briefly loses its stored credentials. Analysts have learned to close most of them. Then an investigation of a compromised account reveals that someone attempted access to many employees' accounts over several hours. The attempts were spaced far enough apart that the rule barely noticed. A busy alert queue and a missed credential attack are two symptoms of the same design problem.
The team cannot solve it simply by asking for fewer alerts. Suppressing noise without checking what the rule was meant to detect could make the blind spot worse. The real task is to define a security behavior worth recognizing, determine which evidence can reveal it, and build an alert that gives an analyst a useful decision. This is what a detection use case provides. It is the enduring operational purpose behind a rule, not just the particular search or threshold entered into a monitoring product.
The credit union's objective is to recognize possible password spraying against employee accounts. In a password spray, an adversary may try a small number of common or stolen passwords across many identities. Spreading attempts over time can help avoid simple per-account lockouts or alert thresholds. Not every broad collection of failures is an attack, and an authentication log usually does not prove which password was tried. But breadth across accounts, source context, timing, and a later successful login can support a reasonable hypothesis. That is a clearer starting point than a generic count of failed attempts.
A detection use case begins by stating what a defender is trying to learn. Here the question is whether one actor, device, or related set of sources is attempting access across many workforce identities in a manner inconsistent with authorized activity. That definition immediately exposes a practical concern: one network address does not always equal one actor. A corporate gateway may represent hundreds of employees. An attacker may also distribute attempts across several addresses. The analyst needs to know which source relationships the data can establish and where its attribution is uncertain.
The independent Bare Metal Cyber certification study guide is an optional companion for this reasoning. After listening, you can revisit detection use cases by describing the behavior in ordinary language before naming a tool or a rule type. If the behavior cannot be stated clearly, a complicated query will not rescue the design. The study question should concern the action being detected and why a defender would respond.
Next comes observability. Does the credit union collect authentication attempts for its identity provider, remote-access service, and major business applications? Are successful and failed attempts both recorded? Can the systems supply a reliable account identifier, result, event time, source context, and application name? If one application reports only a generic error, the team may not be able to distinguish bad credentials from an unavailable service. That limitation belongs in the detection design. It cannot be fixed by pretending a missing field is present.
Collection is not enough by itself. Records must arrive while they are still useful, and the fields must retain their correct meaning. One system may call the original user account a principal, while another records a display name that changes when employees are renamed. One may preserve the client address; another may record an application gateway. If those differences are ignored, a cross-system rule can group unrelated people together or scatter one actor's behavior across several false identities. Normalization should make comparable things comparable without erasing the original evidence.
The team studies an ordinary morning. A staff member makes several unsuccessful attempts to sign in from an approved device, then succeeds. That pattern is common enough to explain but does not establish a broad attempt against other users. Now compare it with failures scattered across many accounts that share an unusual origin and have little prior relationship to it. The second pattern is more compatible with spraying, especially if one account eventually authenticates successfully. Neither pattern can be judged responsibly from the failure count alone.
A threshold can still be useful. It might watch for failed attempts across a meaningful number of distinct accounts during a period. The crucial word is distinct. Twenty events against one account describe a different problem from one event against twenty accounts. But a fixed threshold is a compromise, not the definition of the adversary's behavior. The investigator should ask what a slower attacker, a shared corporate gateway, or an unusually busy help-desk shift would do to the outcome. If the rule is tested only against the exact pattern used to design it, it can appear more reliable than it is.
The credit union discovers that its current logic counts repeated failures against one account inside a short window. That explains why it floods the queue with forgotten-password incidents and overlooks the broad, slow sequence. Reworking the use case requires a different grouping, better source context, and perhaps more than one analytic approach. One method may detect rapid breadth across accounts. Another may accumulate evidence of suspicious low-rate behavior over a longer period. A later success can raise urgency when it follows a concerning sequence. No single calculation guarantees that every spray will be recognized.
Detection engineers often describe these choices as rule logic, but the logic is only one part of the service delivered to responders. An alert without context forces the analyst to repeat the same initial research every time. The team can attach the time span, the accounts involved, known source relationships, the applications targeted, and whether any authentication succeeded. The alert should make uncertainty visible, including any sources that were not covered. A useful alert tells the responder what was observed and where to look next, not merely that the rule is severe.
Consider what happens when the source is the credit union's approved gateway. Many users may appear to originate there. A rule that assumes a single address represents one attacker could raise a false alarm during a service outage. Excluding all activity from that gateway would be just as careless; an unauthorized actor might also reach an application through it. The better distinction may depend on session identifiers, original-device information, authentication methods, service health, and known application behavior. When those details are unavailable, the response should reflect the uncertainty rather than hide it in an exclusion.
There is a second common shortcut: treating a familiar administrative tool or an unfamiliar network location as inherently malicious. Those properties can help identify where to investigate, but the detection should represent the suspicious behavior in its operational context. A sudden privilege change affecting a dormant account, performed from a new session and followed by access to a sensitive resource, offers a more meaningful story than an alert on every privileged action. That example is separate from password spraying, but it illustrates the same design discipline: describe the harmful capability the behavior could create and identify the evidence that can test it.
For practice after listening, Bare Metal Cyber's Cyber Challenge can be useful here. When a rule seems too noisy, try asking what change would reduce irrelevant cases without excluding the attack behavior you care about. A good practice answer should also say which legitimate scenario might still resemble the attack and what the analyst would check. Tuning is an evidence decision, not a competition to generate the fewest notifications.
A detection use case should define what happens after the alert. Suppose the revised spray rule finds attempts across several employee accounts, followed by one successful session. The first responder needs to establish the success, inspect the session and account risk, and determine whether protected applications were accessed. If there is evidence of continuing unauthorized activity, the response plan may call for session revocation, account protection, and escalation to an authorized incident lead. The rule itself should not automatically disable every affected employee, because some may only have received unsuccessful attempts.
The distinction between a detection and a response action is especially important for automation. A high-confidence, low-impact control might be suitable for automatic handling after it has been tested. Disabling a privileged service identity or blocking a shared network address can disrupt critical operations. An alert's label should not grant authority to take a disruptive action. Define owners, approval boundaries, rollback options, and the evidence needed to verify that the action worked. Automation should make a good decision repeatable, not make an unexamined decision faster.
Before deployment, the team needs to test the proposed logic. That includes controlled malicious-like activity performed with authorization, but also ordinary behavior that could resemble it. The tests should cover many-account attempts, slower sequences, repeated failures against one user, service outages, and an employee struggling with a password. The expected outcome is not necessarily that every test fires or stays silent. It is that each result matches a documented detection objective and the remaining limitations are understood. A failed test may reveal absent telemetry rather than flawed correlation logic.
There are practical questions about timing. If the rule depends on a long observation window, it might recognize a slow sequence only after meaningful delay. If the window is extremely short, a patient attacker may remain below it. A team may combine rapid detection with slower retrospective analysis, accepting that the latter is useful for hunting and investigation rather than immediate interruption. The chosen approach should be tied to business risk and the capability the adversary could obtain before the alert arrives.
Tests also need to evaluate the entire path from event creation to analyst action. A simulated suspicious sign-in may be recorded correctly but fail to reach the collector. It may arrive yet lose an account identifier during parsing. The rule may fire but deliver an empty alert. The notification may land in a queue no one owns. All of those failures weaken detection coverage even when the search expression is technically correct. Measuring only whether the analytic rule executed would miss them.
For the credit union, useful operating measures include how often the alert leads to a justified investigation, how quickly a responder receives enough context to decide, and whether controlled attack simulations are recognized under the expected conditions. The team should also look at missed behaviors uncovered during actual cases. A reduction in alert volume is welcome if it preserves or improves coverage, but the volume alone cannot demonstrate quality. The same is true of a low false-positive percentage achieved by suppressing almost everything.
Suppression and exception rules need owners and expiry conditions. A temporary help-desk migration may cause a wave of authentication failures that the security team expects. It can be reasonable to distinguish that activity, but a blanket permanent exclusion may create an attractive place for abuse. The team should document what is being exempted, why the underlying behavior is known to be legitimate, which independent signals remain visible, and when the exception must be reviewed. An exception is a risk decision with a maintenance obligation.
As systems change, detection coverage changes with them. The credit union might move authentication for a major application to a new identity provider or introduce a vendor gateway. An older rule can continue producing alerts while quietly losing visibility into the new access path. Owners should revisit the use case after significant infrastructure changes, new threat reporting, incident lessons, and major logging changes. The question remains whether the intended behavior can still be observed and whether the response still reaches the right people.
The investigation that exposed the old rule now gives the team a realistic test. They examine the historical attack sequence using the available source records. The revised design recognizes the spread across accounts and highlights the later successful session, while common single-account mistakes remain available for lower-priority review. The team records what still cannot be seen because one application does not supply enough event detail. That limitation leads to a logging improvement request rather than another ineffective threshold adjustment.
A good detection use case can be explained without showing a query. Describe the behavior, establish why it creates risk, name the observations required to recognize it, acknowledge legitimate look-alikes, and connect the result to a proportionate next action. Then test both the analytic logic and the path that delivers it to a responder. In the credit union's case, those decisions turn a high-volume alarm into a more useful warning about account abuse. The gain is not a prettier dashboard. It is a better chance to recognize the attacker capability that the original rule missed.