Skip to main content

New stats hunting skill

  • August 19, 2026
  • 6 replies
  • 220 views

gkush
Staff
Forum|alt.badge.img+6

The SecOps platform has had a lot more mathematical analytics capabilities built into it but working with it has its own learning curve, I’ve found.  To help with that, I created a new “Stats Hunter” skill:

https://github.com/GooGKush/secops-statistical-hunter

 

I’ve tried to make the skill work with someone to find the right kind of search, guiding the users to methodologies and choices before generating a multi-stage YARA-L stats search.  It also tried to give you guidance on noise thresholds.  

 

For example:

 

> Using the stats hunter skill, can you help me identify low prevalence domains over the last month?


▸ Thought for 3s, 906 tokens
Analyzing Query Approaches
To identify low prevalence domains over the last month using the SecOps Statistical Hunter (secops-statistical-hunter) methodology, we model this threat hunting workflow around
Fleet-Wide Entity Prevalence (P ≤ 2 internal endpoints) and Query Volume Dispersion over raw telemetry (UDM_EVENTS).
──────
### 1. Threat Archetype & Statistical Model

• Threat Archetype: LOW_PREVALENCE_INFRASTRUCTURE / C2_STAGING_DETECTION
• Telemetry Source: UDM_EVENTS (NETWORK_DNS) (with optional pivot to NETWORK_HTTP / NETWORK_CONNECTION)
• Mathematical Primitive: Enterprise-wide unique host count P = count_distinct (principal.asset.ip) aggregated per domain over a rolling 30-day window.
• Hypothesis: Legitimate services (CDNs, OS update servers, major SaaS tools) exhibit high enterprise prevalence (P gg 10 hosts). In contrast, targeted adversary infrastructure
(stealthy C2 callbacks, staged payloads, spear-phishing destinations) typically resolves on only 1–2 endpoints.
──────
### 2. Semantic Sensitivity Tiers

Before running across 30 days of telemetry, select a sensitivity boundary that balances signal coverage against analyst triage capacity:

Tier │ Host Prevalence (P) │ Query Volume Floor / Ceiling │ Physical Interpretation & False Positive Profile
────────────────────────┼─────────────────────┼──────────────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────
CONSERVATIVE │ P = 1 host │ 10 ≤ Queries ≤ 500 │ Single-Host Persistent Beaconing: Surfaces domains queried repeatedly by exactly one host. Filters
│ │ │ out ephemeral one-shot lookups and widespread SaaS.
BALANCED (Recommended) │ P ≤ 2 hosts │ 3 ≤ Queries ≤ 500 │ Targeted Infrastructure & Initial Access: Captures staging and C2 callbacks across isolated hosts
│ │ │ while filtering transient single-packet noise.
AGGRESSIVE │ P ≤ 5 hosts │ Queries ≥ 1 │ Broad Outlier Sweep: Surfaces every low-volume domain across the fleet. High analyst triage volume;
│ │ │ includes typos and ephemeral CDN nodes.
❌ NOISE CLIFF │ P > 10 hosts │ No volume floor │ Normal enterprise web traffic. Do not hunt at this threshold.
──────

Then it gave me some options - both multi-stage and “classic” YARA-L and asked what I wanted to do next.  I went with a test probe to help it calibrate

The Skill is designed to help filter out noise and you see it doing that and clustering types of findings: 

For the output I tried to come up with summary views by default:

 

Whereas if you’re using an MCP client that supports Javascript graphical renderings, it can generate charts like it did here for a different query:

 

 

I’ve had some interesting results with broad questions like “Can you help me identify shadow AI in my environment leveraging my EDR and Network logs?”

Please give it a try and let me know how it works out?

6 replies

matthewnichols
Community Manager
Forum|alt.badge.img+21

​@AymanC ​@Eoved @rodajrc ​@hliu ​@citreno ​@AnimSparrow Curious to get your thoughts on this


AnimSparrow
Forum|alt.badge.img+7

I’ve tested on short probe of data as we are trying to build something waaaay different but I have to admit it is very ‘admin’ friendly and testing was smooth. Unlucky for me the amount of that I could process is too small to provide final verdict about usefulness or more like about valid output but for my part of ingestion it show 100% accuracy. Leaved it in my wardrobe to test when someone decide to go this way (dynamic environment and company yay!)


matthewnichols
Community Manager
Forum|alt.badge.img+21

Thanks ​@AnimSparrow ! Appreciate the feedback. Curious to hear what you’re building. 


whathehack81
Forum|alt.badge.img+9

This looks useful. One thing I’d want surfaced very explicitly in the output is the statistical confidence behind each recommendation.

For low-prevalence hunting, small sample sizes can make something look highly anomalous when there really isn’t enough data to support the conclusion. Broad fleet-wide searches also introduce a multiple-comparison problem — eventually something will look unusual simply because enough dimensions were examined.

I’d love to see every recommendation carry its evidence with it: observation count, baseline window, peer population, threshold used, variance/dispersion, and the exact UDM query that produced the result.

I’d also make “insufficient evidence” a first-class outcome rather than forcing a ranking when the denominator is too small.

Longer term, handling baseline drift/seasonality would be interesting too. A domain queried by two hosts may be highly unusual today but perfectly normal during a monthly maintenance window.

The methodology guidance is probably the most valuable part of this for me — if the skill can explain why a statistical test is appropriate and preserve enough evidence to reproduce the conclusion manually, that would make it much easier to trust operationally.


Eoved
Forum|alt.badge.img+10
  • Bronze 4
  • August 21, 2026

I tested the ZSCORE_PROCESS_SURGE scenario in a lab environment and was impressed by the accuracy of both the detection and the analysis.
 

I think it's a great addition for organizations looking to expand their detection capabilities.

Very useful agent. I'll definitely adopt it and continue testing it in PT environments.

Thanks for sharing!


gkush
Staff
Forum|alt.badge.img+6
  • Author
  • Staff
  • August 24, 2026

Thanks for the feedback and validation.  

I made a bunch of big and little changes on the backend to both expand functionality but also to address directly what ​@whathehack81 suggested.  

 

Reports should now have a mix of “what happened/what was found” with more information about the numbers that went into the finding:

 

 

I’ve also added an appendix at the bottom on the stats details:

 

Sandwiched in between I’ve tried to focus more on the findings and their meanings with more of a practical implication.  I’m trying to make it so that you can use stats to find a result but not need a stats degree to do it.

 

Further feedback very much welcome!