Skip to content

[New Rule] Azure Arc Kubernetes Cluster Connect Abuse#5824

Open
terrancedejesus wants to merge 11 commits intomainfrom
terrancedejesus/issue5823
Open

[New Rule] Azure Arc Kubernetes Cluster Connect Abuse#5824
terrancedejesus wants to merge 11 commits intomainfrom
terrancedejesus/issue5823

Conversation

@terrancedejesus
Copy link
Contributor

@terrancedejesus terrancedejesus commented Mar 10, 2026

Fixes #5823

Pull Request

Issue link(s):

Summary - What I changed

Adds 4 new rules across Azure and K8s integrations to cover Azure Arc-assisted suspicious anomalies. Please see the issue for more details.

How To Test

Screenshot 2026-03-13 at 11 57 19 AM Screenshot 2026-03-13 at 11 58 59 AM Screenshot 2026-03-13 at 12 00 09 PM

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
  • Automated testing was updated or added to match the most common scenarios
  • Documentation and comments were added for features that require explanation

Contributor checklist

@github-actions
Copy link
Contributor

Rule: New - Guidelines

These guidelines serve as a reminder set of considerations when proposing a new rule.

Documentation and Context

  • Detailed description of the rule.
  • List any new fields required in ECS/data sources.
  • Link related issues or PRs.
  • Include references.

Rule Metadata Checks

  • creation_date matches the date of creation PR initially merged.
  • min_stack_version should support the widest stack versions.
  • name and description should be descriptive and not include typos.
  • query should be inclusive, not overly exclusive, considering performance for diverse environments. Non ecs fields should be added to non-ecs-schema.json if not available in an integration.
  • min_stack_comments and min_stack_version should be included if the rule is only compatible starting from a specific stack version.
  • index pattern should be neither too specific nor too vague, ensuring it accurately matches the relevant data stream (e.g., use logs-endpoint.process-* for process data).
  • integration should align with the index. If the integration is newly introduced, ensure the manifest, schemas, and new_rule.yaml template are updated.
  • setup should include the necessary steps to configure the integration.
  • note should include any additional information (e.g. Triage and analysis investigation guides, timeline templates).
  • tags should be relevant to the threat and align/added to the EXPECTED_RULE_TAGS in the definitions.py file.
  • threat, techniques, and subtechniques should map to ATT&CK always if possible.

New BBR Rules

  • building_block_type should be included if the rule is a building block and the rule should be located in the rules_building_block folder.
  • bypass_bbr_timing should be included if adding custom lookback timing to the rule.

Testing and Validation

  • Provide evidence of testing and detecting the expected threat.
  • Check for existence of coverage to prevent duplication.

@terrancedejesus terrancedejesus added Integration: Azure azure related rules Integration: Kubernetes Kubernetes Integration labels Mar 10, 2026
@terrancedejesus terrancedejesus linked an issue Mar 13, 2026 that may be closed by this pull request
severity = "medium"
tags = [
"Data Source: Kubernetes",
"Domain: Kubernetes",
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we should update definitions.py to include these as expected tags?

Esql.event_count = COUNT(*)
BY kubernetes.audit.impersonatedUser.username

| WHERE Esql.timestamp_first_seen >= NOW() - 9 minutes
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this needed when we have

from = "now-5d"
interval = "9m"

Can we let the detection engine handle this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, this is how to apply the New Terms logic.

  • Grab the last 5 days work of data for this given query
  • Store the first seen time stamp if we have hits
  • The first time seen has to be greater than or equal to the last 9 minutes (meaning it has never been seen before until this run)

Copy link
Contributor Author

@terrancedejesus terrancedejesus Mar 14, 2026

Choose a reason for hiding this comment

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

Can we let the detection engine handle this?

@Samirbous has suggested that ESQL new terms logic is more performant than new terms rule type in recent discussions so I assume so. Additionally these rules all do 5 day lookback windows as well, just in minutes.

…ential_access_unusual_source.toml

Co-authored-by: Mika Ayenson, PhD <Mikaayenson@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[New Rule] Azure Arc Kubernetes Cluster Connect Abuse [New Rule] Azure Kubernetes Secret or Config Object Access

3 participants