nldcsc-elastic-rules 0.0.8__py3-none-any.whl → 0.0.16__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. nldcsc_elastic_rules/__init__.py +1 -1
  2. nldcsc_elastic_rules/rules/{linux → cross-platform}/command_and_control_curl_wget_spawn_via_nodejs_parent.toml +32 -11
  3. nldcsc_elastic_rules/rules/cross-platform/command_and_control_genai_process_suspicious_tld_connection.toml +134 -0
  4. nldcsc_elastic_rules/rules/cross-platform/command_and_control_genai_process_unusual_domain.toml +128 -0
  5. nldcsc_elastic_rules/rules/cross-platform/credential_access_genai_process_sensitive_file_access.toml +154 -0
  6. nldcsc_elastic_rules/rules/cross-platform/credential_access_gitleaks_execution.toml +114 -0
  7. nldcsc_elastic_rules/rules/cross-platform/credential_access_multi_could_secrets_via_api.toml +198 -0
  8. nldcsc_elastic_rules/rules/cross-platform/credential_access_trufflehog_execution.toml +24 -5
  9. nldcsc_elastic_rules/rules/cross-platform/defense_evasion_genai_config_modification.toml +120 -0
  10. nldcsc_elastic_rules/rules/cross-platform/defense_evasion_genai_process_compiling_executables.toml +158 -0
  11. nldcsc_elastic_rules/rules/cross-platform/defense_evasion_genai_process_encoding_prior_to_network_activity.toml +172 -0
  12. nldcsc_elastic_rules/rules/cross-platform/defense_evasion_potential_http_downgrade_attack.toml +98 -0
  13. nldcsc_elastic_rules/rules/cross-platform/discovery_web_server_local_file_inclusion_activity.toml +172 -0
  14. nldcsc_elastic_rules/rules/cross-platform/discovery_web_server_remote_file_inclusion_activity.toml +133 -0
  15. nldcsc_elastic_rules/rules/cross-platform/execution_aws_ec2_lolbin_via_ssm.toml +250 -0
  16. nldcsc_elastic_rules/rules/{linux/persistence_nodejs_pre_or_post_install_script_execution.toml → cross-platform/execution_nodejs_pre_or_post_install_script_execution.toml} +40 -24
  17. nldcsc_elastic_rules/rules/cross-platform/execution_privileged_container_creation_with_host_reference.toml +146 -0
  18. nldcsc_elastic_rules/rules/cross-platform/execution_register_github_actions_runner.toml +126 -0
  19. nldcsc_elastic_rules/rules/cross-platform/execution_via_github_actions_runner.toml +130 -0
  20. nldcsc_elastic_rules/rules/cross-platform/execution_via_github_runner_with_runner_tracking_id_tampering_via_env_vars.toml +163 -0
  21. nldcsc_elastic_rules/rules/cross-platform/initial_access_execution_susp_react_serv_child.toml +130 -0
  22. nldcsc_elastic_rules/rules/cross-platform/initial_access_file_upload_followed_by_get_request.toml +145 -0
  23. nldcsc_elastic_rules/rules/cross-platform/multiple_alerts_elastic_defend_netsecurity_by_host.toml +4 -1
  24. nldcsc_elastic_rules/rules/cross-platform/persistence_credential_access_modify_auth_module_or_config.toml +3 -4
  25. nldcsc_elastic_rules/rules/cross-platform/persistence_web_server_potential_command_injection.toml +23 -25
  26. nldcsc_elastic_rules/rules/cross-platform/reconnaissance_web_server_discovery_or_fuzzing_activity.toml +13 -14
  27. nldcsc_elastic_rules/rules/cross-platform/reconnaissance_web_server_unusual_spike_in_error_logs.toml +8 -5
  28. nldcsc_elastic_rules/rules/cross-platform/reconnaissance_web_server_unusual_spike_in_error_response_codes.toml +12 -12
  29. nldcsc_elastic_rules/rules/cross-platform/reconnaissance_web_server_unusual_user_agents.toml +37 -43
  30. nldcsc_elastic_rules/rules/integrations/aws/defense_evasion_rds_instance_restored.toml +137 -45
  31. nldcsc_elastic_rules/rules/integrations/aws/discovery_iam_principal_enumeration_via_update_assume_role_policy.toml +152 -0
  32. nldcsc_elastic_rules/rules/integrations/aws/discovery_multiple_discovery_api_calls_via_cli.toml +242 -0
  33. nldcsc_elastic_rules/rules/integrations/aws/exfiltration_rds_snapshot_export.toml +141 -33
  34. nldcsc_elastic_rules/rules/integrations/aws/exfiltration_rds_snapshot_shared_with_another_account.toml +108 -30
  35. nldcsc_elastic_rules/rules/integrations/aws/exfiltration_s3_bucket_policy_added_for_external_account_access.toml +2 -1
  36. nldcsc_elastic_rules/rules/integrations/aws/exfiltration_s3_bucket_replicated_to_external_account.toml +114 -27
  37. nldcsc_elastic_rules/rules/integrations/aws/impact_efs_filesystem_deleted.toml +174 -0
  38. nldcsc_elastic_rules/rules/integrations/aws/impact_kms_cmk_disabled_or_scheduled_for_deletion.toml +111 -33
  39. nldcsc_elastic_rules/rules/integrations/aws/impact_rds_instance_cluster_deletion.toml +129 -43
  40. nldcsc_elastic_rules/rules/integrations/aws/impact_rds_instance_cluster_deletion_protection_disabled.toml +89 -27
  41. nldcsc_elastic_rules/rules/integrations/aws/impact_rds_snapshot_deleted.toml +127 -37
  42. nldcsc_elastic_rules/rules/integrations/aws/impact_s3_object_encryption_with_external_key.toml +160 -43
  43. nldcsc_elastic_rules/rules/integrations/aws/initial_access_iam_session_token_used_from_multiple_addresses.toml +20 -10
  44. nldcsc_elastic_rules/rules/integrations/aws/ml_cloudtrail_error_message_spike.toml +35 -1
  45. nldcsc_elastic_rules/rules/integrations/aws/ml_cloudtrail_rare_error_code.toml +59 -1
  46. nldcsc_elastic_rules/rules/integrations/aws/ml_cloudtrail_rare_method_by_city.toml +19 -1
  47. nldcsc_elastic_rules/rules/integrations/aws/ml_cloudtrail_rare_method_by_country.toml +19 -1
  48. nldcsc_elastic_rules/rules/integrations/aws/ml_cloudtrail_rare_method_by_user.toml +58 -1
  49. nldcsc_elastic_rules/rules/integrations/aws/persistence_rds_db_instance_password_modified.toml +109 -35
  50. nldcsc_elastic_rules/rules/integrations/aws/persistence_rds_instance_made_public.toml +103 -22
  51. nldcsc_elastic_rules/rules/integrations/aws/persistence_redshift_instance_creation.toml +3 -3
  52. nldcsc_elastic_rules/rules/integrations/aws/privilege_escalation_sts_assume_root_from_rare_user_and_member_account.toml +126 -69
  53. nldcsc_elastic_rules/rules/integrations/azure/credential_access_azure_entra_susp_device_code_signin.toml +134 -0
  54. nldcsc_elastic_rules/rules/integrations/azure/credential_access_entra_id_excessive_account_lockouts.toml +2 -2
  55. nldcsc_elastic_rules/rules/integrations/azure/ml_azure_event_failures.toml +124 -0
  56. nldcsc_elastic_rules/rules/integrations/azure/ml_azure_rare_event_failures.toml +148 -0
  57. nldcsc_elastic_rules/rules/integrations/azure/ml_azure_rare_method_by_city.toml +109 -0
  58. nldcsc_elastic_rules/rules/integrations/azure/ml_azure_rare_method_by_country.toml +108 -0
  59. nldcsc_elastic_rules/rules/integrations/azure/ml_azure_rare_method_by_user.toml +147 -0
  60. nldcsc_elastic_rules/rules/integrations/fim/persistence_suspicious_file_modifications.toml +9 -1
  61. nldcsc_elastic_rules/rules/integrations/gcp/ml_gcp_error_message_spike.toml +95 -0
  62. nldcsc_elastic_rules/rules/integrations/gcp/ml_gcp_rare_error_code.toml +118 -0
  63. nldcsc_elastic_rules/rules/integrations/gcp/ml_gcp_rare_method_by_city.toml +79 -0
  64. nldcsc_elastic_rules/rules/integrations/gcp/ml_gcp_rare_method_by_country.toml +79 -0
  65. nldcsc_elastic_rules/rules/integrations/gcp/ml_gcp_rare_method_by_user.toml +117 -0
  66. nldcsc_elastic_rules/rules/integrations/github/initial_access_github_register_self_hosted_runner.toml +92 -0
  67. nldcsc_elastic_rules/rules/integrations/o365/collection_onedrive_excessive_file_downloads.toml +24 -14
  68. nldcsc_elastic_rules/rules/linux/defense_evasion_file_deletion_via_shred.toml +12 -5
  69. nldcsc_elastic_rules/rules/linux/execution_suspicious_pod_or_container_creation_command_execution.toml +150 -0
  70. nldcsc_elastic_rules/rules/linux/persistence_at_job_creation.toml +4 -4
  71. nldcsc_elastic_rules/rules/linux/persistence_pluggable_authentication_module_creation.toml +12 -7
  72. nldcsc_elastic_rules/rules/linux/persistence_pth_file_creation.toml +6 -1
  73. nldcsc_elastic_rules/rules/linux/persistence_site_and_user_customize_file_creation.toml +6 -1
  74. nldcsc_elastic_rules/rules/linux/persistence_web_server_unusual_command_execution.toml +155 -0
  75. nldcsc_elastic_rules/rules/ml/ml_high_count_events_for_a_host_name.toml +58 -1
  76. nldcsc_elastic_rules/rules/ml/ml_high_count_network_denies.toml +71 -1
  77. nldcsc_elastic_rules/rules/ml/ml_high_count_network_events.toml +53 -1
  78. nldcsc_elastic_rules/rules/ml/ml_linux_anomalous_network_activity.toml +56 -1
  79. nldcsc_elastic_rules/rules/ml/ml_linux_anomalous_network_port_activity.toml +40 -1
  80. nldcsc_elastic_rules/rules/ml/ml_low_count_events_for_a_host_name.toml +27 -1
  81. nldcsc_elastic_rules/rules/ml/ml_packetbeat_rare_server_domain.toml +63 -1
  82. nldcsc_elastic_rules/rules/ml/ml_rare_destination_country.toml +68 -1
  83. nldcsc_elastic_rules/rules/ml/ml_spike_in_traffic_to_a_country.toml +53 -1
  84. nldcsc_elastic_rules/rules/ml/ml_windows_anomalous_network_activity.toml +56 -1
  85. nldcsc_elastic_rules/rules/network/initial_access_react_server_components_rce_attempt.toml +123 -0
  86. nldcsc_elastic_rules/rules/promotions/external_alerts.toml +2 -2
  87. nldcsc_elastic_rules/rules/windows/command_and_control_common_webservices.toml +4 -3
  88. nldcsc_elastic_rules/rules/windows/credential_access_rare_webdav_destination.toml +3 -4
  89. nldcsc_elastic_rules/rules/windows/defense_evasion_masquerading_as_svchost.toml +11 -8
  90. nldcsc_elastic_rules/rules/windows/defense_evasion_posh_obfuscation.toml +25 -2
  91. nldcsc_elastic_rules/rules/windows/defense_evasion_posh_obfuscation_backtick.toml +2 -3
  92. nldcsc_elastic_rules/rules/windows/defense_evasion_posh_obfuscation_backtick_var.toml +2 -3
  93. nldcsc_elastic_rules/rules/windows/defense_evasion_posh_obfuscation_char_arrays.toml +2 -3
  94. nldcsc_elastic_rules/rules/windows/defense_evasion_posh_obfuscation_concat_dynamic.toml +2 -3
  95. nldcsc_elastic_rules/rules/windows/defense_evasion_posh_obfuscation_high_number_proportion.toml +2 -3
  96. nldcsc_elastic_rules/rules/windows/defense_evasion_posh_obfuscation_iex_env_vars_reconstruction.toml +2 -3
  97. nldcsc_elastic_rules/rules/windows/defense_evasion_posh_obfuscation_iex_string_reconstruction.toml +2 -3
  98. nldcsc_elastic_rules/rules/windows/defense_evasion_posh_obfuscation_index_reversal.toml +2 -3
  99. nldcsc_elastic_rules/rules/windows/defense_evasion_posh_obfuscation_reverse_keyword.toml +2 -3
  100. nldcsc_elastic_rules/rules/windows/defense_evasion_posh_obfuscation_string_concat.toml +2 -3
  101. nldcsc_elastic_rules/rules/windows/defense_evasion_posh_obfuscation_string_format.toml +2 -3
  102. nldcsc_elastic_rules/rules/windows/defense_evasion_posh_obfuscation_whitespace_special_proportion.toml +2 -3
  103. nldcsc_elastic_rules/rules/windows/defense_evasion_wsl_filesystem.toml +13 -10
  104. nldcsc_elastic_rules/rules/windows/execution_posh_hacktool_functions.toml +3 -2
  105. nldcsc_elastic_rules/rules/windows/execution_suspicious_powershell_imgload.toml +7 -2
  106. nldcsc_elastic_rules/rules/windows/execution_windows_powershell_susp_args.toml +9 -2
  107. nldcsc_elastic_rules/rules/windows/impact_mod_critical_os_files.toml +16 -6
  108. nldcsc_elastic_rules/rules/windows/lateral_movement_credential_access_kerberos_correlation.toml +7 -2
  109. nldcsc_elastic_rules/rules/windows/lateral_movement_scheduled_task_target.toml +2 -2
  110. nldcsc_elastic_rules/rules/windows/persistence_browser_extension_install.toml +19 -2
  111. nldcsc_elastic_rules/rules/windows/persistence_msi_installer_task_startup.toml +50 -13
  112. nldcsc_elastic_rules/rules/windows/persistence_via_application_shimming.toml +12 -2
  113. nldcsc_elastic_rules/rules/windows/privilege_escalation_tokenmanip_sedebugpriv_enabled.toml +24 -18
  114. nldcsc_elastic_rules/rules/windows/privilege_escalation_unusual_printspooler_childprocess.toml +14 -2
  115. nldcsc_elastic_rules/rules/windows/privilege_escalation_via_ppid_spoofing.toml +3 -2
  116. {nldcsc_elastic_rules-0.0.8.dist-info → nldcsc_elastic_rules-0.0.16.dist-info}/METADATA +1 -1
  117. {nldcsc_elastic_rules-0.0.8.dist-info → nldcsc_elastic_rules-0.0.16.dist-info}/RECORD +119 -87
  118. nldcsc_elastic_rules/rules/integrations/aws/credential_access_aws_iam_assume_role_brute_force.toml +0 -105
  119. nldcsc_elastic_rules/rules/integrations/aws/discovery_ec2_multi_region_describe_instances.toml +0 -135
  120. nldcsc_elastic_rules/rules/integrations/aws/discovery_ec2_multiple_discovery_api_calls_via_cli.toml +0 -155
  121. nldcsc_elastic_rules/rules/integrations/aws/impact_efs_filesystem_or_mount_deleted.toml +0 -95
  122. {nldcsc_elastic_rules-0.0.8.dist-info → nldcsc_elastic_rules-0.0.16.dist-info}/WHEEL +0 -0
  123. {nldcsc_elastic_rules-0.0.8.dist-info → nldcsc_elastic_rules-0.0.16.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,124 @@
1
+ [metadata]
2
+ creation_date = "2025/10/06"
3
+ integration = ["azure"]
4
+ maturity = "production"
5
+ min_stack_comments = "New job added"
6
+ min_stack_version = "9.3.0"
7
+ updated_date = "2025/12/08"
8
+
9
+ [rule]
10
+ anomaly_threshold = 50
11
+ author = ["Elastic"]
12
+ description = """
13
+ A machine learning job detected a significant spike in the rate of a particular failure in the Azure Activity Logs messages. Spikes
14
+ in failed messages may accompany attempts at privilege escalation, lateral movement, or discovery.
15
+ """
16
+ false_positives = [
17
+ """
18
+ Spikes in failures can also be due to bugs in cloud automation scripts or workflows; changes to cloud
19
+ automation scripts or workflows; adoption of new services; changes in the way services are used; or changes to IAM
20
+ privileges.
21
+ """,
22
+ ]
23
+ from = "now-60m"
24
+ interval = "15m"
25
+ license = "Elastic License v2"
26
+ machine_learning_job_id = "azure_activitylogs_high_distinct_count_event_action_on_failure"
27
+ name = "Spike in Azure Activity Logs Failed Messages"
28
+ note = """## Triage and analysis
29
+
30
+ > **Disclaimer**:
31
+ > This investigation guide was created using generative AI technology and has been reviewed to improve its accuracy and relevance. While every effort has been made to ensure its quality, we recommend validating the content and adapting it to suit your specific environment and operational needs.
32
+
33
+ ### Investigating Spike in Azure Activity Logs Failed Messages
34
+
35
+ This rule flags an unusual surge in failed control‑plane operations recorded in the platform’s activity logs, highlighting abrupt increases in a specific failure type. It matters because concentrated failures frequently accompany probing for privileges, discovery, or staged lateral movement. Adversaries often script through the management API to list subscriptions, role assignments, or policy definitions and then attempt role updates or assignment creations at scale, generating clusters of authorization and scope‑validation failures as they enumerate tenants and test permission boundaries.
36
+
37
+ ### Possible investigation steps
38
+
39
+ - Categorize the spike by failure reason (authorization, policy, scope validation, throttling, or availability) and pivot to the initiating identities, apps, and source IPs to see whether a single principal or distributed automation is driving it.
40
+ - Correlate these failures with Entra ID sign‑in logs and Conditional Access evaluations for the same principals to determine whether authentication, token, or policy blocks explain the surge.
41
+ - Review recent RBAC changes (role assignments/definitions), PIM activations, and deny/policy assignments around the spike to spot attempted privilege escalation or scope misconfiguration.
42
+ - Map the affected resource providers and scopes (tenant, subscription, resource group) to identify reconnaissance patterns such as wide listing followed by repeated unauthorized write attempts.
43
+ - Confirm benign causes such as expired service principal credentials, broken pipelines, or provider outages with owners, and if intent is suspect promptly disable the principal, revoke tokens, and rotate secrets.
44
+
45
+ ### False positive analysis
46
+
47
+ - Expired or rotated service principal credentials in scheduled automation led to repeated Azure management operations with invalid tokens, spiking AuthorizationFailed entries until the secret was updated.
48
+ - A planned rollout of Azure Policy with a deny effect or the application of resource locks temporarily blocked routine deployments across multiple scopes, generating a concentrated burst of failed write operations during the change window.
49
+
50
+ ### Response and remediation
51
+
52
+ - Temporarily disable the Entra ID service principal or user driving the spike, revoke all refresh/access tokens, and apply a Conditional Access block for management API access from its source IP ranges to halt further control‑plane attempts.
53
+ - Pause implicated automation by stopping the Azure DevOps pipeline or Automation Account runbook, invalidate any associated PATs or shared secrets, and rotate the application/client secret or federated credentials tied to the identity.
54
+ - Back out unauthorized changes by removing newly created role assignments, deny assignments, or policy assignments introduced during the window, and restore intended RBAC at the affected subscriptions, management groups, and resource groups via IaC state.
55
+ - Recover by fixing the misconfiguration or credentials, validating successful test operations (e.g., list and create where permitted) in a non‑production subscription, and then re‑enable automation with least‑privilege scopes while monitoring for a return to normal failure rates.
56
+ - Escalate to the incident response lead if failures include repeated attempts to change role assignments or policy at tenant or management‑group scope, originate from unfamiliar geographies or unapproved IP ranges, spread across multiple subscriptions, or persist more than 15 minutes after containment.
57
+ - Harden by enforcing PIM for privileged roles, enabling Conditional Access for workload identities and administrators (MFA and named locations), implementing secret scanning and rotation for repos and pipelines, exporting Activity Logs to Log Analytics with retention, and alerting on abnormal management‑plane failures per identity.
58
+ """
59
+ setup = """## Setup
60
+
61
+ This rule requires the installation of associated Machine Learning jobs, as well as data coming in from Azure Activity Logs.
62
+
63
+ ### Anomaly Detection Setup
64
+
65
+ Once the rule is enabled, the associated Machine Learning job will start automatically. You can view the Machine Learning job linked under the "Definition" panel of the detection rule. If the job does not start due to an error, the issue must be resolved for the job to commence successfully. For more details on setting up anomaly detection jobs, refer to the [helper guide](https://www.elastic.co/guide/en/kibana/current/xpack-ml-anomalies.html).
66
+
67
+ ### Azure Activity Logs Integration Setup
68
+ The Azure Activity Logs integration allows you to collect logs and metrics from Azure with Elastic Agent.
69
+
70
+ #### The following steps should be executed in order to add the Elastic Agent System integration "Azure Activity Logs" to your system:
71
+ - Go to the Kibana home page and click “Add integrations”.
72
+ - In the query bar, search for “Azure Activity Logs” and select the integration to see more details about it.
73
+ - Click “Add Azure Activity Logs”.
74
+ - Configure the integration.
75
+ - Click “Save and Continue”.
76
+ - For more details on the integration refer to the [helper guide](https://www.elastic.co/docs/reference/integrations/azure/activitylogs).
77
+ """
78
+ references = ["https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html"]
79
+ risk_score = 21
80
+ rule_id = "1eb74889-18c5-4f78-8010-d8aceb7a9ef4"
81
+ severity = "low"
82
+ tags = [
83
+ "Domain: Cloud",
84
+ "Data Source: Azure",
85
+ "Data Source: Azure Activity Logs",
86
+ "Rule Type: ML",
87
+ "Rule Type: Machine Learning",
88
+ "Resources: Investigation Guide",
89
+ ]
90
+ type = "machine_learning"
91
+
92
+ [[rule.threat]]
93
+ framework = "MITRE ATT&CK"
94
+
95
+ [rule.threat.tactic]
96
+ id = "TA0007"
97
+ name = "Discovery"
98
+ reference = "https://attack.mitre.org/tactics/TA0007/"
99
+
100
+ [[rule.threat.technique]]
101
+ id = "T1526"
102
+ name = "Cloud Service Discovery"
103
+ reference = "https://attack.mitre.org/techniques/T1526/"
104
+
105
+ [[rule.threat.technique]]
106
+ id = "T1580"
107
+ name = "Cloud Infrastructure Discovery"
108
+ reference = "https://attack.mitre.org/techniques/T1580/"
109
+
110
+ [[rule.threat]]
111
+ framework = "MITRE ATT&CK"
112
+
113
+ [rule.threat.tactic]
114
+ id = "TA0004"
115
+ name = "Privilege Escalation"
116
+ reference = "https://attack.mitre.org/tactics/TA0004/"
117
+
118
+ [[rule.threat]]
119
+ framework = "MITRE ATT&CK"
120
+
121
+ [rule.threat.tactic]
122
+ id = "TA0008"
123
+ name = "Lateral Movement"
124
+ reference = "https://attack.mitre.org/tactics/TA0008/"
@@ -0,0 +1,148 @@
1
+ [metadata]
2
+ creation_date = "2025/10/06"
3
+ integration = ["azure"]
4
+ maturity = "production"
5
+ min_stack_comments = "New job added"
6
+ min_stack_version = "9.3.0"
7
+ updated_date = "2025/12/08"
8
+
9
+ [rule]
10
+ anomaly_threshold = 50
11
+ author = ["Elastic"]
12
+ description = """
13
+ A machine learning job detected an unusual failure in an Azure Activity Logs message. These can be byproducts of attempted or
14
+ successful persistence, privilege escalation, defense evasion, discovery, lateral movement, or collection.
15
+ """
16
+ false_positives = [
17
+ """
18
+ Rare and unusual failures may indicate an impending service failure state. Rare and unusual user failure activity can
19
+ also be due to manual troubleshooting or reconfiguration attempts by insufficiently privileged users, bugs in cloud
20
+ automation scripts or workflows, or changes to IAM privileges.
21
+ """,
22
+ ]
23
+ from = "now-2h"
24
+ interval = "15m"
25
+ license = "Elastic License v2"
26
+ machine_learning_job_id = "azure_activitylogs_rare_event_action_on_failure"
27
+ name = "Rare Azure Activity Logs Event Failures"
28
+ note = """## Triage and analysis
29
+
30
+ > **Disclaimer**:
31
+ > This investigation guide was created using generative AI technology and has been reviewed to improve its accuracy and relevance. While every effort has been made to ensure its quality, we recommend validating the content and adapting it to suit your specific environment and operational needs.
32
+
33
+ ### Investigating Rare Azure Activity Logs Event Failures
34
+
35
+ This rule surfaces statistically rare Azure Activity Logs failures, pointing to control‑plane actions that break from typical patterns and may reflect reconnaissance, privilege changes, or defense evasion. A common attacker sequence is using a newly compromised identity to enumerate subscriptions and resource groups through the management API; repeated access denials during these discovery calls can occur as the adversary maps tenant scope and tests permissions before escalating.
36
+
37
+ ### Possible investigation steps
38
+
39
+ - Classify the failing operations (discovery vs write/privileged) and tie them to the initiating principal and target scope to gauge intent and blast radius.
40
+ - Correlate with Entra ID sign-in telemetry for the same principal around the event window to assess geo/device novelty, MFA state, Conditional Access results, and identity risk flags.
41
+ - Check whether the identity recently had role assignments, group membership, PIM elevation, or app consent changes, and whether this is first-time access to the affected subscriptions or resource groups.
42
+ - Confirm whether Azure Policy denies, deny assignments, or resource locks explain the failures, and verify whether the principal should legitimately be exempt or granted access.
43
+ - If the actor is a service principal or managed identity, review recent credential changes (keys/secrets/certificates), app role assignment grants, and automation pipeline updates that could explain unexpected calls.
44
+
45
+ ### False positive analysis
46
+
47
+ - A newly deployed automation or audit workflow attempts wide-scope resource discovery using a service principal or managed identity, encountering expected RBAC or policy denials that are rare for that caller.
48
+ - Recent governance changes such as Azure Policy deny effects, deny assignments, or resource locks cause routine management operations (e.g., writes or deletes) to start failing, creating an unusual failure pattern until baselines adjust.
49
+
50
+ ### Response and remediation
51
+
52
+ - Immediately contain the initiating identity by disabling user/service principal sign-in, revoking refresh tokens, and applying a temporary Conditional Access block on Azure management endpoints, while placing deny assignments and resource locks on the impacted subscriptions/resource groups.
53
+ - Eradicate potential persistence by removing any newly created role assignments, app consent grants, policy exemptions, or management role changes identified in triage, and rotate keys/secrets/certificates for affected service principals or managed identities.
54
+ - Recover business operations by restoring access only to verified identities through PIM approvals, re-enabling known-good automation accounts/runbooks, and validating that expected management operations succeed without further rare failures on the targeted resources.
55
+ - Escalate to incident response immediately if rare failures are observed across multiple subscriptions or are followed by a successful privileged action (e.g., new Owner or User Access Administrator assignment, app consent grant, or resource lock removal) or originate from an unfamiliar geo/device, triggering tenant-wide containment.
56
+ - Harden going forward by enforcing MFA and Conditional Access (including workload identity policies) for Resource Manager access, restricting service principals to least privilege with certificate-based credentials or workload identity federation, implementing deny assignments/resource locks for crown-jewel resources, and centralizing Activity Logs in SIEM with detections for discovery bursts and denied write attempts.
57
+ """
58
+ setup = """## Setup
59
+
60
+ This rule requires the installation of associated Machine Learning jobs, as well as data coming in from Azure Activity Logs.
61
+
62
+ ### Anomaly Detection Setup
63
+
64
+ Once the rule is enabled, the associated Machine Learning job will start automatically. You can view the Machine Learning job linked under the "Definition" panel of the detection rule. If the job does not start due to an error, the issue must be resolved for the job to commence successfully. For more details on setting up anomaly detection jobs, refer to the [helper guide](https://www.elastic.co/guide/en/kibana/current/xpack-ml-anomalies.html).
65
+
66
+ ### Azure Activity Logs Integration Setup
67
+ The Azure Activity Logs integration allows you to collect logs and metrics from Azure with Elastic Agent.
68
+
69
+ #### The following steps should be executed in order to add the Elastic Agent System integration "Azure Activity Logs" to your system:
70
+ - Go to the Kibana home page and click “Add integrations”.
71
+ - In the query bar, search for “Azure Activity Logs” and select the integration to see more details about it.
72
+ - Click “Add Azure Activity Logs”.
73
+ - Configure the integration.
74
+ - Click “Save and Continue”.
75
+ - For more details on the integration refer to the [helper guide](https://www.elastic.co/docs/reference/integrations/azure/activitylogs).
76
+ """
77
+ references = ["https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html"]
78
+ risk_score = 21
79
+ rule_id = "c17ffbf9-595a-4c0b-a126-aacedb6dd179"
80
+ severity = "low"
81
+ tags = [
82
+ "Domain: Cloud",
83
+ "Data Source: Azure",
84
+ "Data Source: Azure Activity Logs",
85
+ "Rule Type: ML",
86
+ "Rule Type: Machine Learning",
87
+ "Resources: Investigation Guide",
88
+ ]
89
+ type = "machine_learning"
90
+
91
+ [[rule.threat]]
92
+ framework = "MITRE ATT&CK"
93
+
94
+ [rule.threat.tactic]
95
+ id = "TA0007"
96
+ name = "Discovery"
97
+ reference = "https://attack.mitre.org/tactics/TA0007/"
98
+
99
+ [[rule.threat.technique]]
100
+ id = "T1526"
101
+ name = "Cloud Service Discovery"
102
+ reference = "https://attack.mitre.org/techniques/T1526/"
103
+
104
+ [[rule.threat.technique]]
105
+ id = "T1580"
106
+ name = "Cloud Infrastructure Discovery"
107
+ reference = "https://attack.mitre.org/techniques/T1580/"
108
+
109
+ [[rule.threat]]
110
+ framework = "MITRE ATT&CK"
111
+
112
+ [rule.threat.tactic]
113
+ id = "TA0004"
114
+ name = "Privilege Escalation"
115
+ reference = "https://attack.mitre.org/tactics/TA0004/"
116
+
117
+ [[rule.threat]]
118
+ framework = "MITRE ATT&CK"
119
+
120
+ [rule.threat.tactic]
121
+ id = "TA0005"
122
+ name = "Defense Evasion"
123
+ reference = "https://attack.mitre.org/tactics/TA0005/"
124
+
125
+ [[rule.threat]]
126
+ framework = "MITRE ATT&CK"
127
+
128
+ [rule.threat.tactic]
129
+ id = "TA0008"
130
+ name = "Lateral Movement"
131
+ reference = "https://attack.mitre.org/tactics/TA0008/"
132
+
133
+ [[rule.threat]]
134
+ framework = "MITRE ATT&CK"
135
+
136
+ [rule.threat.tactic]
137
+ id = "TA0003"
138
+ name = "Persistence"
139
+ reference = "https://attack.mitre.org/tactics/TA0003/"
140
+
141
+ [[rule.threat]]
142
+ framework = "MITRE ATT&CK"
143
+
144
+ [rule.threat.tactic]
145
+ id = "TA0009"
146
+ name = "Collection"
147
+ reference = "https://attack.mitre.org/tactics/TA0009/"
148
+
@@ -0,0 +1,109 @@
1
+ [metadata]
2
+ creation_date = "2025/10/06"
3
+ integration = ["azure"]
4
+ maturity = "production"
5
+ min_stack_comments = "New job added"
6
+ min_stack_version = "9.3.0"
7
+ updated_date = "2025/12/08"
8
+
9
+ [rule]
10
+ anomaly_threshold = 50
11
+ author = ["Elastic"]
12
+ description = """
13
+ A machine learning job detected Azure Activity Logs activity that, while not inherently suspicious or abnormal, is sourcing from
14
+ a geolocation (city) that is unusual for the event action. This can be the result of compromised credentials or keys being
15
+ used by a threat actor in a different geography than the authorized user(s).
16
+ """
17
+ false_positives = [
18
+ """
19
+ New or unusual event and user geolocation activity can be due to manual troubleshooting or reconfiguration;
20
+ changes in cloud automation scripts or workflows; adoption of new services; expansion into new regions; increased
21
+ adoption of work from home policies; or users who travel frequently.
22
+ """,
23
+ ]
24
+ from = "now-2h"
25
+ interval = "15m"
26
+ license = "Elastic License v2"
27
+ machine_learning_job_id = "azure_activitylogs_rare_event_action_for_a_city"
28
+ name = "Unusual City for an Azure Activity Logs Event"
29
+ note = """## Triage and analysis
30
+
31
+ > **Disclaimer**:
32
+ > This investigation guide was created using generative AI technology and has been reviewed to improve its accuracy and relevance. While every effort has been made to ensure its quality, we recommend validating the content and adapting it to suit your specific environment and operational needs.
33
+
34
+ ### Investigating Unusual City for an Azure Activity Logs Event
35
+
36
+ This rule highlights Azure Activity Logs activity executed from a city atypical for the action, indicating use of valid accounts from a different geography. A common pattern is a threat actor using stolen user or service principal credentials to add privileged role assignments and rapidly spin up compute to stage data exfiltration or mining from overseas. Location–action mismatch surfaces stealthy account abuse before persistence and broader impact.
37
+
38
+ ### Possible investigation steps
39
+
40
+ - Identify the principal behind the operation and validate legitimate presence in the region by contacting the user/owner and reviewing travel or business justification.
41
+ - Enrich the source IP with ASN, hosting/cloud provider, VPN/Tor indicators, reverse DNS, and threat intel to determine whether it originates from anonymizing or compute infrastructure.
42
+ - Correlate Entra ID sign-in logs for the principal around the timestamp to check impossible travel, MFA usage or bypass, device compliance state, and atypical user-agent strings.
43
+ - Review adjacent Azure Resource Manager activity by the same principal for privileged changes such as role assignments, policy updates, access key or secret actions, and rapid compute/network provisioning.
44
+ - Determine whether the actor is a user or service principal, and if a service principal, inspect recent secret/certificate changes, unexpected consent or role grants, and potential credential exposure in CI/CD or repositories.
45
+
46
+ ### False positive analysis
47
+
48
+ - A legitimate admin traveling or connecting via a VPN or newly configured egress/NAT gateway can geolocate to an unexpected city while performing routine Azure Activity Logs actions.
49
+ - Service principal or managed identity automation executing from a different Azure region due to multi-region deployment or failover can egress from a city unusual for the action yet still be authorized.
50
+
51
+ ### Response and remediation
52
+
53
+ - Immediately revoke active sessions and refresh tokens for the implicated user or service principal, disable the account or application, and block the observed source IP/CIDR at Azure Firewall and NSGs to contain activity.
54
+ - Reset the user's password and force MFA re-registration, or for a service principal rotate all client secrets/certificates and remove any recent admin consent grants to eradicate credential reuse.
55
+ - Revert changes executed from the unusual city by removing newly added role assignments, deleting unexpected VMs/VNets or policy updates, and rotating Storage account keys and Key Vault secrets if they were accessed.
56
+ - After containment, verify business justification (travel or new egress) and restore any required resources from ARM/Bicep templates or backups, then re-enable access behind Conditional Access with known egress IPs only.
57
+ - Escalate to Incident Response if the actor performs privileged role grants, Key Vault secret retrieval, Storage key listing, or rapid compute provisioning within the same session, or if sign-in shows impossible travel or missing MFA.
58
+ - Harden by enforcing PIM for Owner/Contributor/User Access Administrator roles, configuring Conditional Access with country allowlists and named egress IP ranges, restricting service principals to certificate-only auth and Private Link on Key Vault/Storage, and enabling continuous geolocation anomaly alerts in Microsoft Sentinel.
59
+ """
60
+ setup = """## Setup
61
+
62
+ This rule requires the installation of associated Machine Learning jobs, as well as data coming in from Azure Activity Logs.
63
+
64
+ ### Anomaly Detection Setup
65
+
66
+ Once the rule is enabled, the associated Machine Learning job will start automatically. You can view the Machine Learning job linked under the "Definition" panel of the detection rule. If the job does not start due to an error, the issue must be resolved for the job to commence successfully. For more details on setting up anomaly detection jobs, refer to the [helper guide](https://www.elastic.co/guide/en/kibana/current/xpack-ml-anomalies.html).
67
+
68
+ ### Azure Activity Logs Integration Setup
69
+ The Azure Activity Logs integration allows you to collect logs and metrics from Azure with Elastic Agent.
70
+
71
+ #### The following steps should be executed in order to add the Elastic Agent System integration "Azure Activity Logs" to your system:
72
+ - Go to the Kibana home page and click “Add integrations”.
73
+ - In the query bar, search for “Azure Activity Logs” and select the integration to see more details about it.
74
+ - Click “Add Azure Activity Logs”.
75
+ - Configure the integration.
76
+ - Click “Save and Continue”.
77
+ - For more details on the integration refer to the [helper guide](https://www.elastic.co/docs/reference/integrations/azure/activitylogs).
78
+ """
79
+ references = ["https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html"]
80
+ risk_score = 21
81
+ rule_id = "ce08cdb8-e6cb-46bb-a7cc-16d17547323f"
82
+ severity = "low"
83
+ tags = [
84
+ "Domain: Cloud",
85
+ "Data Source: Azure",
86
+ "Data Source: Azure Activity Logs",
87
+ "Rule Type: ML",
88
+ "Rule Type: Machine Learning",
89
+ "Resources: Investigation Guide",
90
+ ]
91
+ type = "machine_learning"
92
+
93
+ [[rule.threat]]
94
+ framework = "MITRE ATT&CK"
95
+
96
+ [rule.threat.tactic]
97
+ id = "TA0001"
98
+ name = "Initial Access"
99
+ reference = "https://attack.mitre.org/tactics/TA0001/"
100
+
101
+ [[rule.threat.technique]]
102
+ id = "T1078"
103
+ name = "Valid Accounts"
104
+ reference = "https://attack.mitre.org/techniques/T1078/"
105
+
106
+ [[rule.threat.technique.subtechnique]]
107
+ id = "T1078.004"
108
+ name = "Cloud Accounts"
109
+ reference = "https://attack.mitre.org/techniques/T1078/004/"
@@ -0,0 +1,108 @@
1
+ [metadata]
2
+ creation_date = "2025/10/06"
3
+ integration = ["azure"]
4
+ maturity = "production"
5
+ min_stack_comments = "New job added"
6
+ min_stack_version = "9.3.0"
7
+ updated_date = "2025/12/08"
8
+
9
+ [rule]
10
+ anomaly_threshold = 50
11
+ author = ["Elastic"]
12
+ description = """
13
+ A machine learning job detected Azure Activity Logs activity that, while not inherently suspicious or abnormal, is sourcing from
14
+ a geolocation (country) that is unusual for the event action. This can be the result of compromised credentials or keys being
15
+ used by a threat actor in a different geography than the authorized user(s).
16
+ """
17
+ false_positives = [
18
+ """
19
+ New or unusual event and user geolocation activity can be due to manual troubleshooting or reconfiguration;
20
+ changes in cloud automation scripts or workflows; adoption of new services; expansion into new regions; increased
21
+ adoption of work from home policies; or users who travel frequently.
22
+ """,
23
+ ]
24
+ from = "now-2h"
25
+ interval = "15m"
26
+ license = "Elastic License v2"
27
+ machine_learning_job_id = "azure_activitylogs_rare_event_action_for_a_country"
28
+ name = "Unusual Country for an Azure Activity Logs Event"
29
+ note = """## Triage and analysis
30
+
31
+ > **Disclaimer**:
32
+ > This investigation guide was created using generative AI technology and has been reviewed to improve its accuracy and relevance. While every effort has been made to ensure its quality, we recommend validating the content and adapting it to suit your specific environment and operational needs.
33
+
34
+ ### Investigating Unusual Country for an Azure Activity Logs Event
35
+
36
+ This alert flags management operations originating from a country not normally associated with that activity in your environment, signaling credential or key misuse from remote infrastructure. A common pattern is an attacker authenticating from a new region, then automating creation of a service principal, granting it elevated role assignments, and modifying access policies or spinning up compute to persist, escalate privileges, and stage data exfiltration.
37
+
38
+ ### Possible investigation steps
39
+
40
+ - Enrich the source IP with ASN, hosting provider, and threat intel, distinguishing corporate VPN exit nodes from cloud-hosting or anonymizer infrastructure.
41
+ - Correlate the actor (user, service principal, or managed identity) with Microsoft Entra ID sign-in logs to confirm authentication method, MFA and Conditional Access outcomes, application context, and device compliance.
42
+ - Build a 24–48 hour timeline of the actor’s management operations to spot follow-on actions indicative of persistence or escalation such as app/service principal creation, role assignment changes, Key Vault policy edits, SAS or key issuance, and VM/automation deployment.
43
+ - Validate business legitimacy by checking travel records, change tickets, and approved maintenance windows, and if interactive access, contact the user to verify intent and location.
44
+ - If compromise is suspected, revoke sessions and refresh tokens, rotate secrets and credentials, remove newly added privileges, and enable stricter geo or Conditional Access controls while monitoring for reattempts from the same country.
45
+
46
+ ### False positive analysis
47
+
48
+ - A legitimate user traveling or working remotely connects via mobile, hotel, or corporate VPN egress whose public IP geolocates to a country outside the baseline, triggering the unusual country alert.
49
+ - Routine automation or a service principal executes from Azure compute in a different region due to scaling or failover, making management operations appear to originate from IP ranges mapped to another country.
50
+
51
+ ### Response and remediation
52
+
53
+ - Immediately disable the involved user or service principal, revoke active sessions and refresh tokens, and block the public IP/CIDR at Azure Firewall or NSGs while applying Conditional Access to deny management actions from that country.
54
+ - Remove any newly added role assignments or RBAC changes linked to the actor, delete unauthorized service principals or managed identities, invalidate issued SAS tokens or storage account keys, and rotate affected secrets, app passwords, and credentials.
55
+ - Restore access only after user/business validation, reapply baseline Key Vault access policies and RBAC from infrastructure-as-code, and roll forward patched images or automation to replace any VMs or runbooks created during the incident.
56
+ - Escalate to Security Incident Response if a service principal was created and granted Owner/Contributor or Key Vault Admin, if access policies were modified, if compute/automation was deployed from the unusual country, or if interactive management access succeeded without MFA.
57
+ - Harden by enforcing country-aware Conditional Access for management apps, requiring phishing-resistant MFA for privileged actions, enabling PIM with approval and just-in-time for role changes, restricting SAS with IP/time scopes, and disabling legacy authentication.
58
+ """
59
+ setup = """## Setup
60
+
61
+ This rule requires the installation of associated Machine Learning jobs, as well as data coming in from Azure Activity Logs.
62
+
63
+ ### Anomaly Detection Setup
64
+
65
+ Once the rule is enabled, the associated Machine Learning job will start automatically. You can view the Machine Learning job linked under the "Definition" panel of the detection rule. If the job does not start due to an error, the issue must be resolved for the job to commence successfully. For more details on setting up anomaly detection jobs, refer to the [helper guide](https://www.elastic.co/guide/en/kibana/current/xpack-ml-anomalies.html).
66
+
67
+ ### Azure Activity Logs Integration Setup
68
+ The Azure Activity Logs integration allows you to collect logs and metrics from Azure with Elastic Agent.
69
+
70
+ #### The following steps should be executed in order to add the Elastic Agent System integration "Azure Activity Logs" to your system:
71
+ - Go to the Kibana home page and click “Add integrations”.
72
+ - In the query bar, search for “Azure Activity Logs” and select the integration to see more details about it.
73
+ - Click “Add Azure Activity Logs”.
74
+ - Configure the integration.
75
+ - Click “Save and Continue”.
76
+ - For more details on the integration refer to the [helper guide](https://www.elastic.co/docs/reference/integrations/azure/activitylogs).
77
+ """
78
+ references = ["https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html"]
79
+ risk_score = 21
80
+ rule_id = "76de17b9-af25-49a0-9378-02888b6bb3a2"
81
+ severity = "low"
82
+ tags = [
83
+ "Domain: Cloud",
84
+ "Data Source: Azure",
85
+ "Data Source: Azure Activity Logs",
86
+ "Rule Type: ML",
87
+ "Rule Type: Machine Learning",
88
+ "Resources: Investigation Guide",
89
+ ]
90
+ type = "machine_learning"
91
+
92
+ [[rule.threat]]
93
+ framework = "MITRE ATT&CK"
94
+
95
+ [rule.threat.tactic]
96
+ id = "TA0001"
97
+ name = "Initial Access"
98
+ reference = "https://attack.mitre.org/tactics/TA0001/"
99
+
100
+ [[rule.threat.technique]]
101
+ id = "T1078"
102
+ name = "Valid Accounts"
103
+ reference = "https://attack.mitre.org/techniques/T1078/"
104
+
105
+ [[rule.threat.technique.subtechnique]]
106
+ id = "T1078.004"
107
+ name = "Cloud Accounts"
108
+ reference = "https://attack.mitre.org/techniques/T1078/004/"
@@ -0,0 +1,147 @@
1
+ [metadata]
2
+ creation_date = "2025/10/06"
3
+ integration = ["azure"]
4
+ maturity = "production"
5
+ min_stack_comments = "New job added"
6
+ min_stack_version = "9.3.0"
7
+ updated_date = "2025/12/08"
8
+
9
+ [rule]
10
+ anomaly_threshold = 75
11
+ author = ["Elastic"]
12
+ description = """
13
+ A machine learning job detected Azure Activity Logs activity that, while not inherently suspicious or abnormal, is sourcing from
14
+ user context that does not normally use the event action. This can be the result of compromised credentials or keys as
15
+ someone uses a valid account to persist, move laterally, or exfiltrate data.
16
+ """
17
+ false_positives = [
18
+ """
19
+ New or unusual user event activity can be due to manual troubleshooting or reconfiguration; changes in cloud
20
+ automation scripts or workflows; adoption of new services; or changes in the way services are used.
21
+ """,
22
+ ]
23
+ from = "now-2h"
24
+ interval = "15m"
25
+ license = "Elastic License v2"
26
+ machine_learning_job_id = "azure_activitylogs_rare_event_action_for_a_username"
27
+ name = "Unusual Azure Activity Logs Event for a User"
28
+ note = """## Triage and analysis
29
+
30
+ > **Disclaimer**:
31
+ > This investigation guide was created using generative AI technology and has been reviewed to improve its accuracy and relevance. While every effort has been made to ensure its quality, we recommend validating the content and adapting it to suit your specific environment and operational needs.
32
+
33
+ ### Investigating Unusual Azure Activity Logs Event for a User
34
+
35
+ This rule flags an Azure Activity Logs event when a user performs an action they don’t normally execute, highlighting potential misuse of valid credentials. It matters because attackers often blend in by operating under legitimate identities to persist, escalate, move laterally, or exfiltrate without tripping simple allowlists. A common pattern is a compromised account creating a new role assignment to grant itself elevated rights, then using that access to enumerate resources and pull data from storage.
36
+
37
+ ### Possible investigation steps
38
+
39
+ - Reconstruct the timeline by pivoting on the user and ±60 minutes to collect all related Azure Activity Log entries (including those sharing the same correlation ID) and map any subsequent privilege changes, resource modifications, or data access.
40
+ - Validate identity context by reviewing Entra ID sign-in logs for IP/ASN, geolocation, device compliance, MFA outcome, authentication protocol, and client app to spot first-time usage or impossible travel.
41
+ - Determine whether the caller is a human account, service principal, or managed identity and confirm legitimate need by checking current and recently changed role assignments and group memberships within the affected scope.
42
+ - Correlate the activity with approved change records and CI/CD runs (e.g., Azure DevOps, GitHub Actions, Terraform) by matching service principal/user agent and verify the pipeline or requestor was authorized and correctly scoped.
43
+
44
+ ### False positive analysis
45
+
46
+ - The user temporarily covered an admin role and performed uncommon RBAC changes or resource provider registrations that are legitimate but deviate from their historical baseline.
47
+ - A scheduled maintenance or setup task ran under the user’s credentials and invoked management APIs they rarely call, generating Azure Activity Logs that appear unusual for this identity.
48
+
49
+ ### Response and remediation
50
+
51
+ - Immediately revoke the user’s refresh tokens and active sessions, force a password reset, and apply a temporary Conditional Access policy to block the source IPs and device observed during the unusual operation.
52
+ - Remove any RBAC role assignments or resource policy changes created by this identity during the event window (including Owner/Contributor grants on subscriptions or resource groups) and require approvals through Privileged Identity Management before restoring access.
53
+ - If a service principal or managed identity executed the action, rotate its client secret/certificate, invalidate issued SAS tokens and storage account keys, and delete any unauthorized app registrations or automation accounts created.
54
+ - Restore affected configurations to baseline by reapplying IaC templates and verifying Key Vault access policies, storage account firewalls, and NSG rules match approved standards before re-enabling routine operations.
55
+ - Escalate to incident response and notify cloud security leadership if the unusual action involved new role assignments granting elevated rights, access to Key Vault secrets, listing storage account keys, disabling logs, or activity across multiple subscriptions.
56
+ - Implement hardening by enforcing MFA with phishing-resistant methods, enabling risk-based Conditional Access, requiring just-in-time elevation via PIM, restricting management-plane access to approved network locations, and adding alerts for role assignment writes, secret reads, and key listings.
57
+ """
58
+ setup = """## Setup
59
+
60
+ This rule requires the installation of associated Machine Learning jobs, as well as data coming in from Azure Activity Logs.
61
+
62
+ ### Anomaly Detection Setup
63
+
64
+ Once the rule is enabled, the associated Machine Learning job will start automatically. You can view the Machine Learning job linked under the "Definition" panel of the detection rule. If the job does not start due to an error, the issue must be resolved for the job to commence successfully. For more details on setting up anomaly detection jobs, refer to the [helper guide](https://www.elastic.co/guide/en/kibana/current/xpack-ml-anomalies.html).
65
+
66
+ ### Azure Activity Logs Integration Setup
67
+ The Azure Activity Logs integration allows you to collect logs and metrics from Azure with Elastic Agent.
68
+
69
+ #### The following steps should be executed in order to add the Elastic Agent System integration "Azure Activity Logs" to your system:
70
+ - Go to the Kibana home page and click “Add integrations”.
71
+ - In the query bar, search for “Azure Activity Logs” and select the integration to see more details about it.
72
+ - Click “Add Azure Activity Logs”.
73
+ - Configure the integration.
74
+ - Click “Save and Continue”.
75
+ - For more details on the integration refer to the [helper guide](https://www.elastic.co/docs/reference/integrations/azure/activitylogs).
76
+ """
77
+ references = ["https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html"]
78
+ risk_score = 21
79
+ rule_id = "81892f44-4946-4b27-95d3-1d8929b114a7"
80
+ severity = "low"
81
+ tags = [
82
+ "Domain: Cloud",
83
+ "Data Source: Azure",
84
+ "Data Source: Azure Activity Logs",
85
+ "Rule Type: ML",
86
+ "Rule Type: Machine Learning",
87
+ "Resources: Investigation Guide",
88
+ ]
89
+ type = "machine_learning"
90
+
91
+ [[rule.threat]]
92
+ framework = "MITRE ATT&CK"
93
+
94
+ [rule.threat.tactic]
95
+ id = "TA0001"
96
+ name = "Initial Access"
97
+ reference = "https://attack.mitre.org/tactics/TA0001/"
98
+
99
+ [[rule.threat.technique]]
100
+ id = "T1078"
101
+ name = "Valid Accounts"
102
+ reference = "https://attack.mitre.org/techniques/T1078/"
103
+
104
+ [[rule.threat.technique.subtechnique]]
105
+ id = "T1078.004"
106
+ name = "Cloud Accounts"
107
+ reference = "https://attack.mitre.org/techniques/T1078/004/"
108
+
109
+ [[rule.threat]]
110
+ framework = "MITRE ATT&CK"
111
+
112
+ [rule.threat.tactic]
113
+ id = "TA0008"
114
+ name = "Lateral Movement"
115
+ reference = "https://attack.mitre.org/tactics/TA0008/"
116
+
117
+ [[rule.threat.technique]]
118
+ id = "T1021"
119
+ name = "Remote Services"
120
+ reference = "https://attack.mitre.org/techniques/T1021/"
121
+
122
+ [[rule.threat.technique.subtechnique]]
123
+ id = "T1021.007"
124
+ name = "Cloud Services"
125
+ reference = "https://attack.mitre.org/techniques/T1021/007/"
126
+
127
+ [[rule.threat]]
128
+ framework = "MITRE ATT&CK"
129
+
130
+ [rule.threat.tactic]
131
+ id = "TA0003"
132
+ name = "Persistence"
133
+ reference = "https://attack.mitre.org/tactics/TA0003/"
134
+
135
+ [[rule.threat]]
136
+ framework = "MITRE ATT&CK"
137
+
138
+ [rule.threat.tactic]
139
+ id = "TA0010"
140
+ name = "Exfiltration"
141
+ reference = "https://attack.mitre.org/tactics/TA0010/"
142
+
143
+ [[rule.threat.technique]]
144
+ id = "T1041"
145
+ name = "Exfiltration Over C2 Channel"
146
+ reference = "https://attack.mitre.org/techniques/T1041/"
147
+