——
LabLABS

Detect a password-spraying pattern safely

Generate bounded failed logins against lab identities and build a detection that groups attempts by source, target count, and time.

For an isolated identity or web-authentication lab with synthetic accounts only.

AuthenticationDetectionSigma

Start with the situation, not the slogan

This lab is designed to produce evidence and judgement, not a ceremonial screenshot of a tool running. Detect a password-spraying pattern safely is successful when you can explain the question, predict the expected observation, collect it safely and distinguish a useful result from noise. The commands are the least interesting part, although they are traditionally the part everyone photographs.

Use systems you own or have explicit permission to test. Keep the exercise isolated from household, client and production networks, take a snapshot before deliberate breakage, and write the rollback step before the first change. A lab without a reset path is simply a future troubleshooting appointment.

A spray differs from a brute-force attack by trying a small number of passwords across many accounts. Detection needs aggregation, context, and a controlled baseline.

How this usually reaches the desk

Set one modest objective for the session. Begin with the expected clue: Synthetic failures share a source and time window but span several lab usernames. Then create or collect only enough benign activity to make that clue visible. If the observation does not appear, investigate the data path before adding more tools. Instrumentation that cannot see a known test event will not become more perceptive during a real incident.

This scenario combines common operational patterns; it is not presented as a report of one named incident.

What to look for

Begin with preserved, comparable evidence. One signal is rarely proof; use independent observations and a reliable timeline before declaring scope or intent.

01

Synthetic failures share a source and time window but span several lab usernames.

Write the expected observation before the exercise. Include the source, destination, time and field that should carry it; this turns an interesting screen into a falsifiable test.

02

The raw log records outcome, account, source, protocol, and reliable event time.

Confirm that clocks, names and identifiers line up across the lab. Time drift and ambiguous hostnames can turn three tidy events into an accidental detective novel.

03

The detection distinguishes the controlled pattern from one user mistyping a password.

Keep a known-good comparison. The aim is not merely to produce an alert or packet, but to explain how the test differs from ordinary activity and where false positives would arise.

Run it, read it, decide what changes

These examples use documentation addresses, test identities and bounded targets. Replace placeholders only inside systems you own or are explicitly authorised to operate. Read the expected result and next action before running the command; a successful command is evidence, not yet a conclusion.

Example 01

Write a minimal process-creation Sigma rule

SigmaText editor
Prerequisites
A lab data source that records process command lines.
yaml
title: NMF Test Encoded PowerShell
id: 8af15986-a0ad-4b12-bede-000000000001
status: test
logsource:
  product: windows
  category: process_creation
detection:
  selection:
    Image|endswith: '\powershell.exe'
    CommandLine|contains: 'NMF_TEST_ENCODED'
  condition: selection
falsepositives:
  - Approved detection exercise
level: medium
Expected result

A valid Sigma document describes the log source, selection and explicit test marker.

How to interpret it

The rule is portable logic, not a guarantee that your SIEM has the necessary fields or backend mapping.

Next action

Validate syntax, convert for the actual backend, and generate only the harmless marker in an isolated lab.

Example 02

Validate and convert the rule

Sigma CLIPython environment
Prerequisites
Sigma CLI and the appropriate backend plugin installed.
shell
sigma check nmf-test.yml
sigma convert -t splunk nmf-test.yml
Expected result

The first command reports syntax problems; the second prints a backend query when the Splunk plugin is available.

How to interpret it

A successful conversion does not prove the query matches your field mapping or data retention.

Next action

Run the query against a known event, document field differences, and keep the converted query tied to the source rule version.

Example 03

Verify end-to-end collection

logger and central searchLinux
Prerequisites
A host whose syslog is meant to reach the central platform.
shell
marker="NMF_LOG_TEST_$(date -u +%Y%m%dT%H%M%SZ)"
logger -p auth.notice -t nmf-test "$marker"
printf '%s
' "$marker"
Expected result

A unique marker is emitted locally and printed for pasting into the central search.

How to interpret it

Local command success proves only submission to the local logging path.

Next action

Search centrally, record arrival delay and parsed host/source fields, then alert when this scheduled canary stops arriving.

Lab procedure

Read the whole sequence before starting. Several workstreams may run in parallel, but their evidence, authority and expected outcomes still need to be explicit. Every step below points back to a concrete example; use the example as implementation evidence, not as permission to operate outside the stated scope.

  1. 01

    Create disposable accounts and a strict attempt limit that cannot lock real users or reach production.

    Record the topology, versions, addresses, accounts and snapshots used for this run. Reproducibility starts with knowing which machine was actually on the screen.

    Working example 01: Write a minimal process-creation Sigma rule — Sigma on Text editor.

  2. 02

    Verify the exact failure event and fields produced by one manual invalid login.

    Make one controlled change or generate one benign event, then observe the result before continuing. Small steps preserve causality and make rollback considerably less theatrical.

    Working example 02: Validate and convert the rule — Sigma CLI on Python environment.

  3. 03

    Generate a small, slow set of failed logins across the synthetic accounts from one lab source.

    Capture raw evidence before filtering or transforming it. Save the query, filter or rule beside the result so a second run can challenge the first.

    Working example 03: Verify end-to-end collection — logger and central search on Linux.

  4. 04

    Aggregate by source and time, count distinct targets, and create an alert with the supporting events attached.

    Introduce one negative or boundary case. A detection that fires on everything is technically energetic but operationally similar to a smoke alarm mounted above a toaster.

    Working example 01: Write a minimal process-creation Sigma rule — Sigma on Text editor.

  5. 05

    Tune against normal lab activity and add an explicit exclusion only when its owner and expiry are recorded.

    Return the environment to its baseline, compare outcomes with the written expectation and note what would need to change before using the technique on managed systems.

    Working example 02: Validate and convert the rule — Sigma CLI on Python environment.

Operational judgement

Keep a lab notebook with four columns: time, action, expected evidence and observed evidence. Add screenshots only when they preserve information that text cannot. The notebook should allow another person to repeat the exercise without inheriting your browser history, shell history and particular relationship with luck.

The transfer-to-production question matters more than the demo. For Authentication, Detection and Sigma, consider data volume, retention, credentials, privacy, performance, ownership and failure behaviour. A successful lab proves that a mechanism can work under stated conditions; it does not prove that it can be deployed everywhere before lunch.

Make the result useful to the next person

Turn the exercise into a reusable lab card. Record the learning objective, isolation boundary, diagram, versions, seed data, expected observations, exact queries, screenshots that add real information, and the reset procedure. Mark which evidence was generated and which was supplied. If the lab uses a deliberately vulnerable image or sample, store its provenance and checksum. Future-you is a different operator and deserves better documentation than “it worked after I restarted something”.

End with a short teach-back. Explain why “Create disposable accounts and a strict attempt limit that cannot lock real users or reach production.” matters, demonstrate the observation that supports the conclusion, and show how the environment returns to baseline after “Tune against normal lab activity and add an explicit exclusion only when its owner and expiry are recorded.” Then name one production assumption the lab did not test. That last sentence keeps a useful experiment from turning into unjustified confidence and gives the next exercise a sensible place to begin.

Validate before you close

A successful lab produces one explainable alert for the spray pattern, no alert for a single-user mistake, and a saved query or rule that can be rerun.

Capture the test, the expected result and the observed result. Where a person or business owner must accept restored service, name them in the record. A green dashboard can confirm that a component is answering; it cannot confirm that invoices, identities or restored data are trustworthy.

Finish with a compact closure note: the original trigger, confirmed scope, evidence retained, controls changed, tests passed, known gaps, residual risk, and the people responsible for the remaining work. Schedule a review while the timeline is still fresh enough to challenge. The purpose is not to find a person to blame; computers already perform blame with admirable efficiency. The purpose is to make the next response faster, safer and less dependent on one person remembering where the useful log was hidden.

Common mistakes

  • Connecting an intentionally weak lab directly to a home or production network.
  • Copying commands without recording the expected evidence and rollback step.
  • Calling a test successful without comparing the result to a known-good baseline.

These errors usually come from haste, unclear ownership or misplaced confidence. Build the safeguard into the runbook: a required evidence field, a second-person review, a rollback test or a specific exit criterion.

Questions people ask when the clock is running

Can I run this against a public target for practice?

No. Keep the work to systems you own or are explicitly authorised to assess. An educational intention is not an access-control mechanism and will not improve the conversation with a provider or solicitor.

What should I save from the exercise?

Keep the topology, versions, raw evidence, exact filters or rules, expected result, observed result and rollback notes. Remove real secrets and personal data before sharing the notebook.

How do I know the lab worked?

A successful lab produces one explainable alert for the spray pattern, no alert for a single-user mistake, and a saved query or rule that can be rerun. Repeat the key observation from a clean snapshot; repeatability is a stronger result than a single attractive screenshot.

Safety boundary

Use these steps only on systems you own or are explicitly authorised to assess. Preserve evidence, follow your organisation’s legal and regulatory obligations, and prefer reversible actions when the situation is not yet understood.

Primary references

  1. SP 800-61 Rev. 3: Incident Response Recommendations and ConsiderationsNIST
  2. Sigma Rule SpecificationSigmaHQ

Editorial status: first edition. Review the linked vendor documentation for product- and version-specific changes before acting.