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 = "2024/06/03"
3
3
  integration = ["fim"]
4
4
  maturity = "production"
5
- updated_date = "2025/01/22"
5
+ updated_date = "2025/12/04"
6
6
 
7
7
  [rule]
8
8
  author = ["Elastic"]
@@ -21,6 +21,10 @@ name = "Potential Persistence via File Modification"
21
21
  references = [
22
22
  "https://www.elastic.co/security-labs/primer-on-persistence-mechanisms",
23
23
  "https://www.elastic.co/security-labs/sequel-on-persistence-mechanisms",
24
+ "https://www.elastic.co/security-labs/continuation-on-persistence-mechanisms",
25
+ "https://www.elastic.co/security-labs/approaching-the-summit-on-persistence",
26
+ "https://www.elastic.co/security-labs/the-grand-finale-on-linux-persistence",
27
+ "https://slayer0x.github.io/awscli/",
24
28
  ]
25
29
  risk_score = 21
26
30
  rule_id = "192657ba-ab0e-4901-89a2-911d611eee98"
@@ -94,6 +98,10 @@ file.path : (
94
98
  "/home/*/.config/fish/config.fish", "/root/.config/fish/config.fish",
95
99
  "/home/*/.kshrc", "/root/.kshrc",
96
100
 
101
+ // Alias files
102
+ "/home/*/.bash_aliases", "/root/.bash_aliases", "/home/*/.zsh_aliases", "/root/.zsh_aliases",
103
+ "/home/*/.aws/cli/alias", "/root/.aws/cli/alias",
104
+
97
105
  // runtime control
98
106
  "/etc/rc.common", "/etc/rc.local",
99
107
 
@@ -0,0 +1,95 @@
1
+ [metadata]
2
+ creation_date = "2025/10/06"
3
+ integration = ["gcp"]
4
+ maturity = "production"
5
+ min_stack_comments = "New job added"
6
+ min_stack_version = "9.3.0"
7
+ updated_date = "2025/11/21"
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 GCP Audit 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 = "gcp_audit_high_distinct_count_error_message"
27
+ name = "Spike in GCP Audit Failed Messages"
28
+ setup = """## Setup
29
+
30
+ This rule requires the installation of associated Machine Learning jobs, as well as data coming in from GCP Audit.
31
+
32
+ ### Anomaly Detection Setup
33
+
34
+ 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).
35
+
36
+ ### GCP Audit logs Integration Setup
37
+ The Google Cloud Platform (GCP) Audit logs integration allows you to collect logs and metrics from Google Cloud Platform (GCP) with Elastic Agent.
38
+
39
+ #### The following steps should be executed in order to add the Elastic Agent System "Google Cloud Platform (GCP) Audit logs" integration to your system:
40
+ - Go to the Kibana home page and click “Add integrations”.
41
+ - In the query bar, search for “Google Cloud Platform (GCP) Audit logs” and select the integration to see more details about it.
42
+ - Click “Add Google Cloud Platform (GCP) Audit logs".
43
+ - Configure the integration.
44
+ - Click “Save and Continue”.
45
+ - For more details on the integration refer to the [helper guide](https://www.elastic.co/docs/current/integrations/gcp).
46
+ """
47
+ references = ["https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html"]
48
+ risk_score = 21
49
+ rule_id = "a4b740e4-be17-4048-9aa4-1e6f42b455b1"
50
+ severity = "low"
51
+ tags = [
52
+ "Domain: Cloud",
53
+ "Data Source: GCP",
54
+ "Data Source: GCP Audit Logs",
55
+ "Data Source: Google Cloud Platform",
56
+ "Rule Type: ML",
57
+ "Rule Type: Machine Learning",
58
+ "Resources: Investigation Guide",
59
+ ]
60
+ type = "machine_learning"
61
+
62
+ [[rule.threat]]
63
+ framework = "MITRE ATT&CK"
64
+
65
+ [rule.threat.tactic]
66
+ id = "TA0007"
67
+ name = "Discovery"
68
+ reference = "https://attack.mitre.org/tactics/TA0007/"
69
+
70
+ [[rule.threat.technique]]
71
+ id = "T1526"
72
+ name = "Cloud Service Discovery"
73
+ reference = "https://attack.mitre.org/techniques/T1526/"
74
+
75
+ [[rule.threat.technique]]
76
+ id = "T1580"
77
+ name = "Cloud Infrastructure Discovery"
78
+ reference = "https://attack.mitre.org/techniques/T1580/"
79
+
80
+ [[rule.threat]]
81
+ framework = "MITRE ATT&CK"
82
+
83
+ [rule.threat.tactic]
84
+ id = "TA0004"
85
+ name = "Privilege Escalation"
86
+ reference = "https://attack.mitre.org/tactics/TA0004/"
87
+
88
+ [[rule.threat]]
89
+ framework = "MITRE ATT&CK"
90
+
91
+ [rule.threat.tactic]
92
+ id = "TA0008"
93
+ name = "Lateral Movement"
94
+ reference = "https://attack.mitre.org/tactics/TA0008/"
95
+
@@ -0,0 +1,118 @@
1
+ [metadata]
2
+ creation_date = "2025/10/06"
3
+ integration = ["gcp"]
4
+ maturity = "production"
5
+ min_stack_comments = "New job added"
6
+ min_stack_version = "9.3.0"
7
+ updated_date = "2025/11/21"
8
+
9
+ [rule]
10
+ anomaly_threshold = 50
11
+ author = ["Elastic"]
12
+ description = """
13
+ A machine learning job detected an unusual failure in a GCP Audit 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 = "gcp_audit_rare_error_code"
27
+ name = "Rare GCP Audit Failure Event Code"
28
+ setup = """## Setup
29
+
30
+ This rule requires the installation of associated Machine Learning jobs, as well as data coming in from GCP.
31
+
32
+ ### Anomaly Detection Setup
33
+
34
+ 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).
35
+
36
+ ### GCP Audit logs Integration Setup
37
+ The Google Cloud Platform (GCP) Audit logs integration allows you to collect logs and metrics from Google Cloud Platform (GCP) with Elastic Agent.
38
+
39
+ #### The following steps should be executed in order to add the Elastic Agent System "Google Cloud Platform (GCP) Audit logs" integration to your system:
40
+ - Go to the Kibana home page and click “Add integrations”.
41
+ - In the query bar, search for “Google Cloud Platform (GCP) Audit logs” and select the integration to see more details about it.
42
+ - Click “Add Google Cloud Platform (GCP) Audit logs".
43
+ - Configure the integration.
44
+ - Click “Save and Continue”.
45
+ - For more details on the integration refer to the [helper guide](https://www.elastic.co/docs/current/integrations/gcp).
46
+ """
47
+ references = ["https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html"]
48
+ risk_score = 21
49
+ rule_id = "5378a829-30c2-435a-a0f2-e3d794bd6f80"
50
+ severity = "low"
51
+ tags = [
52
+ "Domain: Cloud",
53
+ "Data Source: GCP",
54
+ "Data Source: GCP Audit Logs",
55
+ "Data Source: Google Cloud Platform",
56
+ "Rule Type: ML",
57
+ "Rule Type: Machine Learning",
58
+ "Resources: Investigation Guide",
59
+ ]
60
+ type = "machine_learning"
61
+
62
+ [[rule.threat]]
63
+ framework = "MITRE ATT&CK"
64
+
65
+ [rule.threat.tactic]
66
+ id = "TA0007"
67
+ name = "Discovery"
68
+ reference = "https://attack.mitre.org/tactics/TA0007/"
69
+
70
+ [[rule.threat.technique]]
71
+ id = "T1526"
72
+ name = "Cloud Service Discovery"
73
+ reference = "https://attack.mitre.org/techniques/T1526/"
74
+
75
+ [[rule.threat.technique]]
76
+ id = "T1580"
77
+ name = "Cloud Infrastructure Discovery"
78
+ reference = "https://attack.mitre.org/techniques/T1580/"
79
+
80
+ [[rule.threat]]
81
+ framework = "MITRE ATT&CK"
82
+
83
+ [rule.threat.tactic]
84
+ id = "TA0004"
85
+ name = "Privilege Escalation"
86
+ reference = "https://attack.mitre.org/tactics/TA0004/"
87
+
88
+ [[rule.threat]]
89
+ framework = "MITRE ATT&CK"
90
+
91
+ [rule.threat.tactic]
92
+ id = "TA0005"
93
+ name = "Defense Evasion"
94
+ reference = "https://attack.mitre.org/tactics/TA0005/"
95
+
96
+ [[rule.threat]]
97
+ framework = "MITRE ATT&CK"
98
+
99
+ [rule.threat.tactic]
100
+ id = "TA0008"
101
+ name = "Lateral Movement"
102
+ reference = "https://attack.mitre.org/tactics/TA0008/"
103
+
104
+ [[rule.threat]]
105
+ framework = "MITRE ATT&CK"
106
+
107
+ [rule.threat.tactic]
108
+ id = "TA0003"
109
+ name = "Persistence"
110
+ reference = "https://attack.mitre.org/tactics/TA0003/"
111
+
112
+ [[rule.threat]]
113
+ framework = "MITRE ATT&CK"
114
+
115
+ [rule.threat.tactic]
116
+ id = "TA0009"
117
+ name = "Collection"
118
+ reference = "https://attack.mitre.org/tactics/TA0009/"
@@ -0,0 +1,79 @@
1
+ [metadata]
2
+ creation_date = "2025/10/06"
3
+ integration = ["gcp"]
4
+ maturity = "production"
5
+ min_stack_comments = "New job added"
6
+ min_stack_version = "9.3.0"
7
+ updated_date = "2025/11/21"
8
+
9
+ [rule]
10
+ anomaly_threshold = 50
11
+ author = ["Elastic"]
12
+ description = """
13
+ A machine learning job detected GCP Audit event 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 = "gcp_audit_rare_method_for_a_city"
28
+ name = "Unusual City For a GCP Event"
29
+ setup = """## Setup
30
+
31
+ This rule requires the installation of associated Machine Learning jobs, as well as data coming in from GCP.
32
+
33
+ ### Anomaly Detection Setup
34
+
35
+ 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).
36
+
37
+ ### GCP Audit logs Integration Setup
38
+ The Google Cloud Platform (GCP) Audit logs integration allows you to collect logs and metrics from Google Cloud Platform (GCP) with Elastic Agent.
39
+
40
+ #### The following steps should be executed in order to add the Elastic Agent System "Google Cloud Platform (GCP) Audit logs" integration to your system:
41
+ - Go to the Kibana home page and click “Add integrations”.
42
+ - In the query bar, search for “Google Cloud Platform (GCP) Audit logs” and select the integration to see more details about it.
43
+ - Click “Add Google Cloud Platform (GCP) Audit logs".
44
+ - Configure the integration.
45
+ - Click “Save and Continue”.
46
+ - For more details on the integration refer to the [helper guide](https://www.elastic.co/docs/current/integrations/gcp).
47
+ """
48
+ references = ["https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html"]
49
+ risk_score = 21
50
+ rule_id = "f20d1782-e783-4ed0-a0c4-946899a98a7c"
51
+ severity = "low"
52
+ tags = [
53
+ "Domain: Cloud",
54
+ "Data Source: GCP",
55
+ "Data Source: GCP Audit Logs",
56
+ "Data Source: Google Cloud Platform",
57
+ "Rule Type: ML",
58
+ "Rule Type: Machine Learning",
59
+ "Resources: Investigation Guide",
60
+ ]
61
+ type = "machine_learning"
62
+
63
+ [[rule.threat]]
64
+ framework = "MITRE ATT&CK"
65
+
66
+ [rule.threat.tactic]
67
+ id = "TA0001"
68
+ name = "Initial Access"
69
+ reference = "https://attack.mitre.org/tactics/TA0001/"
70
+
71
+ [[rule.threat.technique]]
72
+ id = "T1078"
73
+ name = "Valid Accounts"
74
+ reference = "https://attack.mitre.org/techniques/T1078/"
75
+
76
+ [[rule.threat.technique.subtechnique]]
77
+ id = "T1078.004"
78
+ name = "Cloud Accounts"
79
+ reference = "https://attack.mitre.org/techniques/T1078/004/"
@@ -0,0 +1,79 @@
1
+ [metadata]
2
+ creation_date = "2025/10/06"
3
+ integration = ["gcp"]
4
+ maturity = "production"
5
+ min_stack_comments = "New job added"
6
+ min_stack_version = "9.3.0"
7
+ updated_date = "2025/11/21"
8
+
9
+ [rule]
10
+ anomaly_threshold = 50
11
+ author = ["Elastic"]
12
+ description = """
13
+ A machine learning job detected GCP Audit event 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 = "gcp_audit_rare_method_for_a_country"
28
+ name = "Unusual Country For a GCP Event"
29
+ setup = """## Setup
30
+
31
+ This rule requires the installation of associated Machine Learning jobs, as well as data coming in from GCP.
32
+
33
+ ### Anomaly Detection Setup
34
+
35
+ 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).
36
+
37
+ ### GCP Audit logs Integration Setup
38
+ The Google Cloud Platform (GCP) Audit logs integration allows you to collect logs and metrics from Google Cloud Platform (GCP) with Elastic Agent.
39
+
40
+ #### The following steps should be executed in order to add the Elastic Agent System "Google Cloud Platform (GCP) Audit logs" integration to your system:
41
+ - Go to the Kibana home page and click “Add integrations”.
42
+ - In the query bar, search for “Google Cloud Platform (GCP) Audit logs” and select the integration to see more details about it.
43
+ - Click “Add Google Cloud Platform (GCP) Audit logs".
44
+ - Configure the integration.
45
+ - Click “Save and Continue”.
46
+ - For more details on the integration refer to the [helper guide](https://www.elastic.co/docs/current/integrations/gcp).
47
+ """
48
+ references = ["https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html"]
49
+ risk_score = 21
50
+ rule_id = "dcbd07f8-bd6e-4bb4-ac5d-cec1927ea88f"
51
+ severity = "low"
52
+ tags = [
53
+ "Domain: Cloud",
54
+ "Data Source: GCP",
55
+ "Data Source: GCP Audit Logs",
56
+ "Data Source: Google Cloud Platform",
57
+ "Rule Type: ML",
58
+ "Rule Type: Machine Learning",
59
+ "Resources: Investigation Guide",
60
+ ]
61
+ type = "machine_learning"
62
+
63
+ [[rule.threat]]
64
+ framework = "MITRE ATT&CK"
65
+
66
+ [rule.threat.tactic]
67
+ id = "TA0001"
68
+ name = "Initial Access"
69
+ reference = "https://attack.mitre.org/tactics/TA0001/"
70
+
71
+ [[rule.threat.technique]]
72
+ id = "T1078"
73
+ name = "Valid Accounts"
74
+ reference = "https://attack.mitre.org/techniques/T1078/"
75
+
76
+ [[rule.threat.technique.subtechnique]]
77
+ id = "T1078.004"
78
+ name = "Cloud Accounts"
79
+ reference = "https://attack.mitre.org/techniques/T1078/004/"
@@ -0,0 +1,117 @@
1
+ [metadata]
2
+ creation_date = "2025/10/06"
3
+ integration = ["gcp"]
4
+ maturity = "production"
5
+ min_stack_comments = "New job added"
6
+ min_stack_version = "9.3.0"
7
+ updated_date = "2025/11/21"
8
+
9
+ [rule]
10
+ anomaly_threshold = 75
11
+ author = ["Elastic"]
12
+ description = """
13
+ A machine learning job detected an GCP Audit event that, while not inherently suspicious or abnormal, is being made by a
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 = "gcp_audit_rare_method_for_a_client_user_email"
27
+ name = "Unusual GCP Event for a User"
28
+ setup = """## Setup
29
+
30
+ This rule requires the installation of associated Machine Learning jobs, as well as data coming in from GCP.
31
+
32
+ ### Anomaly Detection Setup
33
+
34
+ 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).
35
+
36
+ ### GCP Audit logs Integration Setup
37
+ The Google Cloud Platform (GCP) Audit logs integration allows you to collect logs and metrics from Google Cloud Platform (GCP) with Elastic Agent.
38
+
39
+ #### The following steps should be executed in order to add the Elastic Agent System "Google Cloud Platform (GCP) Audit logs" integration to your system:
40
+ - Go to the Kibana home page and click “Add integrations”.
41
+ - In the query bar, search for “Google Cloud Platform (GCP) Audit logs” and select the integration to see more details about it.
42
+ - Click “Add Google Cloud Platform (GCP) Audit logs".
43
+ - Configure the integration.
44
+ - Click “Save and Continue”.
45
+ - For more details on the integration refer to the [helper guide](https://www.elastic.co/docs/current/integrations/gcp).
46
+ """
47
+ references = ["https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html"]
48
+ risk_score = 21
49
+ rule_id = "2e08f34c-691c-497e-87de-5d794a1b2a53"
50
+ severity = "low"
51
+ tags = [
52
+ "Domain: Cloud",
53
+ "Data Source: GCP",
54
+ "Data Source: GCP Audit Logs",
55
+ "Data Source: Google Cloud Platform",
56
+ "Rule Type: ML",
57
+ "Rule Type: Machine Learning",
58
+ "Resources: Investigation Guide",
59
+ ]
60
+ type = "machine_learning"
61
+
62
+ [[rule.threat]]
63
+ framework = "MITRE ATT&CK"
64
+
65
+ [rule.threat.tactic]
66
+ id = "TA0001"
67
+ name = "Initial Access"
68
+ reference = "https://attack.mitre.org/tactics/TA0001/"
69
+
70
+ [[rule.threat.technique]]
71
+ id = "T1078"
72
+ name = "Valid Accounts"
73
+ reference = "https://attack.mitre.org/techniques/T1078/"
74
+
75
+ [[rule.threat.technique.subtechnique]]
76
+ id = "T1078.004"
77
+ name = "Cloud Accounts"
78
+ reference = "https://attack.mitre.org/techniques/T1078/004/"
79
+
80
+ [[rule.threat]]
81
+ framework = "MITRE ATT&CK"
82
+
83
+ [rule.threat.tactic]
84
+ id = "TA0008"
85
+ name = "Lateral Movement"
86
+ reference = "https://attack.mitre.org/tactics/TA0008/"
87
+
88
+ [[rule.threat.technique]]
89
+ id = "T1021"
90
+ name = "Remote Services"
91
+ reference = "https://attack.mitre.org/techniques/T1021/"
92
+
93
+ [[rule.threat.technique.subtechnique]]
94
+ id = "T1021.007"
95
+ name = "Cloud Services"
96
+ reference = "https://attack.mitre.org/techniques/T1021/007/"
97
+
98
+ [[rule.threat]]
99
+ framework = "MITRE ATT&CK"
100
+
101
+ [rule.threat.tactic]
102
+ id = "TA0003"
103
+ name = "Persistence"
104
+ reference = "https://attack.mitre.org/tactics/TA0003/"
105
+
106
+ [[rule.threat]]
107
+ framework = "MITRE ATT&CK"
108
+
109
+ [rule.threat.tactic]
110
+ id = "TA0010"
111
+ name = "Exfiltration"
112
+ reference = "https://attack.mitre.org/tactics/TA0010/"
113
+
114
+ [[rule.threat.technique]]
115
+ id = "T1041"
116
+ name = "Exfiltration Over C2 Channel"
117
+ reference = "https://attack.mitre.org/techniques/T1041/"
@@ -0,0 +1,92 @@
1
+ [metadata]
2
+ creation_date = "2025/11/28"
3
+ integration = ["github"]
4
+ maturity = "production"
5
+ updated_date = "2025/11/28"
6
+
7
+ [rule]
8
+ author = ["Elastic"]
9
+ description = """
10
+ This rule detects the creation of a self-hosted Github runner from a first time seen user.name in the last 5 days. Adversaries
11
+ may abuse self-hosted runners to execute workflow jobs on customer infrastructure.
12
+ """
13
+ false_positives = [
14
+ "Authorized self-hosted GitHub actions runner.",
15
+ ]
16
+ from = "now-9m"
17
+ index = ["logs-github.audit-*"]
18
+ language = "kuery"
19
+ license = "Elastic License v2"
20
+ name = "New GitHub Self Hosted Action Runner"
21
+ note = """## Triage and analysis
22
+
23
+ ### Investigating New GitHub Self Hosted Action Runner
24
+
25
+ Adversaries who gain the ability to modify or trigger workflows in a linked GitHub repository can execute arbitrary commands on the runner host.
26
+
27
+ ### Possible investigation steps
28
+
29
+ - Validate the user is authoried to perform this change
30
+ - Review the purpose of the self-hosted action runner and what actions will be executed.
31
+ - Verify if there is any adjascent sensitive file access or collection.
32
+ - Correlate with other alerts and investiguate if this activity is related to a supply chain attack.
33
+
34
+ ### False positive analysis
35
+
36
+ - Authorized github self-hosted actions runner.
37
+
38
+ ### Response and remediation
39
+
40
+ - Immediately isolate the affected system from the network to prevent further unauthorized command execution and potential lateral movement.
41
+ - Terminate any suspicious child processes that were initiated by the Github actions runner.
42
+ - Conduct a thorough review of the affected system's logs and configurations to identify any unauthorized changes or additional indicators of compromise.
43
+ - Restore the system from a known good backup if any unauthorized changes or malicious activities are confirmed.
44
+ - Implement application whitelisting to prevent unauthorized execution.
45
+ - Escalate the incident to the security operations center (SOC) or incident response team for further investigation and to assess the potential impact on the broader network."""
46
+ references = [
47
+ "https://www.elastic.co/blog/shai-hulud-worm-npm-supply-chain-compromise",
48
+ "https://socket.dev/blog/shai-hulud-strikes-again-v2",
49
+ ]
50
+ risk_score = 47
51
+ rule_id = "40c34c8a-b0bc-43bc-83aa-d2b76bf129e1"
52
+ severity = "medium"
53
+ tags = [
54
+ "Domain: Cloud",
55
+ "Use Case: Threat Detection",
56
+ "Tactic: Initial Access",
57
+ "Data Source: Github",
58
+ "Resources: Investigation Guide",
59
+ ]
60
+ timestamp_override = "event.ingested"
61
+ type = "new_terms"
62
+
63
+ query = '''
64
+ event.dataset:"github.audit" and event.category:"configuration" and event.action:"enterprise.register_self_hosted_runner"
65
+ '''
66
+
67
+ [[rule.threat]]
68
+ framework = "MITRE ATT&CK"
69
+ [[rule.threat.technique]]
70
+ id = "T1195"
71
+ name = "Supply Chain Compromise"
72
+ reference = "https://attack.mitre.org/techniques/T1195/"
73
+ [[rule.threat.technique.subtechnique]]
74
+ id = "T1195.002"
75
+ name = "Compromise Software Supply Chain"
76
+ reference = "https://attack.mitre.org/techniques/T1195/002/"
77
+
78
+
79
+
80
+ [rule.threat.tactic]
81
+ id = "TA0001"
82
+ name = "Initial Access"
83
+ reference = "https://attack.mitre.org/tactics/TA0001/"
84
+
85
+
86
+ [rule.new_terms]
87
+ field = "new_terms_fields"
88
+ value = ["user.name", "github.actor_ip"]
89
+
90
+ [[rule.new_terms.history_window_start]]
91
+ field = "history_window_start"
92
+ value = "now-5d"
@@ -2,7 +2,7 @@
2
2
  creation_date = "2025/02/19"
3
3
  integration = ["o365"]
4
4
  maturity = "production"
5
- updated_date = "2025/09/26"
5
+ updated_date = "2025/11/25"
6
6
 
7
7
  [rule]
8
8
  author = ["Elastic"]
@@ -83,28 +83,38 @@ type = "esql"
83
83
  query = '''
84
84
  from logs-o365.audit-*
85
85
  | where
86
- @timestamp > now() - 14d and
87
86
  event.dataset == "o365.audit" and
88
87
  event.provider == "OneDrive" and
89
88
  event.action == "FileDownloaded" and
90
89
  o365.audit.AuthenticationType == "OAuth" and
91
90
  event.outcome == "success"
92
- | eval
93
- Esql.time_window_date_trunc = date_trunc(1 minutes, @timestamp)
94
- | keep
95
- Esql.time_window_date_trunc,
96
- o365.audit.UserId,
97
- file.name,
98
- source.ip
91
+ and (user.id is not null and o365.audit.ApplicationId is not null)
92
+ | eval session.id = coalesce(o365.audit.AppAccessContext.AADSessionId, session.id, null)
93
+ | where session.id is not null
94
+ | eval Esql.time_window_date_trunc = date_trunc(1 minutes, @timestamp)
99
95
  | stats
96
+ Esql.file_directory_values = values(file.directory),
97
+ Esql.file_extension_values = values(file.extension),
98
+ Esql.application_name_values = values(application.name),
100
99
  Esql.file_name_count_distinct = count_distinct(file.name),
100
+ Esql.o365_audit_Site_values = values(o365.audit.Site),
101
+ Esql.o365_audit_SiteUrl_values = values(o365.audit.SiteUrl),
102
+ Esql.user_domain_values = values(user.domain),
103
+ Esql.token_id_values = values(token.id),
101
104
  Esql.event_count = count(*)
102
- by
105
+ by
103
106
  Esql.time_window_date_trunc,
104
- o365.audit.UserId,
105
- source.ip
106
- | where
107
- Esql.file_name_count_distinct >= 25
107
+ user.id,
108
+ session.id,
109
+ source.ip,
110
+ o365.audit.ApplicationId
111
+ | where Esql.file_name_count_distinct >= 25
112
+ | keep
113
+ Esql.*,
114
+ user.id,
115
+ source.ip,
116
+ o365.audit.ApplicationId,
117
+ session.id
108
118
  '''
109
119
 
110
120