Skip to content

[New Rule] Azure AKS Kubernetes Events Deleted - #6423

Merged
terrancedejesus merged 4 commits into
mainfrom
new-rule/azure-aks-events-deleted
Jul 29, 2026
Merged

[New Rule] Azure AKS Kubernetes Events Deleted#6423
terrancedejesus merged 4 commits into
mainfrom
new-rule/azure-aks-events-deleted

Conversation

@terrancedejesus

@terrancedejesus terrancedejesus commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Pull Request

Issue link(s):

Summary - What I changed

Detects an identity deleting Kubernetes events on AKS (Azure Kubernetes Service), excluding known AKS control-plane and platform identities. Adversaries delete events (individually or in bulk via deletecollection) to remove evidence of pod creation, exec, or scheduling activity and impair incident response after operating in the cluster. Coverage includes workload service accounts (system:serviceaccount:*), so a compromised in-cluster token wiping events is not excluded.

Screenshot 2026-07-23 at 10 14 22 AM

How To Test

Query can be used in TRADE stack.

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
Copy Markdown
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 marked this pull request as ready for review July 23, 2026 13:46
Copilot AI review requested due to automatic review settings July 23, 2026 13:46

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.

Pull request overview

Adds a new Azure (AKS) detection rule intended to alert when Kubernetes events are deleted via kube-audit logs ingested into azure.platformlogs, helping surface defense-evasion activity in clusters.

Changes:

  • Introduces a new KQL query rule targeting kube-audit delete operations against Kubernetes events.
  • Adds an investigation guide, references, and investigation fields for triage.
  • Sets rule metadata (severity/risk, tags, timestamp override) for production use.
Comments suppressed due to low confidence (2)

rules/integrations/azure/defense_evasion_azure_aks_events_deleted.toml:23

  • The rule name says events were deleted, but the query only checks for a delete verb (it will also match failed/forbidden delete attempts). Either add an explicit success condition or rename the rule to reflect an attempted deletion.
name = "Azure AKS Kubernetes Events Deleted"

rules/integrations/azure/defense_evasion_azure_aks_events_deleted.toml:26

  • The investigation guide header should match the rule name (and the query semantics) if this is intended to alert on attempted deletions, not only confirmed successful deletions.
### Investigating Azure AKS Kubernetes Events Deleted

Comment thread rules/integrations/azure/defense_evasion_azure_aks_events_deleted.toml Outdated
Comment thread rules/integrations/azure/defense_evasion_azure_aks_events_deleted.toml Outdated
Copilot stopped work on behalf of terrancedejesus due to an error July 29, 2026 23:02
@terrancedejesus
terrancedejesus merged commit d3ab358 into main Jul 29, 2026
17 of 23 checks passed
@terrancedejesus
terrancedejesus deleted the new-rule/azure-aks-events-deleted branch July 29, 2026 23:10
wingiti pushed a commit to wingiti/detection-rules that referenced this pull request Aug 19, 2026
* [New Rule] Azure AKS Kubernetes Events Deleted

* logic adjustment, description & tagging updates
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.

5 participants