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,7 +2,7 @@
2
2
  creation_date = "2025/04/11"
3
3
  integration = ["aws"]
4
4
  maturity = "production"
5
- updated_date = "2025/09/02"
5
+ updated_date = "2025/12/04"
6
6
 
7
7
  [rule]
8
8
  author = ["Elastic"]
@@ -35,7 +35,7 @@ note = """## Triage and Analysis
35
35
 
36
36
  Access tokens are bound to a single user. Usage from multiple IP addresses may indicate the token was stolen and used elsewhere. By correlating this with additional detection criteria like multiple user agents, different cities, and different networks, we can improve the fidelity of the rule and help to eliminate false positives associated with expected behavior, like dual-stack IPV4/IPV6 usage.
37
37
 
38
- #### Possible Investigation Steps
38
+ #### Possible investigation steps
39
39
 
40
40
  - **Identify the IAM User**: Examine the `aws.cloudtrail.user_identity.arn` stored in `user_id` and correlate with the `source.ips` stored in `ip_list` and `unique_ips` count to determine how widely the token was used.
41
41
  - **Correlate Additional Detection Context**: Examine `activity_type` and `fidelity_score` to determine additional cities, networks or user agents associated with the token usage.
@@ -44,18 +44,18 @@ Access tokens are bound to a single user. Usage from multiple IP addresses may i
44
44
  - **Review Workload Context**: Confirm whether the user was expected to be active across multiple cities, networks or user agent environments.
45
45
  - **Trace Adversary Movement**: Pivot to related actions (e.g., `s3:ListBuckets`, `iam:ListUsers`, `sts:GetCallerIdentity`) to track further enumeration.
46
46
 
47
- ### False Positive Analysis
47
+ ### False positive analysis
48
48
 
49
49
  - Automation frameworks that rotate through multiple IPs or cloud functions with dynamic egress IPs may cause this alert to fire.
50
50
  - Confirm geolocation and workload context before escalating.
51
51
 
52
- ### Response and Remediation
52
+ ### Response and remediation
53
53
 
54
54
  - **Revoke the Token**: Disable or rotate the IAM credentials and invalidate the temporary session token.
55
55
  - **Audit the Environment**: Look for signs of lateral movement or data access during the token's validity.
56
56
  - **Strengthen Controls**: Require MFA for high-privilege actions, restrict access via policy conditions (e.g., IP range or device).
57
57
 
58
- ### References
58
+ ### Additional information
59
59
 
60
60
  - [IAM Long-Term Credentials](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html)
61
61
  - [STS Temporary Credentials](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html)
@@ -99,7 +99,8 @@ from logs-aws.cloudtrail* metadata _id, _version, _index
99
99
  "health.amazonaws.com", "monitoring.amazonaws.com", "notifications.amazonaws.com",
100
100
  "ce.amazonaws.com", "cost-optimization-hub.amazonaws.com",
101
101
  "servicecatalog-appregistry.amazonaws.com", "securityhub.amazonaws.com",
102
- "account.amazonaws.com", "budgets.amazonaws.com", "freetier.amazonaws.com"
102
+ "account.amazonaws.com", "budgets.amazonaws.com", "freetier.amazonaws.com", "support.amazonaws.com",
103
+ "support-console.amazonaws.com"
103
104
  )
104
105
 
105
106
  | eval
@@ -114,7 +115,8 @@ from logs-aws.cloudtrail* metadata _id, _version, _index
114
115
  Esql.source_geo_city_name = source.geo.city_name,
115
116
  Esql.source_network_org_name = `source.as.organization.name`,
116
117
  Esql.source_ip_network_pair = concat(Esql.source_ip_string, "-", `source.as.organization.name`),
117
- Esql.event_timestamp = @timestamp
118
+ Esql.event_timestamp = @timestamp,
119
+ Esql.data_stream_namespace = data_stream.namespace
118
120
 
119
121
  | stats
120
122
  Esql.event_action_values = values(event.action),
@@ -132,6 +134,7 @@ from logs-aws.cloudtrail* metadata _id, _version, _index
132
134
  Esql.user_agent_original_count_distinct = count_distinct(Esql.user_agent_original),
133
135
  Esql.source_geo_city_name_count_distinct = count_distinct(Esql.source_geo_city_name),
134
136
  Esql.source_network_org_name_count_distinct = count_distinct(Esql.source_network_org_name),
137
+ Esql.data_stream_namespace_values = values(Esql.data_stream_namespace),
135
138
  Esql.timestamp_first_seen = min(Esql.event_timestamp),
136
139
  Esql.timestamp_last_seen = max(Esql.event_timestamp),
137
140
  Esql.event_count = count()
@@ -175,9 +178,15 @@ from logs-aws.cloudtrail* metadata _id, _version, _index
175
178
  Esql.source_ip_count_distinct,
176
179
  Esql.user_agent_original_count_distinct,
177
180
  Esql.source_geo_city_name_count_distinct,
178
- Esql.source_network_org_name_count_distinct
181
+ Esql.source_network_org_name_count_distinct,
182
+ Esql.data_stream_namespace_values
183
+
184
+ | where Esql.activity_fidelity_score == "high"
185
+
186
+ // this rule only alerts for "high" fidelity cases, to broaden the rule scope to include all activity
187
+ // change the final condition to
188
+ // | where Esql.activity_type != "normal_activity"
179
189
 
180
- | where Esql.activity_type != "normal_activity"
181
190
  '''
182
191
 
183
192
  [rule.investigation_fields]
@@ -201,7 +210,8 @@ field_names = [
201
210
  "Esql.source_ip_count_distinct",
202
211
  "Esql.user_agent_original_count_distinct",
203
212
  "Esql.source_geo_city_name_count_distinct",
204
- "Esql.source_network_org_name_count_distinct"
213
+ "Esql.source_network_org_name_count_distinct",
214
+ "Esql.data_stream_namespace_values"
205
215
  ]
206
216
 
207
217
 
@@ -2,7 +2,7 @@
2
2
  creation_date = "2020/07/13"
3
3
  integration = ["aws"]
4
4
  maturity = "production"
5
- updated_date = "2024/06/18"
5
+ updated_date = "2025/11/18"
6
6
 
7
7
  [rule]
8
8
  anomaly_threshold = 50
@@ -112,3 +112,37 @@ tags = [
112
112
  ]
113
113
  type = "machine_learning"
114
114
 
115
+ [[rule.threat]]
116
+ framework = "MITRE ATT&CK"
117
+
118
+ [rule.threat.tactic]
119
+ id = "TA0007"
120
+ name = "Discovery"
121
+ reference = "https://attack.mitre.org/tactics/TA0007/"
122
+
123
+ [[rule.threat.technique]]
124
+ id = "T1526"
125
+ name = "Cloud Service Discovery"
126
+ reference = "https://attack.mitre.org/techniques/T1526/"
127
+
128
+ [[rule.threat.technique]]
129
+ id = "T1580"
130
+ name = "Cloud Infrastructure Discovery"
131
+ reference = "https://attack.mitre.org/techniques/T1580/"
132
+
133
+ [[rule.threat]]
134
+ framework = "MITRE ATT&CK"
135
+
136
+ [rule.threat.tactic]
137
+ id = "TA0004"
138
+ name = "Privilege Escalation"
139
+ reference = "https://attack.mitre.org/tactics/TA0004/"
140
+
141
+ [[rule.threat]]
142
+ framework = "MITRE ATT&CK"
143
+
144
+ [rule.threat.tactic]
145
+ id = "TA0008"
146
+ name = "Lateral Movement"
147
+ reference = "https://attack.mitre.org/tactics/TA0008/"
148
+
@@ -2,7 +2,7 @@
2
2
  creation_date = "2020/07/13"
3
3
  integration = ["aws"]
4
4
  maturity = "production"
5
- updated_date = "2024/06/18"
5
+ updated_date = "2025/11/18"
6
6
 
7
7
  [rule]
8
8
  anomaly_threshold = 50
@@ -114,3 +114,61 @@ tags = [
114
114
  ]
115
115
  type = "machine_learning"
116
116
 
117
+ [[rule.threat]]
118
+ framework = "MITRE ATT&CK"
119
+
120
+ [rule.threat.tactic]
121
+ id = "TA0007"
122
+ name = "Discovery"
123
+ reference = "https://attack.mitre.org/tactics/TA0007/"
124
+
125
+ [[rule.threat.technique]]
126
+ id = "T1526"
127
+ name = "Cloud Service Discovery"
128
+ reference = "https://attack.mitre.org/techniques/T1526/"
129
+
130
+ [[rule.threat.technique]]
131
+ id = "T1580"
132
+ name = "Cloud Infrastructure Discovery"
133
+ reference = "https://attack.mitre.org/techniques/T1580/"
134
+
135
+ [[rule.threat]]
136
+ framework = "MITRE ATT&CK"
137
+
138
+ [rule.threat.tactic]
139
+ id = "TA0004"
140
+ name = "Privilege Escalation"
141
+ reference = "https://attack.mitre.org/tactics/TA0004/"
142
+
143
+ [[rule.threat]]
144
+ framework = "MITRE ATT&CK"
145
+
146
+ [rule.threat.tactic]
147
+ id = "TA0005"
148
+ name = "Defense Evasion"
149
+ reference = "https://attack.mitre.org/tactics/TA0005/"
150
+
151
+ [[rule.threat]]
152
+ framework = "MITRE ATT&CK"
153
+
154
+ [rule.threat.tactic]
155
+ id = "TA0008"
156
+ name = "Lateral Movement"
157
+ reference = "https://attack.mitre.org/tactics/TA0008/"
158
+
159
+ [[rule.threat]]
160
+ framework = "MITRE ATT&CK"
161
+
162
+ [rule.threat.tactic]
163
+ id = "TA0003"
164
+ name = "Persistence"
165
+ reference = "https://attack.mitre.org/tactics/TA0003/"
166
+
167
+ [[rule.threat]]
168
+ framework = "MITRE ATT&CK"
169
+
170
+ [rule.threat.tactic]
171
+ id = "TA0009"
172
+ name = "Collection"
173
+ reference = "https://attack.mitre.org/tactics/TA0009/"
174
+
@@ -2,7 +2,7 @@
2
2
  creation_date = "2020/07/13"
3
3
  integration = ["aws"]
4
4
  maturity = "production"
5
- updated_date = "2024/06/18"
5
+ updated_date = "2025/11/18"
6
6
 
7
7
  [rule]
8
8
  anomaly_threshold = 50
@@ -116,3 +116,21 @@ tags = [
116
116
  ]
117
117
  type = "machine_learning"
118
118
 
119
+ [[rule.threat]]
120
+ framework = "MITRE ATT&CK"
121
+
122
+ [rule.threat.tactic]
123
+ id = "TA0001"
124
+ name = "Initial Access"
125
+ reference = "https://attack.mitre.org/tactics/TA0001/"
126
+
127
+ [[rule.threat.technique]]
128
+ id = "T1078"
129
+ name = "Valid Accounts"
130
+ reference = "https://attack.mitre.org/techniques/T1078/"
131
+
132
+ [[rule.threat.technique.subtechnique]]
133
+ id = "T1078.004"
134
+ name = "Cloud Accounts"
135
+ reference = "https://attack.mitre.org/techniques/T1078/004/"
136
+
@@ -2,7 +2,7 @@
2
2
  creation_date = "2020/07/13"
3
3
  integration = ["aws"]
4
4
  maturity = "production"
5
- updated_date = "2024/06/18"
5
+ updated_date = "2025/11/18"
6
6
 
7
7
  [rule]
8
8
  anomaly_threshold = 50
@@ -116,3 +116,21 @@ tags = [
116
116
  ]
117
117
  type = "machine_learning"
118
118
 
119
+ [[rule.threat]]
120
+ framework = "MITRE ATT&CK"
121
+
122
+ [rule.threat.tactic]
123
+ id = "TA0001"
124
+ name = "Initial Access"
125
+ reference = "https://attack.mitre.org/tactics/TA0001/"
126
+
127
+ [[rule.threat.technique]]
128
+ id = "T1078"
129
+ name = "Valid Accounts"
130
+ reference = "https://attack.mitre.org/techniques/T1078/"
131
+
132
+ [[rule.threat.technique.subtechnique]]
133
+ id = "T1078.004"
134
+ name = "Cloud Accounts"
135
+ reference = "https://attack.mitre.org/techniques/T1078/004/"
136
+
@@ -2,7 +2,7 @@
2
2
  creation_date = "2020/07/13"
3
3
  integration = ["aws"]
4
4
  maturity = "production"
5
- updated_date = "2024/06/18"
5
+ updated_date = "2025/11/18"
6
6
 
7
7
  [rule]
8
8
  anomaly_threshold = 75
@@ -114,3 +114,60 @@ tags = [
114
114
  ]
115
115
  type = "machine_learning"
116
116
 
117
+ [[rule.threat]]
118
+ framework = "MITRE ATT&CK"
119
+
120
+ [rule.threat.tactic]
121
+ id = "TA0001"
122
+ name = "Initial Access"
123
+ reference = "https://attack.mitre.org/tactics/TA0001/"
124
+
125
+ [[rule.threat.technique]]
126
+ id = "T1078"
127
+ name = "Valid Accounts"
128
+ reference = "https://attack.mitre.org/techniques/T1078/"
129
+
130
+ [[rule.threat.technique.subtechnique]]
131
+ id = "T1078.004"
132
+ name = "Cloud Accounts"
133
+ reference = "https://attack.mitre.org/techniques/T1078/004/"
134
+
135
+ [[rule.threat]]
136
+ framework = "MITRE ATT&CK"
137
+
138
+ [rule.threat.tactic]
139
+ id = "TA0008"
140
+ name = "Lateral Movement"
141
+ reference = "https://attack.mitre.org/tactics/TA0008/"
142
+
143
+ [[rule.threat.technique]]
144
+ id = "T1021"
145
+ name = "Remote Services"
146
+ reference = "https://attack.mitre.org/techniques/T1021/"
147
+
148
+ [[rule.threat.technique.subtechnique]]
149
+ id = "T1021.007"
150
+ name = "Cloud Services"
151
+ reference = "https://attack.mitre.org/techniques/T1021/007/"
152
+
153
+ [[rule.threat]]
154
+ framework = "MITRE ATT&CK"
155
+
156
+ [rule.threat.tactic]
157
+ id = "TA0003"
158
+ name = "Persistence"
159
+ reference = "https://attack.mitre.org/tactics/TA0003/"
160
+
161
+ [[rule.threat]]
162
+ framework = "MITRE ATT&CK"
163
+
164
+ [rule.threat.tactic]
165
+ id = "TA0010"
166
+ name = "Exfiltration"
167
+ reference = "https://attack.mitre.org/tactics/TA0010/"
168
+
169
+ [[rule.threat.technique]]
170
+ id = "T1041"
171
+ name = "Exfiltration Over C2 Channel"
172
+ reference = "https://attack.mitre.org/techniques/T1041/"
173
+
@@ -2,16 +2,23 @@
2
2
  creation_date = "2024/06/27"
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 modification of the master password for an AWS RDS DB instance or cluster. DB instances may contain sensitive data that can be abused if accessed by unauthorized actors. Amazon RDS API operations never return the password, so this operation provides a means to regain access if the password is lost. Adversaries with the proper permissions can take advantage of this to evade defenses and gain unauthorized access to a DB instance or cluster to support persistence mechanisms or privilege escalation.
10
+ Identifies the modification of the master password for an AWS RDS DB instance or cluster. Changing the master password
11
+ is a legitimate recovery action when access is lost, but adversaries with sufficient permissions may modify it to regain
12
+ access, establish persistence, bypass existing controls, or escalate privileges within a compromised environment.
13
+ Because RDS does not expose the password in API responses, this operation can meaningfully alter access pathways to
14
+ sensitive data stores.
11
15
  """
16
+ event_category_override = "event.type"
12
17
  false_positives = [
13
18
  """
14
- Master password change is a legitimate means to regain access to a DB instance in the case of a lost password. Ensure that the instance should not be modified in this way before taking action.
19
+ Master password modification may occur during legitimate administrative recovery (e.g., a lost password, rotation
20
+ event, or Secrets Manager reassociation). Validate whether the change was expected, approved, and performed by
21
+ authorized personnel. If known workflows routinely perform this action, consider adding targeted exceptions.
15
22
  """,
16
23
  ]
17
24
  from = "now-6m"
@@ -19,40 +26,86 @@ index = ["filebeat-*", "logs-aws.cloudtrail-*"]
19
26
  language = "eql"
20
27
  license = "Elastic License v2"
21
28
  name = "AWS RDS DB Instance or Cluster Password Modified"
22
- note = """
23
- ## Triage and analysis
29
+ note = """## Triage and analysis
24
30
 
25
- ### Investigating AWS RDS DB Instance or Cluster Password Modified
26
-
27
- This rule identifies when an RDS DB instance or cluster password is modified. While changing the master password is a legitimate means to regain access in the case of a lost password, adversaries may exploit this feature to maintain persistence or evade defenses in a compromised environment.
28
-
29
- #### Possible Investigation Steps
30
-
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 Modification Event**: Identify the DB instance involved and review the event details. Look for `ModifyDBInstance` actions where the masterUserPassword parameter was changed.
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 Modified Instance**: Check the DB instance that was modified and its contents to determine the sensitivity of the data stored within it.
35
- - **Contextualize with Recent Changes**: Compare this modification 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 change 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.
38
- ### False Positive Analysis
39
-
40
- - **Legitimate Instance Modification**: Confirm if the DB instance 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.
42
-
43
- ### Response and Remediation
44
-
45
- - **Immediate Review and Reversal**: If the change was unauthorized, update the instance password. If the master user password was managed with AWS Secrets Manager, determine whether the `manageMasterUserPassword` attribute was changed to false and revert if necessary.
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.
31
+ > **Disclaimer**:
32
+ > This investigation guide was created using generative AI technology and has been reviewed to improve its accuracy and relevance.
33
+ > While every effort has been made to ensure its quality, validate and adapt it to suit your operational needs.
50
34
 
51
- ### Additional Information:
35
+ ### Investigating AWS RDS DB Instance or Cluster Password Modified
52
36
 
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)
55
- - [Amazon RDS and Secrets Manager](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-secrets-manager.html)
37
+ The RDS master user password controls privileged access to a database instance or cluster. Modifying it can immediately shift access from one operator to another, break application functionality, or allow an adversary to regain control over a compromised DB instance. Because RDS never returns the password via API, this operation is a strong signal of intentional access reconfiguration.
38
+
39
+ This rule detects successful password-modification events via `ModifyDBInstance` or `ModifyDBCluster`. Such changes may indicate credential loss recovery—or malicious actions related to persistence, privilege escalation, or defense evasion.
40
+
41
+ #### Possible investigation steps
42
+
43
+ - **Identify the actor and execution context**
44
+ - Review `aws.cloudtrail.user_identity.arn` and `aws.cloudtrail.user_identity.access_key_id`.
45
+ - Inspect `user.name`, `source.ip`, and `user_agent.original` to determine whether the modification originated from expected networks, automation roles, or unusual sources.
46
+
47
+ - **Determine what was modified**
48
+ - Examine `aws.cloudtrail.request_parameters` to identify:
49
+ - The DB instance or cluster identifier.
50
+ - Whether other parameters were modified in the same call (e.g., `manageMasterUserPassword`, engine version, instance class, parameter group).
51
+ - Review instance metadata in AWS to understand the sensitivity level, environment (prod/stage/dev), and potential business impact.
52
+
53
+ - **Reconstruct timing and associated actions**
54
+ - Use `@timestamp` to compare the event against:
55
+ - Recent configuration changes such as `ModifyDBInstance`, `ModifyDBCluster`, or networking/security group updates.
56
+ - Other access-related operations (e.g., `AddRoleToDBInstance`, changes to Secrets Manager associations, disabling deletion protection).
57
+ - Check for signs of credential misuse leading up to the event (e.g., `DescribeDBInstances`, `GetCallerIdentity`, unauthorized console logins).
58
+
59
+ - **Correlate with broader activity**
60
+ - Pivot in CloudTrail using the same access key, principal ARN, or source IP.
61
+ - Look for:
62
+ - Privilege-escalating or persistence-related behavior (IAM policy changes, role modifications, STS session creation).
63
+ - Subsequent DB-impacting operations, such as snapshot deletion, backup retention changes, or cluster deletion.
64
+ - Evidence of data access anomalies (backup exports, data snapshot copies, cross-region actions).
65
+
66
+ - **Validate intent with operational owners**
67
+ - Confirm with DBAs, platform engineers, and application owners whether the password change:
68
+ - Was requested or scheduled.
69
+ - Aligns with pending migrations, credential rotations, or recovery actions.
70
+ - If not recognized, treat this as a high-risk event requiring deeper containment.
71
+
72
+ ### False positive analysis
73
+
74
+ - **Recovery or maintenance tasks**
75
+ - Password resets occur during lost-credential scenarios or planned rotations. Confirm if this aligns with a documented workflow.
76
+ - **Secrets Manager integration changes**
77
+ - When `manageMasterUserPassword` is toggled or Secrets Manager rotates passwords, a modification event may occur. Validate whether an automation pipeline triggered the change.
78
+ - **Non-production workloads**
79
+ - Development or staging environments may see frequent password resets. Consider tuning exceptions based on tags, instance identifiers, or IAM roles tied to automation.
80
+
81
+ ### Response and remediation
82
+
83
+ - **Contain unauthorized access**
84
+ - If activity is suspicious:
85
+ - Immediately rotate the master password again using a secure, validated workflow.
86
+ - Verify whether Secrets Manager integration was disabled (`manageMasterUserPassword=false`) and restore it if necessary.
87
+ - Restrict inbound DB access by tightening associated security group rules or isolating the instance temporarily.
88
+
89
+ - **Investigate surrounding activity**
90
+ - Review CloudTrail to identify:
91
+ - Who accessed the instance after the password change.
92
+ - Whether any destructive or data-exfiltrating RDS actions occurred.
93
+ - Other IAM or STS activity tied to the same user or session.
94
+
95
+ - **Restore guardrails and enhance monitoring**
96
+ - Ensure deletion protection, backup retention, and networking controls are correctly configured.
97
+ - Add real-time alerts for password-related modifications and high-risk RDS API actions.
98
+
99
+ - **Strengthen IAM and operational controls**
100
+ - Limit permissions for `rds:ModifyDBInstance` and `rds:ModifyDBCluster`, especially when modifying authentication parameters.
101
+ - Require MFA and role-based access for DB administrators.
102
+ - Tighten SCPs or Config rules to restrict unauthorized DB configuration changes.
103
+
104
+ ### Additional information
105
+
106
+ - **[AWS IR Playbooks](https://github.com/aws-samples/aws-incident-response-playbooks/blob/c151b0dc091755fffd4d662a8f29e2f6794da52c/playbooks/)**
107
+ - **[AWS Customer Playbook Framework](https://github.com/aws-samples/aws-customer-playbook-framework/tree/a8c7b313636b406a375952ac00b2d68e89a991f2/docs)**
108
+ - **Security Best Practices:** [AWS Knowledge Center – Security Best Practices](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/).
56
109
  """
57
110
  references = [
58
111
  "https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_ModifyDBInstance.html",
@@ -77,7 +130,7 @@ timestamp_override = "event.ingested"
77
130
  type = "eql"
78
131
 
79
132
  query = '''
80
- any where event.dataset == "aws.cloudtrail"
133
+ info where event.dataset == "aws.cloudtrail"
81
134
  and event.provider == "rds.amazonaws.com"
82
135
  and event.action in ("ModifyDBInstance", "ModifyDBCluster")
83
136
  and event.outcome == "success"
@@ -96,6 +149,8 @@ id = "T1098.001"
96
149
  name = "Additional Cloud Credentials"
97
150
  reference = "https://attack.mitre.org/techniques/T1098/001/"
98
151
 
152
+
153
+
99
154
  [rule.threat.tactic]
100
155
  id = "TA0003"
101
156
  name = "Persistence"
@@ -114,3 +169,22 @@ framework = "MITRE ATT&CK"
114
169
  id = "TA0005"
115
170
  name = "Defense Evasion"
116
171
  reference = "https://attack.mitre.org/tactics/TA0005/"
172
+
173
+ [rule.investigation_fields]
174
+ field_names = [
175
+ "@timestamp",
176
+ "user.name",
177
+ "user_agent.original",
178
+ "source.ip",
179
+ "aws.cloudtrail.user_identity.arn",
180
+ "aws.cloudtrail.user_identity.type",
181
+ "aws.cloudtrail.user_identity.access_key_id",
182
+ "target.entity.id",
183
+ "event.action",
184
+ "event.outcome",
185
+ "cloud.account.id",
186
+ "cloud.region",
187
+ "aws.cloudtrail.request_parameters",
188
+ "aws.cloudtrail.response_elements",
189
+ ]
190
+