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
@@ -2,16 +2,21 @@
2
2
  creation_date = "2024/06/29"
3
3
  integration = ["aws"]
4
4
  maturity = "production"
5
- updated_date = "2025/01/10"
5
+ updated_date = "2025/11/24"
6
6
 
7
7
  [rule]
8
8
  author = ["Elastic"]
9
9
  description = """
10
- Identifies the creation or modification of an AWS RDS DB instance to enable public access. DB instances may contain sensitive data that can be abused if shared with unauthorized accounts or made public. Adversaries may enable public access on a DB instance to maintain persistence or evade defenses by bypassing access controls.
10
+ Identifies the creation or modification of an Amazon RDS DB instance or cluster where the "publiclyAccessible" attribute
11
+ is set to "true". Publicly accessible RDS instances expose a network endpoint on the public internet, which may allow
12
+ unauthorized access if combined with overly permissive security groups, weak authentication, or misconfigured IAM
13
+ policies. Adversaries may enable public access on an existing instance, or create a new publicly accessible instance, to
14
+ establish persistence, move data outside of controlled network boundaries, or bypass internal access controls.
11
15
  """
12
16
  false_positives = [
13
17
  """
14
- Public access is a common configuration used to enable access from outside a private VPC. Ensure that the instance should not be modified in this way before taking action.
18
+ Public access is a common configuration used to enable access from outside a private VPC. Ensure that the instance
19
+ should not be modified in this way before taking action.
15
20
  """,
16
21
  ]
17
22
  from = "now-6m"
@@ -19,39 +24,93 @@ index = ["filebeat-*", "logs-aws.cloudtrail-*"]
19
24
  language = "eql"
20
25
  license = "Elastic License v2"
21
26
  name = "AWS RDS DB Instance Made Public"
22
- note = """
23
- ## Triage and analysis
27
+ note = """## Triage and analysis
28
+
29
+ > **Disclaimer**:
30
+ > This investigation guide was created using generative AI technology and has been reviewed to improve its accuracy and relevance.
31
+ > While every effort has been made to ensure its quality, validate and adapt it to suit your operational needs.
24
32
 
25
33
  ### Investigating AWS RDS DB Instance Made Public
26
34
 
27
- This rule identifies when an RDS DB instance is created or modified to enable public access. While publicly accessible DB instances are a common practice, adversaries may exploit this feature to maintain persistence or evade defenses in a compromised environment.
35
+ This rule detects when an Amazon RDS DB instance or cluster is created or modified with
36
+ `publiclyAccessible=true`. While some environments operate publicly accessible RDS instances,
37
+ unexpected exposure of a database to the internet is a meaningful security risk. Adversaries who
38
+ gain access to AWS credentials may modify a DB instance’s public accessibility to exfiltrate data,
39
+ establish persistence, or bypass internal network restrictions.
28
40
 
29
41
  #### Possible Investigation Steps
30
42
 
31
- - **Identify the Actor**: Review the `aws.cloudtrail.user_identity.arn` and `aws.cloudtrail.user_identity.access_key_id` fields to identify who made the change. Verify if this actor typically performs such actions and if they have the necessary permissions.
32
- - **Review the Creation/Modification Event**: Identify the DB instance involved and review the event details. Look for `ModifyDBInstance`, `CreateDBInstance` or `CreateDBCluster` actions where the publiclyAccessible parameter was set to true.
33
- - **Request and Response Parameters**: Check the `aws.cloudtrail.request_parameters` field in the CloudTrail event to identify the DB Instance Identifier and any other modifications made to the instance.
34
- - **Verify the Created/Modified Instance**: Check the DB instance that was created or modified and its contents to determine the sensitivity of the data stored within it.
35
- - **Contextualize with Recent Changes**: Compare this event against recent changes in RDS DB or Cluster configurations and deployments. Look for any other recent permissions changes or unusual administrative actions.
36
- - **Correlate with Other Activities**: Search for related CloudTrail events before and after this event to see if the same actor or IP address engaged in other potentially suspicious activities.
37
- - **Interview Relevant Personnel**: If the modification was initiated by a user, verify the intent and authorization for this action with the person or team responsible for managing DB instances.
43
+ - **Identify the actor**
44
+ - Review `aws.cloudtrail.user_identity.arn`, `aws.cloudtrail.user_identity.type`, and `access_key_id` to determine which IAM principal made the change.
45
+ - Determine whether the user, role, or automation service typically manages RDS configurations.
46
+
47
+ - **Examine the request parameters**
48
+ - Review `aws.cloudtrail.request_parameters` for:
49
+ - `publiclyAccessible=true`
50
+ - DBInstanceIdentifier / DBClusterIdentifier
51
+ - Additional changes included in the same modification request (e.g., master user changes, security group updates)
52
+
53
+ - **Validate the target resource**
54
+ - Determine the sensitivity of the instance (`target.entity.id`):
55
+ - What data does it store?
56
+ - Is it production, staging, dev, or ephemeral?
57
+ - Confirm whether the instance was previously private.
58
+
59
+ - **Assess network exposure**
60
+ - Check associated security groups for:
61
+ - `0.0.0.0/0` (unrestricted ingress)
62
+ - Unexpected IP ranges
63
+ - Review VPC/subnet placement to determine if the instance is reachable externally.
64
+
65
+ - **Correlate with other recent CloudTrail activity**
66
+ - Look for related events performed by the same actor:
67
+ - `AuthorizeSecurityGroupIngress`
68
+ - `ModifyDBInstance`
69
+ - IAM policy modifications enabling broader DB access
70
+ - Look for indicators of credential misuse:
71
+ - unusual `source.ip`
72
+ - unusual `user_agent.original`
73
+ - MFA not used (`session_context.mfa_authenticated=false`)
74
+
75
+ - **Validate intent with owners**
76
+ - Contact the service or database owner to confirm whether the change was an approved part of a deployment or migration.
77
+
38
78
  ### False Positive Analysis
39
79
 
40
- - **Legitimate Instance Configuration**: Confirm if the DB instance creation or modification aligns with legitimate tasks.
41
- - **Consistency Check**: Compare the action against historical data of similar actions performed by the user or within the organization. If the action is consistent with past legitimate activities, it might indicate a false alarm.
80
+ - **Expected public-access configuration**
81
+ - Some workloads intentionally require public access (e.g., internet-facing reporting tools).
82
+ - Validate against change management tickets, deployment pipelines, or Terraform/IaC automation logs.
42
83
 
43
84
  ### Response and Remediation
44
85
 
45
- - **Immediate Review and Reversal**: If the change was unauthorized, update the instance attributes to remove public access and restore it to its previous state. Determine whether attached security groups have been modified to allow additional access and revert any unauthorized changes.
46
- - **Enhance Monitoring and Alerts**: Adjust monitoring systems to alert on similar actions, especially those involving sensitive data or permissions.
47
- - **Audit Instances and Policies**: Conduct a comprehensive audit of all instances and associated policies to ensure they adhere to the principle of least privilege.
48
- - **Policy Update**: Review and possibly update your organization’s policies on DB instance access to tighten control and prevent unauthorized access.
49
- - **Incident Response**: If malicious intent is confirmed, consider it a data breach incident and initiate the incident response protocol. This includes further investigation, containment, and recovery.
86
+ - **Containment**
87
+ - If exposure is unauthorized:
88
+ - Modify the instance to disable public access (`publiclyAccessible=false`).
89
+ - Restrict the security group inbound rules immediately.
90
+ - Snapshot the instance to preserve state if compromise is suspected.
91
+
92
+ - **Investigation**
93
+ - Review all recent actions from the same IAM principal.
94
+ - Check for data access patterns (CloudWatch, RDS Enhanced Monitoring, VPC Flow Logs).
95
+ - Identify whether this exposure correlates with suspicious outbound network activity.
96
+
97
+ - **Hardening**
98
+ - Require private-only RDS instances unless explicitly documented.
99
+ - Enforce security group least privilege and block public DB access via:
100
+ - AWS Config rules (`rds-instance-public-access-check`)
101
+ - Service Control Policies (SCPs) preventing public RDS settings
102
+ - Implement continuous monitoring for network or configuration drift.
103
+
104
+ - **Recovery**
105
+ - Restore the database to a private subnet if necessary.
106
+ - Rotate credentials used by the DB instance and associated applications.
107
+ - Document the incident and update policies or IaC templates to prevent recurrence.
50
108
 
51
109
  ### Additional Information:
52
110
 
53
- For further guidance on managing DB instances and securing AWS environments, refer to the [AWS RDS documentation](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_RDS_Managing.html) and AWS best practices for security. Additionally, consult the following resources for specific details on DB instance security:
54
- - [AWS RDS ModifyDBInstance](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_ModifyDBInstance.html)
111
+ - **[AWS IR Playbooks](https://github.com/aws-samples/aws-incident-response-playbooks/blob/c151b0dc091755fffd4d662a8f29e2f6794da52c/playbooks/)**
112
+ - **[AWS Customer Playbook Framework](https://github.com/aws-samples/aws-customer-playbook-framework/tree/a8c7b313636b406a375952ac00b2d68e89a991f2/docs)**
113
+ - **Security Best Practices:** [AWS Knowledge Center – Security Best Practices](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/).
55
114
  """
56
115
  references = [
57
116
  "https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_ModifyDBInstance.html",
@@ -86,6 +145,7 @@ any where event.dataset == "aws.cloudtrail"
86
145
  )
87
146
  '''
88
147
 
148
+
89
149
  [[rule.threat]]
90
150
  framework = "MITRE ATT&CK"
91
151
  [[rule.threat.technique]]
@@ -97,6 +157,8 @@ id = "T1556.009"
97
157
  name = "Conditional Access Policies"
98
158
  reference = "https://attack.mitre.org/techniques/T1556/009/"
99
159
 
160
+
161
+
100
162
  [rule.threat.tactic]
101
163
  id = "TA0003"
102
164
  name = "Persistence"
@@ -108,3 +170,22 @@ framework = "MITRE ATT&CK"
108
170
  id = "TA0005"
109
171
  name = "Defense Evasion"
110
172
  reference = "https://attack.mitre.org/tactics/TA0005/"
173
+
174
+ [rule.investigation_fields]
175
+ field_names = [
176
+ "@timestamp",
177
+ "user.name",
178
+ "user_agent.original",
179
+ "source.ip",
180
+ "aws.cloudtrail.user_identity.arn",
181
+ "aws.cloudtrail.user_identity.type",
182
+ "aws.cloudtrail.user_identity.access_key_id",
183
+ "target.entity.id",
184
+ "event.action",
185
+ "event.outcome",
186
+ "cloud.account.id",
187
+ "cloud.region",
188
+ "aws.cloudtrail.request_parameters",
189
+ "aws.cloudtrail.response_elements",
190
+ ]
191
+
@@ -2,7 +2,7 @@
2
2
  creation_date = "2022/04/12"
3
3
  integration = ["aws"]
4
4
  maturity = "production"
5
- updated_date = "2025/01/15"
5
+ updated_date = "2025/11/25"
6
6
 
7
7
  [rule]
8
8
  author = ["Elastic"]
@@ -23,13 +23,13 @@ index = ["filebeat-*", "logs-aws.cloudtrail-*"]
23
23
  interval = "10m"
24
24
  language = "kuery"
25
25
  license = "Elastic License v2"
26
- name = "AWS Redshift Cluster Creation"
26
+ name = "Deprecated - AWS Redshift Cluster Creation"
27
27
  note = """## Triage and analysis
28
28
 
29
29
  > **Disclaimer**:
30
30
  > 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.
31
31
 
32
- ### Investigating AWS Redshift Cluster Creation
32
+ ### Investigating Deprecated - AWS Redshift Cluster Creation
33
33
 
34
34
  Amazon Redshift is a data warehousing service that allows for scalable data storage and analysis. In a secure environment, only authorized users should create Redshift clusters. Adversaries might exploit misconfigured permissions to create clusters, potentially leading to data exfiltration or unauthorized data processing. The detection rule monitors for successful cluster creation events, especially by non-admin users, to identify potential misuse or misconfigurations.
35
35
 
@@ -2,24 +2,23 @@
2
2
  creation_date = "2024/11/24"
3
3
  integration = ["aws"]
4
4
  maturity = "production"
5
- updated_date = "2025/01/10"
5
+ updated_date = "2025/12/02"
6
6
 
7
7
  [rule]
8
8
  author = ["Elastic"]
9
9
  description = """
10
- Identifies when the STS `AssumeRoot` action is performed by a rare user in AWS. The AssumeRoot action allows users to
10
+ Identifies when the STS AssumeRoot action is performed by a rare user in AWS. The AssumeRoot action allows users to
11
11
  assume the root member account role, granting elevated but specific permissions based on the task policy specified.
12
- Adversaries whom may have compromised user credentials, such as access and secret keys, can use this technique to
13
- escalate privileges and gain unauthorized access to AWS resources. This is a [New
14
- Terms](https://www.elastic.co/guide/en/security/current/rules-ui-create.html#create-new-terms-rule) rule that identifies
15
- when the STS `AssumeRoot` action is performed by a user that rarely assumes this role and specific member account.
12
+ Adversaries who have compromised user credentials can use this technique to
13
+ escalate privileges and gain unauthorized access to AWS resources. This is a New Terms rule that identifies
14
+ when the STS AssumeRoot action is performed by a user that rarely assumes this role against a specific member account.
16
15
  """
17
16
  false_positives = [
18
17
  "AWS administrators or automated processes might regularly assume root for legitimate administrative purposes.",
19
18
  "AWS services might assume root to access AWS resources as part of their standard operations.",
20
19
  "Automated workflows might assume root to perform periodic administrative tasks.",
21
20
  ]
22
- from = "now-9m"
21
+ from = "now-6m"
23
22
  index = ["filebeat-*", "logs-aws.cloudtrail-*"]
24
23
  language = "kuery"
25
24
  license = "Elastic License v2"
@@ -27,66 +26,123 @@ name = "AWS STS AssumeRoot by Rare User and Member Account"
27
26
  note = """
28
27
  ## Triage and analysis
29
28
 
30
- ### Investigating AWS STS AssumeRoot by Rare User and Member Account
31
-
32
- This rule identifies instances where AWS STS (Security Token Service) is used to assume a root role, granting temporary credentials for AWS resource access. While this action is often legitimate, it can be exploited by adversaries to obtain unauthorized access, escalate privileges, or move laterally within an AWS environment.
33
-
34
- #### Possible Investigation Steps
35
-
36
- - **Identify the Actor and Assumed Role**:
37
- - **User Identity**: Review the `aws.cloudtrail.user_identity.arn` and `aws.cloudtrail.user_identity.type` fields to determine who initiated the `AssumeRoot` action.
38
- - **Account Context**: Check the `aws.cloudtrail.recipient_account_id` field for the account affected by the action. This is likely the management account.
39
- - **Authentication**: If available, review the `aws.cloudtrail.user_identity.access_key_id` to identify the access key used for the action. This key may be compromised in the case of unauthorized activity.
40
- - **Resources**: Inspect `aws.cloudtrail.resources.type` and `aws.cloudtrail.resources.arn` to determine the resource or role assumed. This is the member account where the root role was assumed.
41
-
42
- - **Analyze Request Parameters**:
43
- - **Session Details**: Check `aws.cloudtrail.flattened.request_parameters.durationSeconds` for session duration.
44
- - **Permissions**: Review `aws.cloudtrail.flattened.request_parameters.taskPolicyArn` for the associated policy. These policies are predefined and grant specific permissions to the assumed root account.
45
- - **Target Entity**: Inspect the `aws.cloudtrail.flattened.request_parameters.targetPrincipal` field for the entity being accessed. This is typically the member account.
46
- - **Target Policy**: Inspect the `aws.cloudtrail.flattened.request_parameters.targetPolicyArn` field for the policy applied to temporary root credentials. This can help determine the scope of the permissions granted.
47
-
48
- - **Examine Response Details**:
49
- - **Credentials Issued**: Review `aws.cloudtrail.flattened.response_elements.credentials` to confirm credentials were issued and note their expiration (`expiration` field). The temporary access key can be used to pivot into other actions done by the assumed root account by searching for the value in `aws.cloudtrail.user_identity.access_key_id`.
50
-
51
- - **Inspect Source Details**:
52
- - **Source IP and Location**: Evaluate `source.address` and `source.geo` fields to confirm the request's origin. Unusual locations might indicate unauthorized activity.
53
- - **User Agent**: Analyze `user_agent.original` to determine the tool or application used (e.g., AWS CLI, SDK, or custom tooling).
54
-
55
- - **Correlate with Related Events**:
56
- - **Concurrent Events**: Look for surrounding CloudTrail events that indicate follow-up actions, such as access to sensitive resources or privilege escalation attempts.
57
- - **Historical Activity**: Review historical activity for the `aws.cloudtrail.user_identity.arn` to determine if this action is anomalous.
29
+ > **Disclaimer**:
30
+ > This investigation guide was created using generative AI technology and has been reviewed to improve its accuracy and relevance.
31
+ > While every effort has been made to ensure its quality, validate and adapt it to suit your operational needs.
58
32
 
59
- - **Evaluate Privilege Escalation Risk**:
60
- - **Role Privileges**: Inspect the privileges granted by the assumed role or task policy (`aws.cloudtrail.flattened.request_parameters.taskPolicyArn`).
61
- - **Operational Context**: Confirm whether the action aligns with routine operations or is unusual.
62
-
63
- ### False Positive Analysis
64
-
65
- - **Authorized Administrative Activity**:
66
- - Verify if the activity was initiated by an AWS administrator for legitimate purposes.
67
- - **Automated Workflows**:
68
- - Identify if the action was part of an automated process or workflow.
69
-
70
- ### Response and Remediation
71
-
72
- 1. **Revoke Unauthorized Credentials**:
73
- - If malicious activity is identified, immediately revoke the session tokens and access keys associated with the `AssumeRoot` action.
74
- - It may be worth removing the compromised access key from the affected user or service account.
75
- 2. **Enhance Monitoring**:
76
- - Increase the monitoring frequency for sensitive roles and actions, especially `AssumeRoot`.
77
- 3. **Review IAM Policies**:
78
- - Limit permissions for accounts or roles to assume root and enforce multi-factor authentication (MFA) where applicable.
79
- 4. **Contain and Investigate**:
80
- - Isolate affected accounts or roles and follow incident response procedures to determine the scope and impact of the activity.
81
-
82
- ### Additional Information
33
+ ### Investigating AWS STS AssumeRoot by Rare User and Member Account
83
34
 
84
- For more information on AssumeRoot, refer to the [AWS STS documentation](https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRoot.html).
35
+ AWS STS `AssumeRoot` issues temporary credentials that grant elevated access into a member account, constrained by the
36
+ task policy and target policy attached to the request. In normal operations, only a small set of platform, security, or
37
+ automation roles should ever need to perform `AssumeRoot`, and typically only against a predictable set of member
38
+ accounts.
39
+
40
+ This rule is a New Terms rule that detects when a previously unseen combination of calling principal (`aws.cloudtrail.user_identity.arn`) and target member account (`aws.cloudtrail.resources.account_id`) successfully invokes `AssumeRoot`. Activity that matches this pattern may indicate privilege escalation, lateral movement into a new account, abuse of cross-account access paths, or misuse of administrative workflows.
41
+
42
+ #### Possible investigation steps
43
+
44
+ - **Identify the actor and target context**
45
+ - Review `aws.cloudtrail.user_identity.arn` and `aws.cloudtrail.user_identity.access_key_id` to determine:
46
+ - Whether the caller is an IAM user, federated user, or role.
47
+ - Whether this identity is normally used for organization-level administration or automation.
48
+ - Inspect `aws.cloudtrail.resources.account_id` and `aws.cloudtrail.recipient_account_id` to identify the affected member account.
49
+ - Check `source.address`, `source.geo.*`, and `user_agent.original` to understand where and how the call was made (console, CLI, SDK, automation runner, VPN, corporate IP, etc.).
50
+
51
+ - **Understand session, policy, and target details**
52
+ - Examine `aws.cloudtrail.request_parameters` for:
53
+ - `taskPolicyArn` – which predefined task policy was requested and what category of operations it enables (e.g., investigation, remediation, read-only, or broad admin).
54
+ - `targetPrincipal` and/or related target fields – which member account principal is being accessed.
55
+ - Any duration or configuration parameters (such as `durationSeconds`) that indicate unusually long-lived sessions.
56
+ - In `aws.cloudtrail.response_elements`, review:
57
+ - `credentials.accessKeyId` and `credentials.expiration` to confirm that credentials were successfully issued and how long they are valid.
58
+ - Any additional response fields that indicate session constraints or failures (if present).
59
+
60
+ - **Correlate follow-on activity from the assumed root session**
61
+ - Use the temporary access key from `aws.cloudtrail.response_elements.credentials.accessKeyId` to pivot in CloudTrail:
62
+ - Search for subsequent events where `aws.cloudtrail.user_identity.access_key_id` matches that key.
63
+ - Look for high-impact actions such as:
64
+ - IAM changes (`iam:CreateUser`, `iam:AttachRolePolicy`, `iam:PutRolePolicy`, `iam:UpdateAssumeRolePolicy`).
65
+ - Guardrail changes (CloudTrail, Security Hub, Config, GuardDuty configuration or detector changes).
66
+ - Data-impacting actions (S3 bucket policy changes, RDS/RDS snapshot operations, EFS/RDS delete, secrets reads).
67
+ - Correlate with any prior events for the calling identity:
68
+ - STS calls that created the session used to invoke `AssumeRoot` (e.g., `AssumeRole`, SSO/identity provider activity).
69
+ - Recent IAM policy updates that broadened its ability to perform cross-account administration.
70
+
71
+ - **Assess timing and operational alignment**
72
+ - Use `@timestamp`, `cloud.region`, and your change calendar to determine:
73
+ - Whether the event occurred during a documented maintenance window or deployment.
74
+ - Whether the region and account align with the caller’s normal operational scope.
75
+ - Compare with other events in the same time window:
76
+ - Organization-level changes, new account creation, or migration work.
77
+ - Other sensitive operations from the same `source.ip` or principal.
78
+
79
+ - **Validate with owners**
80
+ - Confirm with:
81
+ - Cloud/infra platform teams that normally operate organization-level admin roles.
82
+ - Security/IR teams if they were running an investigation workflow that legitimately uses `AssumeRoot`.
83
+ - Check whether the use of `AssumeRoot` is documented in CI/CD or automation designs that might have just expanded to this account, explaining the New Terms trigger.
84
+
85
+ ### False positive analysis
86
+
87
+ - **Legitimate administrative cross-account access**
88
+ - Platform, security, or central operations teams may use `AssumeRoot` as part of sanctioned workflows for:
89
+ - New account onboarding.
90
+ - Centralized remediation or investigation.
91
+ - Complex deployment or migration tasks.
92
+ - If this is the first time a specific engineer or automation role is onboarded to a given member account, the rule will fire once because it is a New Terms rule. Validate and, if appropriate, document this as expected behavior.
93
+
94
+ - **Automation and scheduled workflows**
95
+ - CI/CD pipelines, organization-wide maintenance jobs, or incident response automation may use `AssumeRoot`:
96
+ - Identify automation roles and service principals that legitimately call `AssumeRoot`.
97
+ - Tune with rule exceptions based on `aws.cloudtrail.user_identity.arn`, `user_agent.original`, or specific `taskPolicyArn` values used only by trusted workflows.
98
+
99
+ If a pattern emerges where specific roles regularly and legitimately assume root into a consistent set of accounts, consider documenting those identities and, if appropriate, creating narrow exceptions — while preserving coverage for new, unexpected combinations.
100
+
101
+ ### Response and remediation
102
+
103
+ - **Contain potentially unauthorized sessions**
104
+ - If the activity appears suspicious or unapproved:
105
+ - Invalidate the credentials issued by `AssumeRoot` (where supported) or constrain their impact by immediately tightening IAM, SCPs, or network controls in the affected member account.
106
+ - Rotate or revoke long-lived access keys associated with the calling principal.
107
+ - Temporarily restrict permissions on roles allowed to call `AssumeRoot` until the investigation is complete.
108
+
109
+ - **Investigate scope and impact**
110
+ - Using CloudTrail:
111
+ - Enumerate all actions performed with the `AssumeRoot` session access key and identify:
112
+ - Privilege changes (IAM users, roles, policies, permission boundaries, SCPs).
113
+ - Changes to logging and security controls (CloudTrail, GuardDuty, Security Hub, Config, firewall/WAF rules).
114
+ - Data-impacting operations on high-value services (S3, RDS, DynamoDB, Secrets Manager, KMS).
115
+ - Check if similar `AssumeRoot` activity has occurred recently from the same `source.ip`, principal, or member account.
116
+ - Engage application, data, and platform owners for the impacted account(s) to:
117
+ - Assess potential data exposure, integrity issues, or downtime.
118
+ - Determine whether any actions conflict with intended change plans.
119
+
120
+ - **Hardening and preventive controls**
121
+ - Restrict and monitor `AssumeRoot` usage:
122
+ - Limit which IAM roles and identities can call `sts:AssumeRoot`, using IAM conditions (e.g., `aws:PrincipalArn`, `aws:PrincipalOrgID`, `aws:RequestedRegion`).
123
+ - Where possible, require strong authentication on the initiating principal (MFA, federated SSO, device posture).
124
+ - Add guardrails and observability:
125
+ - Use AWS Config, Security Hub, and/or AWS Organizations SCPs to:
126
+ - Detect or constrain highly privileged cross-account actions.
127
+ - Ensure logging and monitoring services cannot be disabled or modified by assumed sessions without additional friction.
128
+ - Ensure `AssumeRoot` activity is included in your SIEM dashboards and investigation playbooks.
129
+
130
+ - **Post-incident improvements**
131
+ - If activity is confirmed malicious or unsafe:
132
+ - Rotate credentials for all involved principals and review recent STS session usage for anomalies.
133
+ - Update internal runbooks to clearly define when `AssumeRoot` is allowed, who can perform it, and how it should be documented.
134
+ - Refine this rule’s exceptions or tagging strategy so that legitimate, recurring workflows are well-understood, while preserving high-fidelity visibility into new or unexpected `AssumeRoot` behavior.
135
+
136
+ ### Additional information
137
+
138
+ - **[AWS IR Playbooks](https://github.com/aws-samples/aws-incident-response-playbooks/blob/c151b0dc091755fffd4d662a8f29e2f6794da52c/playbooks/)**
139
+ - **[AWS Customer Playbook Framework](https://github.com/aws-samples/aws-customer-playbook-framework/tree/a8c7b313636b406a375952ac00b2d68e89a991f2/docs)**
140
+ - **Security Best Practices:** [AWS Knowledge Center – Security Best Practices](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/).
85
141
  """
86
142
  references = ["https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRoot.html"]
87
- risk_score = 21
143
+ risk_score = 47
88
144
  rule_id = "962a71ae-aac9-11ef-9348-f661ea17fbce"
89
- severity = "low"
145
+ severity = "medium"
90
146
  tags = [
91
147
  "Domain: Cloud",
92
148
  "Data Source: AWS",
@@ -145,19 +201,20 @@ reference = "https://attack.mitre.org/tactics/TA0003/"
145
201
  [rule.investigation_fields]
146
202
  field_names = [
147
203
  "@timestamp",
148
- "aws.cloudtrail.user_identity.type",
204
+ "user.name",
205
+ "user_agent.original",
206
+ "source.ip",
149
207
  "aws.cloudtrail.user_identity.arn",
208
+ "aws.cloudtrail.user_identity.type",
150
209
  "aws.cloudtrail.user_identity.access_key_id",
151
- "source.address",
152
210
  "aws.cloudtrail.resources.account_id",
153
- "aws.cloudtrail.recipient_account_id",
154
- "aws.cloudtrail.flattened.request_parameters",
211
+ "aws.cloudtrail.resources.type",
155
212
  "event.action",
156
213
  "event.outcome",
157
- "aws.cloudtrail.flattened.request_parameters.taskPolicyArn",
214
+ "cloud.account.id",
158
215
  "cloud.region",
159
216
  "aws.cloudtrail.request_parameters",
160
- "aws.cloudtrail.response_elements",
217
+ "aws.cloudtrail.response_elements"
161
218
  ]
162
219
 
163
220
  [rule.new_terms]
@@ -165,6 +222,6 @@ field = "new_terms_fields"
165
222
  value = ["aws.cloudtrail.user_identity.arn", "aws.cloudtrail.resources.account_id"]
166
223
  [[rule.new_terms.history_window_start]]
167
224
  field = "history_window_start"
168
- value = "now-10d"
225
+ value = "now-7d"
169
226
 
170
227
 
@@ -0,0 +1,134 @@
1
+ [metadata]
2
+ creation_date = "2025/12/02"
3
+ integration = ["azure"]
4
+ maturity = "production"
5
+ updated_date = "2025/12/02"
6
+
7
+ [rule]
8
+ author = ["Elastic"]
9
+ description = """
10
+ Identifies concurrent Entra ID sign-in events for the same user and session from multiple sources, and where one of the
11
+ authentication event has some suspicious properties often associated to DeviceCode and OAuth phishing. Adversaries may
12
+ steal Refresh Tokens (RTs) via phishing to bypass multi-factor authentication (MFA) and gain unauthorized access to
13
+ Azure resources.
14
+ """
15
+ false_positives = [
16
+ """
17
+ Users authenticating from multiple devices and using the deviceCode protocol or the Visual Studio Code client.
18
+ """,
19
+ ]
20
+ from = "now-9m"
21
+ language = "esql"
22
+ license = "Elastic License v2"
23
+ name = "Suspicious Microsoft Entra ID Concurrent Sign-Ins via DeviceCode"
24
+ note = """## Triage and analysis
25
+
26
+ ### Investigating Suspicious Microsoft Entra ID Concurrent Sign-Ins via DeviceCode
27
+
28
+ ### Possible investigation steps
29
+
30
+ - Review the sign-in logs to assess the context and reputation of the source.ip address.
31
+ - Investigate the user account associated with the successful sign-in to determine if the activity aligns with expected behavior or if it appears suspicious.
32
+ - Check for any recent changes or anomalies in the user's account settings or permissions that could indicate compromise.
33
+ - Review the history of sign-ins for the user to identify any patterns or unusual access times that could suggest unauthorized access.
34
+ - Assess the device from which the sign-in was attempted to ensure it is a recognized and authorized device for the user.
35
+
36
+ ### Response and remediation
37
+
38
+ - Immediately revoke the compromised Primary Refresh Tokens (PRTs) to prevent further unauthorized access. This can be done through the Azure portal by navigating to the user's account and invalidating all active sessions.
39
+ - Enforce a password reset for the affected user accounts to ensure that any credentials potentially compromised during the attack are no longer valid.
40
+ - Implement additional Conditional Access policies that require device compliance checks and restrict access to trusted locations or devices only, to mitigate the risk of future PRT abuse.
41
+ - Conduct a thorough review of the affected accounts' recent activity logs to identify any unauthorized actions or data access that may have occurred during the compromise.
42
+ - Escalate the incident to the security operations team for further investigation and to determine if there are any broader implications or additional compromised accounts.
43
+ - Enhance monitoring by configuring alerts for unusual sign-in patterns or device code authentication attempts from unexpected locations or devices, to improve early detection of similar threats.
44
+ - Coordinate with the incident response team to perform a post-incident analysis and update the incident response plan with lessons learned from this event."""
45
+ references = [
46
+ "https://learn.microsoft.com/en-us/entra/identity/",
47
+ "https://learn.microsoft.com/en-us/entra/identity/monitoring-health/concept-sign-ins",
48
+ "https://docs.microsoft.com/en-us/azure/active-directory/reports-monitoring/reference-azure-monitor-sign-ins-log-schema",
49
+ "https://www.volexity.com/blog/2025/04/22/phishing-for-codes-russian-threat-actors-target-microsoft-365-oauth-workflows/",
50
+ "https://www.wiz.io/blog/recent-oauth-attacks-detection-strategies"
51
+ ]
52
+ risk_score = 73
53
+ rule_id = "3db029b3-fbb7-4697-ad07-33cbfd5bd080"
54
+ setup = """#### Required Azure Entra Sign-In Logs
55
+ This rule requires the Azure logs integration be enabled and configured to collect all logs, including sign-in logs from Entra. In Entra, sign-in logs must be enabled and streaming to the Event Hub used for the Azure logs integration.
56
+ """
57
+ severity = "high"
58
+ tags = [
59
+ "Domain: Cloud",
60
+ "Domain: Identity",
61
+ "Data Source: Azure",
62
+ "Data Source: Entra ID",
63
+ "Data Source: Entra ID Sign-in",
64
+ "Use Case: Identity and Access Audit",
65
+ "Use Case: Threat Detection",
66
+ "Tactic: Credential Access",
67
+ "Resources: Investigation Guide",
68
+ ]
69
+ timestamp_override = "event.ingested"
70
+ type = "esql"
71
+
72
+ query = '''
73
+ from logs-azure.signinlogs-* metadata _id, _version, _index
74
+
75
+ | where event.category == "authentication" and event.dataset == "azure.signinlogs" and
76
+ azure.signinlogs.properties.original_transfer_method == "deviceCodeFlow"
77
+
78
+ | Eval Esql.interactive_logon = CASE(azure.signinlogs.category == "SignInLogs", source.ip, null),
79
+ Esql.non_interactive_logon = CASE(azure.signinlogs.category == "NonInteractiveUserSignInLogs", source.ip, null)
80
+
81
+ | stats Esql.count_logon = count(*),
82
+ Esql.timestamp_values = values(@timestamp),
83
+ Esql.source_ip_count_distinct = count_distinct(source.ip),
84
+ Esql.is_interactive = count(Esql.interactive_logon),
85
+ Esql.is_non_interactive = count(Esql.non_interactive_logon),
86
+ Esql.user_agent_count_distinct = COUNT_DISTINCT(user_agent.original),
87
+ Esql.user_agent_values = VALUES(user_agent.original),
88
+ Esql.azure_signinlogs_properties_client_app_values = values(azure.signinlogs.properties.app_display_name),
89
+ Esql.azure_signinlogs_properties_client_app_values = values(azure.signinlogs.properties.app_id),
90
+ Esql.azure_signinlogs_properties_resource_display_name_values = values(azure.signinlogs.properties.resource_display_name),
91
+ Esql.azure_signinlogs_properties_auth_requirement_values = values(azure.signinlogs.properties.authentication_requirement),
92
+ Esql.azure_signinlogs_properties_tenant_id = values(azure.tenant_id),
93
+ Esql.azure_signinlogs_properties_status_error_code_values = values(azure.signinlogs.properties.status.error_code),
94
+ Esql.message_values = values(message),
95
+ Esql.azure_signinlogs_properties_resource_id_values = values(azure.signinlogs.properties.resource_id),
96
+ Esql.source_ip_values = VALUES(source.ip) by azure.signinlogs.properties.session_id, azure.signinlogs.identity
97
+
98
+ | where Esql.is_interactive >= 2 and Esql.is_non_interactive >= 1 and (Esql.source_ip_count_distinct >= 2 or Esql.user_agent_count_distinct >= 2)
99
+ | keep
100
+ Esql.*,
101
+ azure.signinlogs.properties.session_id,
102
+ azure.signinlogs.identity
103
+ '''
104
+
105
+
106
+ [[rule.threat]]
107
+ framework = "MITRE ATT&CK"
108
+ [[rule.threat.technique]]
109
+ id = "T1528"
110
+ name = "Steal Application Access Token"
111
+ reference = "https://attack.mitre.org/techniques/T1528/"
112
+
113
+
114
+ [rule.threat.tactic]
115
+ id = "TA0006"
116
+ name = "Credential Access"
117
+ reference = "https://attack.mitre.org/tactics/TA0006/"
118
+ [[rule.threat]]
119
+ framework = "MITRE ATT&CK"
120
+ [[rule.threat.technique]]
121
+ id = "T1566"
122
+ name = "Phishing"
123
+ reference = "https://attack.mitre.org/techniques/T1566/"
124
+ [[rule.threat.technique.subtechnique]]
125
+ id = "T1566.002"
126
+ name = "Spearphishing Link"
127
+ reference = "https://attack.mitre.org/techniques/T1566/002/"
128
+
129
+
130
+ [rule.threat.tactic]
131
+ id = "TA0001"
132
+ name = "Initial Access"
133
+ reference = "https://attack.mitre.org/tactics/TA0001/"
134
+
@@ -2,9 +2,9 @@
2
2
  creation_date = "2025/07/01"
3
3
  integration = ["azure"]
4
4
  maturity = "production"
5
- min_stack_version = "8.19.7"
5
+ min_stack_version = "9.0.0"
6
6
  min_stack_comments = "Bug fix in threshold rules."
7
- updated_date = "2025/11/13"
7
+ updated_date = "2025/12/08"
8
8
 
9
9
  [rule]
10
10
  author = ["Elastic"]