Skip to content

[Rule tuning] Update the anomaly threshold of ML rules - #7268

Open
sodhikirti07 wants to merge 1 commit into
mainfrom
kirti/ml-rules-tuning
Open

sodhikirti07 wants to merge 1 commit into
mainfrom
kirti/ml-rules-tuning

Conversation

@sodhikirti07

Copy link
Copy Markdown
Contributor

Pull Request

Issue link(s):

Summary - What I changed

There's a recurring pattern across the ML rule-tuning issues in ia-trade-team: rules with anomaly thresholds below 60 tend to generate more noise. As a first step, we'll increase the threshold to 75. Once we have enough raw ML telemetry, we can further fine-tune the thresholds based on the data.

How To Test

Checklist

  • Added a label for the type of pr: bug, enhancement, schema, maintenance, Rule: New, Rule: Deprecation, Rule: Tuning, Hunt: New, or Hunt: Tuning so guidelines can be generated
  • Added the meta:rapid-merge label if planning to merge within 24 hours
  • Secret and sensitive material has been managed correctly (no credentials or tokens; exclusions use generic non-identifying vendor/install paths — not usernames, hostnames, org names, cluster/agent IDs, IP addresses, or internal workspace/repo trees; cloud/SaaS rules only hard-code vendor first-party or marketplace-listed app/client IDs — never tenant, subscription, account, or project IDs; sample JSON is redacted)
  • Automated testing was updated or added to match the most common scenarios
  • Documentation and comments were added for features that require explanation

Contributor checklist

@sodhikirti07 sodhikirti07 added Rule: Tuning tweaking or tuning an existing rule backport: auto Team: TRADE labels Nov 27, 2026
Copilot AI balanced review requested due to automatic review settings November 27, 2026 17:51
@botelastic botelastic Bot added the ML machine learning related rule label Nov 27, 2026
@sodhikirti07
sodhikirti07 requested a review from a team November 27, 2026 17:51
@elastic-vault-github-plugin-prod

Copy link
Copy Markdown

Starting the rule tests ...

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Missing per-job telemetry and inaccessible tuning issues leave the detection-recall impact of raising 28 production ML thresholds to 75 unvalidated, particularly the two raised from 25, requiring detection-owner review.

No open issues 🎉

What changed in this PR

This PR tunes 28 existing machine-learning detection rules to reduce alert noise by raising their anomaly thresholds to 75, pending further telemetry-based tuning.

Changes:

  • Raises thresholds from 50 to 75 for 26 rules and from 25 to 75 for two Linux network-discovery rules.
  • Updates all affected rules’ updated_date to 2026/11/27.
  • Leaves detection scope, ML job configuration, and investigation guidance unchanged.
File Description
rules/​ml/​resource_development_ml_linux_anomalous_compiler_activity.toml Raises Linux compiler-activity threshold to 75.
rules/​ml/​privilege_escalation_ml_windows_rare_user_runas_event.toml Raises Windows user-context-switch threshold to 75.
rules/​ml/​persistence_ml_windows_anomalous_service.toml Raises unusual Windows service threshold to 75.
rules/​ml/​persistence_ml_windows_anomalous_process_creation.toml Raises unusual parent-child process threshold to 75.
rules/​ml/​persistence_ml_windows_anomalous_process_all_hosts.toml Raises fleet-wide rare Windows process threshold to 75.
rules/​ml/​persistence_ml_windows_anomalous_path_activity.toml Raises atypical Windows process-path threshold to 75.
rules/​ml/​persistence_ml_rare_process_by_host_windows.toml Raises per-host rare Windows process threshold to 75.
rules/​ml/​persistence_ml_rare_process_by_host_linux.toml Raises per-host rare Linux process threshold to 75.
rules/​ml/​persistence_ml_linux_anomalous_process_all_hosts.toml Raises fleet-wide rare Linux process threshold to 75.
rules/​ml/​ml_windows_anomalous_network_activity.toml Raises unusual Windows network-activity threshold to 75.
rules/​ml/​ml_packetbeat_rare_server_domain.toml Raises unusual destination-domain threshold to 75.
rules/​ml/​ml_linux_anomalous_network_port_activity.toml Raises unusual destination-port threshold to 75.
rules/​ml/​ml_linux_anomalous_network_activity.toml Raises unusual Linux network-activity threshold to 75.
rules/​ml/​initial_access_ml_windows_rare_user_type10_remote_login.toml Raises unusual RDP username threshold to 75.
rules/​ml/​initial_access_ml_windows_anomalous_user_name.toml Raises unusual Windows username threshold to 75.
rules/​ml/​initial_access_ml_linux_anomalous_user_name.toml Raises unusual Linux username threshold to 75.
rules/​ml/​execution_ml_windows_rare_script.toml Raises rare PowerShell script threshold to 75.
rules/​ml/​execution_ml_windows_anomalous_script.toml Raises anomalous PowerShell script threshold to 75.
rules/​ml/​discovery_ml_linux_system_process_discovery.toml Raises Linux process-discovery threshold to 75.
rules/​ml/​discovery_ml_linux_system_network_connection_discovery.toml Raises network-connection discovery threshold from 25 to 75.
rules/​ml/​discovery_ml_linux_system_network_configuration_discovery.toml Raises network-configuration discovery threshold from 25 to 75.
rules/​ml/​credential_access_ml_windows_anomalous_metadata_process.toml Raises unusual Windows metadata-access threshold to 75.
rules/​ml/​credential_access_ml_suspicious_login_activity.toml Raises excessive authentication-attempt threshold to 75.
rules/​ml/​credential_access_ml_linux_anomalous_metadata_process.toml Raises unusual Linux metadata-access threshold to 75.
rules/​ml/​command_and_control_ml_rare_dns_question.toml Raises rare DNS query threshold to 75.
rules/​ml/​command_and_control_ml_packetbeat_rare_user_agent.toml Raises rare user-agent threshold to 75.
rules/​ml/​command_and_control_ml_packetbeat_rare_urls.toml Raises rare URL threshold to 75.
rules/​ml/​command_and_control_ml_dns_tunneling.toml Raises DNS-tunneling threshold to 75.

Review effort: Balanced

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport: auto ML machine learning related rule Rule: Tuning tweaking or tuning an existing rule Team: TRADE

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants