Which events in a log deserve a second look

This is the defensive side of security, worked on a small scale. The workbench puts sign-ins, role changes and sensitive exports in time order, links the ones that form a pattern, and checks each action against a role policy you can edit. Every finding points back to the events behind it, so you can decide for yourself what needs attention.

Twenty-six minutes of sign-ins and audit records wound on a spiral, one turn to each five-minute window, then laid straight below with a log on each side. Lines join events that one finding cites; verdigris marks them and the span of nine failed sign-ins.

Replay a set of events

Up to 500 events. Your edits and triage notes last until you reload the page; the export saves them as a file.

The events, people and systems here are made up. Nothing on this page scans a network or touches a real system.

Start from an example

Declared observation interval, source registry, and events. UTC only. Max 250,000 characters / 500 events.

Initial actor assignments and exact permission lists. Successful changes update observed roles during replay.

Correlation thresholds

The grid reruns this rule at nearby windows and counts. Changing it clears the results until you replay.

Read the rules

Ready when local scripts load.

Check an exported evidence file

Paste a file saved from this page. It is replayed from its own events, policy and thresholds, and every exported part, including both SHA-256 fingerprints, the method text and the final roles, is compared with the recomputed one. The submitted and duplicate counts must add up to the unique events, and a part this page never exports fails the check.

Paste an export to check it.

    Method and limits

    I wrote these rules myself. The default thresholds are illustrative, chosen to make the examples readable rather than tuned on real logs.

    Exact event-time methods
    AU-SPRAY
    At each failure timestamp t, group failures by identical known origin in the inclusive interval [t - auth window, t]. Require both the configured failure count and distinct actor count. All same-time failures participate.
    AU-BRUTE
    Use the same window, grouped by the exact pair (actor, origin). Require the brute-force failure threshold. Distributed attempts across different origins do not combine.
    Window aggregation
    Consecutive qualifying windows for one rule and group merge when they share failure evidence. A case carries the union of evidence, first detection, last detection, peak counts and qualifying-window count. Separate rules can share events, so the signal count can exceed the number of distinct attacks.
    AU-RECOVERY
    For each success, count failures of the same actor and known origin in [t - auth window, t). The upper endpoint is strict: simultaneous failures cannot establish “before.” Prior successes do not reset the failure window.
    AU-EGRESS
    For each successful external sensitive export, select the latest successful change targeting its actor in [t - change-to-export window, t). Include all changes tied at that latest timestamp. The link is an order in time; whether it was escalation, cause or an unauthorized export is the reviewer's call. The export record count is shown as context and plays no part in the trigger.
    LP / observed-role policy
    Before each timestamp batch, use initial assignments plus preceding successful role changes. Export requires export.<destination>.<sensitivity>; a role change requires privilege.change. Exact membership allows; absent membership denies. Unknown actor, undefined role or missing required metadata produces UNKNOWN. Only successful DENY creates a violation. Failed changes do not update state. Even an unauthorized successful change updates observed state.
    Simultaneous changes
    All actions at one timestamp see the pre-batch role. Successful changes then update their targets. Multiple distinct roles for the same target at the same timestamp make its role unknown until a later change. Within one timestamp, event IDs set no order.
    Input format and replay

    Dataset keys: schemaVersion (1), label, observation {start, end}, sources [{id, label, kind}], events. Source kind is auth, audit or mixed. Every event has id, sourceId, time, type, actor and outcome (success or failure). Auth adds origin; privilege adds target and role; export adds destination, sensitivity and records. Fields are required; unknown fields fail validation. origin and role can be null. destination is internal, external or null. sensitivity is public, internal, sensitive or null. records is an integer from 0 to 1,000,000,000, or null.

    Times must be real UTC dates in YYYY-MM-DDTHH:mm:ssZ or YYYY-MM-DDTHH:mm:ss.sssZ form and lie within the declared observation interval. Offsets, leap-second notation and malformed dates are rejected. Source and event IDs use up to 64 ASCII letters, numbers, periods, underscores, colons and hyphens, starting with a letter or number. Identity and origin strings are exact, case-sensitive opaque labels, compared as text and never looked up.

    Maximums: 500 submitted events, 16 sources, 32 roles and 128 initial assignments; 160-character nonempty labels/identities without control characters. The dataset and policy editors hold up to 250,000 and 50,000 characters. Policy keys are schemaVersion (1), roles [{id, permissions}] and assignments [{actor, role}]. Permissions are privilege.change and the six exact export destination/sensitivity combinations. Undefined role references remain unknown; duplicate assignments or definitions fail.

    Replay normalizes time, deduplicates globally by event ID, then sorts by event time and code-unit ID order. Identical normalized duplicates collapse even when JSON property order differs. Conflicting duplicates, unregistered sources, mismatched source kinds, missing fields and invalid types fail the entire run. JSON uses standard parsing: repeated keys within one object take their last value, so avoid duplicate JSON member names. Source IDs are labels you supply, taken as given.

    Export contains normalized source events, thresholds, policy, methods, linked incidents, decisions, coverage, the threshold grid, the sign-in strips, the near-duplicate identity report, SHA-256 fingerprints of the normalized dataset and policy, and review history. The check box replays a pasted export from its own inputs and compares each part; matching fingerprints show the file is consistent with itself, and say nothing about where its logs came from. IDs are deterministic within one replay and can change when the inputs change. Triage is an analyst's annotation and leaves the evidence as it was. Review history numbers each step locally, without a signed identity or a clock time. Any input edit invalidates results and review; rerunning starts a new review.

    Coverage, false positives and next investigation steps

    Lower count thresholds or longer windows generally surface more candidate sequences, including benign retries, shared egress and maintenance. Higher thresholds or shorter windows can miss quieter or distributed activity. Episode merging means total case count need not increase monotonically as sensitivity increases. The threshold grid shows this for one rule at a time: it replays the events at up to five sign-in windows, from a quarter to four times the current one within 1 to 3,600 seconds, and at up to five counts, from two below to two above the current threshold within 2 to 100. Values that clip to the same number appear once. A count below the spray rule's distinct-actor threshold shows n/a. Precision, recall and a production false-positive rate would need labelled real logs.

    The mixed example includes an authorized maintenance role change and export that still match AU-EGRESS. Check who made the change, its target, where the role came from, the export destination and permission decision before setting a case to explained or escalate. “Explained” records your note and only that: the explanation stays yours to check, and the rules still fire on the next replay.

    A left-censored case has a configured lookback extending before the declared observation start. Its observed positive evidence still counts, but earlier context may be absent. The declared interval is taken on trust; heartbeats, source completeness, ingestion delay, clock correction and authenticity are outside these checks. An empty result means only that no sequence in these inputs matched a rule.

    Exact identities and origins must already be normalized consistently across sources. The near-duplicate report lists actors, targets and origins that differ only by case or spacing so you can check them; the analysis still treats each exact string as its own identity. Each sign-in case also draws its evidence on a strip, one row per origin and actor, from its evidence ids alone. The model works on exact events and exact roles. Devices and sessions, approval tickets, role hierarchy, resource-level access, data-loss classes, cumulative export volume, brute force spread across origins and causal attribution sit outside it. Least privilege here means conformance to the supplied exact-role policy; which permissions a job truly needs is a judgment for the people who run it.

    Every rule above is in one file, cyber-engine.js, and the page loads nothing else.