Skip to content

Tuning and False Positives

github-actions[bot] edited this page Nov 29, 2026 · 1 revision

Last reviewed: 2026-11-28

Prerequisites: Detection Engineering index ยท Rule lifecycle ยท Testing & fixtures.

๐ŸŽฏ Purpose

Tuning changes what a rule reports. Done without measurement it hides real activity. This guide gives a measurement method, a tuning record, and the risks of each suppression and exclusion mechanism in Suricata, Wazuh and Sigma.

โš™๏ธ Function

Defines how to count and label alerts before and after a change, a copyable tuning record, and a comparison of the engine mechanisms for silencing alerts.

๐Ÿ† Goal

Every tuning change has a measured reason, the narrowest scope that fixes it, a regression fixture, an owner and a review date.

๐Ÿ“‹ When To Use

  • A rule is noisy enough that analysts are closing its alerts without reading them.
  • You plan to add an exclusion, suppression, threshold or level change.
  • A scheduled review of existing exclusions is due.

๐Ÿ“ Measurement Method

  1. Fix the window and scope. Choose a period (for example 14 days) and the hosts or segments in scope. Record both.
  2. Label every alert in the window. Use: true positive, benign true positive (the rule matched what it was written for, but the activity was authorized) and false positive (the rule matched something it was not meant to). Keep "not reviewed" as its own label rather than guessing.
  3. Compute the baseline. Alerts per day, the share of each label, and precision = true positives / (true positives + false positives).
  4. Find the shared attribute. Group false positives by host, user, process, destination or signature field. Tune only on an attribute shared by the false positives and absent from the true positives.
  5. Replay before deploying. Add the false-positive pattern as a negative fixture and keep the original positive fixture. Both must pass in the engine (see Testing & fixtures).
  6. Measure again. Use the same window length after deployment. Record what was removed, and confirm the true-positive count did not drop.

A drop in alert volume alone is not evidence of a good tune. Check that the positive fixtures still fire and that no true positive from the baseline would now be hidden.

๐Ÿ—‚๏ธ Tuning Record Template

Tuning ID:            TUNE-<YYYY>-<NNN>
Rule:                 <engine, rule ID / sid / Sigma UUID, version before โ†’ after>
Problem:              <false-positive pattern, with alert IDs>
Baseline:             <window, alert count, labels, precision>
Change:               <exclusion | suppression | threshold | level | logic>
Scope:                <exact host / user / subnet / field value>
Mechanism:            <e.g. Suricata suppress, Wazuh child rule level 0, Sigma meta filter>
Hidden activity risk: <what an attacker could do inside the excluded scope>
Regression fixtures:  <positive still fires; FP pattern now negative>
Result:               <window, alert count, labels, precision after>
Reviewer:             <not the author>
Expires / review by:  <YYYY-MM-DD>

โš–๏ธ Suppression Versus Exclusion

An exclusion changes the rule logic so that matching events are not detected. A suppression lets the rule match but drops or limits the alert. Both create a place where real activity goes unreported.

Engine Mechanism What it does Risk
Suricata suppress gen_id <gid>, sig_id <sid>, track <by_src|by_dst|by_either>, ip <ip|subnet|addressvar> in threshold.config Suppresses alerts for a rule or host/network. Actions such as setting a flowbit are still performed A rule that depends on a flowbit set by the suppressed rule can still fire; an attacker using the suppressed IP is invisible to that sid
Suricata threshold: type limit, track by_src, count 1, seconds 3600 in the rule, or threshold gen_id ... type limit in threshold.config Limits alerts per tracker and period Later activity from the same source in the period is not alerted; the lab saw two flows produce one alert
Wazuh Child rule with <if_sid> and level 0 for the benign pattern Narrow exclusion with its own ID that can be tested A pattern that is too broad hides the parent's true positives too
Wazuh overwrite="yes" on a copied built-in rule Replaces the rule's level or other options Affects every event the rule matches; if_sid, if_group, if_level, if_matched_sid and if_matched_group cannot be changed this way
Wazuh ignore="<seconds>" on a rule Ignores the rule for that time after it triggers, to avoid floods Repeated activity in the window is not alerted
Wazuh noalert="1" No alert when the rule matches; analysis continues with other rules The match is not visible as an alert at all
Sigma Meta filter applied with sigma convert --filter <file> Adds the filter condition to the named rules at conversion time The condition is applied as written; with pySigma 2.1.2 an exclusion needs not selection (see field mapping)

Suricata syntax and behavior come from global-thresholds.rst and thresholding.rst in the Suricata 8.0.8 user guide. Wazuh options come from the 4.14 rules syntax and custom rules pages.

Rules Of Thumb

  • Prefer an exclusion on a specific, attacker-hard-to-control attribute (a signed binary path plus a parent process, a named service account on a named host) over a broad one (a whole subnet, a process name alone).
  • Prefer a separate, testable rule (a Wazuh level 0 child, a Sigma filter with its own file) over editing the original rule in place.
  • Give every exclusion an expiry date and review it; delete it when the reason is gone.
  • Never tune by lowering a level to 0 without a record. A level 0 rule raises no alert.

See also

Related Files


โฌ…๏ธ Detection Engineering index | Master Index | ๐ŸŽฏ Role Navigation | Legal Notice


๐Ÿ“„ Source: IncidentResponse/DetectionEngineering/tuning-and-false-positives.md | โœ๏ธ Suggest an edit | โฌ…๏ธ Back to Incident Response

Clone this wiki locally