PowerShell threat detection based on context

PowerShell runs on every Windows endpoint, every day, for hundreds of legitimate reasons. The threat is never the binary. It is encoded commands, off-baseline timing, unusual scope, and privilege drift on the same primary identity. Vedric reads that context.

Currently supports Windows endpoints.

Blocking versus allowing PowerShell

Blocking PowerShell breaks your environment. Allowing it without context leaves you blind. PowerShell is one of the most useful operational tools on Windows and one of the most abused. Static rules flag either too much, because enterprise IT runs PowerShell constantly, or too little, because malicious patterns look the same as legitimate ones at the binary level. Effective PowerShell threat detection works at the context layer: when the command runs, who runs it, how it is encoded, and how it compares to the user's historical pattern.

Limits of rule-based PowerShell detection

  • Binary-centric EDR

    The PowerShell binary is signed by Microsoft and clean. Process-tree heuristics catch some patterns and miss most. Without a behavioral baseline, EDR cannot tell that a command is the first time this user has run it in six months.

  • Static blocklists

    Once a blocklist exists, attackers Base64-encode, escape, or pipe commands through. Defenders keep adding patterns and end up with a list nobody reviews and false positives nobody fixes.

  • Log scraping

    PowerShell script-block logging is essential, but noisy. Without behavioral correlation, it produces a search index, not alerts.

  • AMSI

    AMSI is excellent at inspecting script content during execution, but it looks for known-bad content. It does not see when a user's PowerShell use departs from their normal pattern.

How Vedric detects PowerShell threats

Vedric reads command lines, script-block events, encoded arguments, and parent-child process context. It then compares each command to this user, this endpoint, and the user's peer cohort. Most PowerShell threat detection comes from that comparison, not from a regex on the command itself.

  • Encoding-aware

    Decoding before comparison

    Encoded PowerShell is decoded before baselining, and the plaintext command is compared to the historical pattern. An encoded version of a routine command is treated as routine. An encoded one-off is treated as a deviation.

  • Context

    Timing, identity, and scope

    When, who, and how matter more than the command itself. A WMI query at noon by an IT admin is normal. The same query at 03:00 from a finance workstation, by a domain admin who has not run that command in six months, is a storyline. Vedric weights timing, identity, and scope as first-class context.

  • Correlated

    Correlation with other signals

    A PowerShell deviation alone is minor. Correlated with scope drift, privilege drift, or a time anomaly on the same identity, it becomes a storyline. The platform promotes the correlated case and logs the rest without alerting.

Example: encoded command on a finance workstation

The user works in finance and has never used PowerShell beyond what their installed apps invoke. Late on a Thursday evening, an encoded command runs from an unusual parent process.

  1. T+01 - the endpoint baseline shows no direct PowerShell use in this user's historical pattern.
  2. T+02 - encoded PowerShell launches from a parent process that is not in the user's normal toolset. Decoded; baseline mismatch logged immediately.
  3. T+03 - the same workstation shows a rise in host-level new-destination counts and outbound network bytes.
  4. T+04 - multiple correlated deviations appear within minutes: encoding shape, parent process, and host-level network drift. Vedric creates a storyline for review.
  5. T+05 - Vedric AI triage returns a verdict: critical. Tool calls retrieve the user baseline, peer baseline, recent forensic trail, and historical PowerShell shape. Recommended action: isolate session.
  6. T+06 - admin reviews and approves isolation. The audit trail records the storyline, verdict, tool calls, and admin response with the stated reason.

Outcome

Static PowerShell rules would have produced either no signal, because the command is not on any blocklist, or noise, because every encoded command would have been flagged. This detection worked because the invocation was off-baseline for this user, at this time, from this parent process.

What it does and does not do

What Vedric does

  • Decode encoded PowerShell before baselining and storyline correlation
  • Compare commands to per-user, per-endpoint, and per-peer historical patterns
  • Correlate PowerShell deviations with scope, temporal, and privilege drift
  • Tenant-isolated AI triage with read-only tools that surface relevant context
  • Append-only application audit rows for covered PowerShell response actions

What Vedric does not do

  • Block PowerShell binaries or maintain a static command blocklist as the primary control
  • Retain more than 2,048 bytes of best-effort-secret-redacted script text per event, aside from the fixed truncation marker
  • Treat encoded PowerShell as automatically malicious; encoding is one signal among several
  • Take action against an endpoint without admin approval and a stated reason
  • Replace EDR; many teams use Vedric storylines to enrich EDR alerts

What Vedric does not collect

Vedric is designed to minimize content collection. The agent code enforces the list of refused collectors and the documented, bounded PowerShell exception.

Read the full privacy stance
  • No keystrokes
  • No screenshots
  • No webcam
  • No microphone
  • No file contents
  • No private messages

Frequently asked questions

Early access

Early access is for teams whose PowerShell rules are either too quiet or too loud, and who want behavioral context underneath them instead of more thresholds.

Request Early AccessRequest a demoResponse within one business day.