Commit Graph

593 Commits

Author SHA1 Message Date
Samirbous f96862587d [New] Potential Privilege Escalation in Container via Runc Init (#5964)
* [New] Potential Privilege Escalation in Container via Runc Init

Identifies audit events for `runc init` child processes where the effective user is root and the login user ID is not root.
This pattern can indicate privilege escalation or credential separation abuse inside container runtimes, where a process executes  with elevated effective privileges while retaining a non-root audit identity.

* Update privilege_escalation_container_runc_init_effective_root_auditd.toml

* Update privilege_escalation_container_runc_init_effective_root_auditd.toml

* Update privilege_escalation_container_runc_init_effective_root_auditd.toml

* Update privilege_escalation_container_runc_init_effective_root_auditd.toml

* Update privilege_escalation_container_runc_init_effective_root_auditd.toml

(cherry picked from commit 245956a8d6)
2026-05-04 21:33:44 +00:00
Samirbous 72839ffb51 [New/Tuning] Direct Kubelet API Access rules (#5996)
* [New/Tuning] Direct Kubelet API Access rules

- tuned existing rule for D4C to bump-up severity to high (low FP and very susp behavior) + added 10255 port and wss url.
- duplicated same rule logic for auditd/endpoint compatibility for both 10250 port in args and kubeletctl exec.
- added a new one using network event vs process argument for more resilience.

* ++

* Update discovery_potential_direct_kubelet_access_via_process_args.toml

* Update and rename discovery_potential_direct_kubelet_access_via_process_args.toml to lateral_movement_direct_kubelet_access_via_process_args.toml

* Update rules/linux/lateral_movement_direct_kubelet_access_via_process_args.toml

Co-authored-by: Isai <59296946+imays11@users.noreply.github.com>

* Update rules/linux/discovery_potential_kubeletctl_execution.toml

Co-authored-by: Isai <59296946+imays11@users.noreply.github.com>

* Update discovery_potential_kubeletctl_execution.toml

* Update lateral_movement_kubelet_api_connection_attempt_internal_ip.toml

* Apply suggestion from @Aegrah

Co-authored-by: Ruben Groenewoud <78494512+Aegrah@users.noreply.github.com>

* Apply suggestion from @Aegrah

Co-authored-by: Ruben Groenewoud <78494512+Aegrah@users.noreply.github.com>

---------

Co-authored-by: Isai <59296946+imays11@users.noreply.github.com>
Co-authored-by: Ruben Groenewoud <78494512+Aegrah@users.noreply.github.com>

Removed changes from:
- rules/integrations/cloud_defend/execution_kubeletctl_execution.toml
- rules/integrations/cloud_defend/execution_potential_direct_kubelet_access_via_process_args.toml

(selectively cherry picked from commit 83406d8ce1)
2026-05-04 21:20:56 +00:00
Samirbous bb420eeb26 [New] Sensitive Identity File Open by Suspicious Process via Auditd (#5982)
* [New] Sensitive Identity File Open by Suspicious Process via Auditd

Detects Auditd opened-file reads on sensitive root and cluster paths (Kubernetes token mounts, kubelet and admin kubeconfig, PKI material, shadow, root SSH keys, root cloud CLI and Docker config) when the process looks like common copy or scripting utilities or the binary runs from temp or run staging. User home paths are excluded so file watches
stay explicit and aligned with auditd:

* ++

* Update credential_access_auditd_sensitive_cloud_and_host_identity_file_open.toml

* Update credential_access_auditd_sensitive_cloud_and_host_identity_file_open.toml

* Update rules/linux/credential_access_auditd_sensitive_cloud_and_host_identity_file_open.toml

Co-authored-by: Terrance DeJesus <99630311+terrancedejesus@users.noreply.github.com>

* Apply suggestion from @imays11

Co-authored-by: Isai <59296946+imays11@users.noreply.github.com>

* Apply suggestion from @Mikaayenson

Co-authored-by: Mika Ayenson, PhD <Mikaayenson@users.noreply.github.com>

---------

Co-authored-by: Terrance DeJesus <99630311+terrancedejesus@users.noreply.github.com>
Co-authored-by: Isai <59296946+imays11@users.noreply.github.com>
Co-authored-by: Mika Ayenson, PhD <Mikaayenson@users.noreply.github.com>

(cherry picked from commit bf49a90eb0)
2026-05-03 10:27:14 +00:00
Samirbous 43734f9e37 [New] Nsenter to PID 1 Namespace via Auditd/D4C (#5988)
* [New] Nsenter to PID 1 Namespace via Auditd

we have an existing rule https://github.com/elastic/detection-rules/blob/0f521a0848420844f3af383f1dee8481d41b2e5b/rules/linux/privilege_escalation_docker_escape_via_nsenter.toml#L15 (compatible only with Elastic Defend `process.entry_leader.entry_meta.type == "container"`).

This rule is compatible with the auditd integration and scoped to Init/systemd PID namespace commonly targeted for container escape.

* Create privilege_escalation_nsenter_execution_inside_container.toml

* Update privilege_escalation_auditd_nsenter_target_host_pid.toml

* Update privilege_escalation_auditd_nsenter_target_host_pid.toml

* Update privilege_escalation_auditd_nsenter_target_host_pid.toml

* Update privilege_escalation_auditd_nsenter_target_host_pid.toml

* Update rules/linux/privilege_escalation_auditd_nsenter_target_host_pid.toml

Co-authored-by: Mika Ayenson, PhD <Mikaayenson@users.noreply.github.com>

* Update privilege_escalation_nsenter_execution_inside_container.toml

* Update privilege_escalation_auditd_nsenter_target_host_pid.toml

---------

Co-authored-by: Mika Ayenson, PhD <Mikaayenson@users.noreply.github.com>

(cherry picked from commit 838e926058)
2026-05-02 13:58:30 +00:00
Samirbous 0beff53ce9 [New/Tuning] Chroot Execution in Container Context on Linux (#5992)
* [New/Tuning] Chroot Execution in Container Context on Linux

New rule compatible with auditd and ED using process.title and process.entry_leader.entry_meta.type and tuned an existing one (bum-up severity to high).

* Update rules/linux/privilege_escalation_chroot_execution_container_context.toml

Co-authored-by: Mika Ayenson, PhD <Mikaayenson@users.noreply.github.com>

---------

Co-authored-by: Mika Ayenson, PhD <Mikaayenson@users.noreply.github.com>

(cherry picked from commit 80f3ed464c)
2026-05-02 12:47:33 +00:00
Samirbous a1c228deb8 [New] Curl or Wget Execution from Container Context (#5975)
* [New] Curl or Wget Execution from Container Context

detect execution of curl/wget from container runtime.

* Update command_and_control_auditd_curl_wget_from_container.toml

* Update command_and_control_auditd_curl_wget_from_container.toml

* Apply suggestion from @terrancedejesus

Co-authored-by: Terrance DeJesus <99630311+terrancedejesus@users.noreply.github.com>

---------

Co-authored-by: Terrance DeJesus <99630311+terrancedejesus@users.noreply.github.com>

(cherry picked from commit e0c6e715fb)
2026-05-02 10:10:44 +00:00
Samirbous 05d2e3f2ec [New] Unusual Process Connection to Docker or Containerd Socket (#6005)
* [New] Unusual Process Connection to Docker or Containerd Socket

Detects a process connecting to a container runtime Unix socket (containerd or Docker) that is not a known legitimate runtime component. Direct access to the container runtime socket allows an attacker to create, exec into, or manipulate containers without going through the Kubernetes API server, bypassing RBAC, admission webhooks, pod security standards, and Kubernetes audit logging entirely.

* Update discovery_unusual_process_connection_to_container_runtime_socket.toml

(cherry picked from commit 40213fa041)
2026-05-02 09:07:52 +00:00
Ruben Groenewoud d0865045d3 [Rule Tuning] Fixes for Unsupported Fields (#6025)
Co-authored-by: Mika Ayenson, PhD <Mikaayenson@users.noreply.github.com>

(cherry picked from commit efa3fe5911)
2026-05-01 23:03:29 +00:00
Samirbous 2ccb2a3119 [Tuning/New] Namespace Manipulation Using Unshare (#6024)
* Update privilege_escalation_unshare_namespace_manipulation.toml

* Create privilege_escalation_unshare_namespace_manip.toml

* Apply suggestion from @Aegrah

Co-authored-by: Ruben Groenewoud <78494512+Aegrah@users.noreply.github.com>

* Update privilege_escalation_unshare_namespace_manip.toml

* Update privilege_escalation_unshare_namespace_manipulation.toml

* Update privilege_escalation_unshare_namespace_manipulation.toml

---------

Co-authored-by: Ruben Groenewoud <78494512+Aegrah@users.noreply.github.com>

(cherry picked from commit ba8fa3ef0f)
2026-05-01 14:32:14 +00:00
Mika Ayenson, PhD b72bd917a0 Revert "[Tuning] Namespace Manipulation Using Unshare (#5989)" (#6023)
This reverts commit 175e043adf.

(cherry picked from commit a1458f0fd0)
2026-05-01 13:26:46 +00:00
Samirbous acd15582a6 [Tuning] Namespace Manipulation Using Unshare (#5989)
* Update privilege_escalation_unshare_namespace_manipulation.toml

* Update privilege_escalation_unshare_namespace_manipulation.toml

(cherry picked from commit 175e043adf)
2026-05-01 10:19:42 +00:00
Samirbous b5d4c9d5ea [New/Tuning] Linux LPE via SUID Shell (#5980)
* [New] Kubernetes Pod Exec with Curl or Wget to HTTPS

Detects pod or attach `exec` API calls where the decoded request query implies curl or wget fetching an https URL (avoid noisy local http services).

* Create execution_kubernetes_pod_exec_potential_reverse_shell.toml

* Update execution_kubernetes_pod_exec_curl_wget_https.toml

* Update execution_kubernetes_pod_exec_potential_reverse_shell.toml

* ++

* ++

* Add auditd rule for root-effective shell -p outside system paths; extend SUID/SGID exploitation coverage.

Made-with: Cursor

* Revert "++"

This reverts commit eb5631d80e.

* Revert "++"

This reverts commit 2d2c34ca21.

* Delete rules/integrations/kubernetes/execution_kubernetes_pod_exec_curl_wget_https.toml

* Delete rules/integrations/kubernetes/execution_kubernetes_pod_exec_potential_reverse_shell.toml

* Update privilege_escalation_auditd_euid_root_shell_from_non_standard_path.toml

* Update privilege_escalation_auditd_euid_root_shell_from_non_standard_path.toml

* Update rules/linux/privilege_escalation_auditd_euid_root_shell_from_non_standard_path.toml

Co-authored-by: Eric Forte <119343520+eric-forte-elastic@users.noreply.github.com>

* Update privilege_escalation_auditd_euid_root_shell_from_non_standard_path.toml

---------

Co-authored-by: Eric Forte <119343520+eric-forte-elastic@users.noreply.github.com>

(cherry picked from commit 6b3b84ca38)
2026-05-01 09:54:01 +00:00
Ruben Groenewoud cc182abc10 [Rule Tuning] Privilege Escalation via SUID/SGID (#6017)
Co-authored-by: Samirbous <64742097+Samirbous@users.noreply.github.com>

(cherry picked from commit 8dc3fef270)
2026-05-01 08:11:25 +00:00
Samirbous d8d1988ce0 [New] Suspicious SUID Binary Execution (#6018)
* [New] Suspicious SUDI Binary Execution

Detects execution of common privilege elevation helpers (su, sudo, pkexec, passwd, chsh, newgrp) under the root effective user when the real user and parent user are not root, combined with minimal argument counts and suspicious parent context (interpreters, short shell -c invocations, or parents running from user-writable paths) :

* Update rules/linux/privilege_escalation_suspicious_sudi_binary_execution.toml

Co-authored-by: Ruben Groenewoud <78494512+Aegrah@users.noreply.github.com>

* Update rules/linux/privilege_escalation_suspicious_sudi_binary_execution.toml

Co-authored-by: Ruben Groenewoud <78494512+Aegrah@users.noreply.github.com>

* Update privilege_escalation_suspicious_sudi_binary_execution.toml

* Update privilege_escalation_suspicious_sudi_binary_execution.toml

* Rename privilege_escalation_suspicious_sudi_binary_execution.toml to privilege_escalation_suspicious_suid_binary_execution.toml

* Update privilege_escalation_suspicious_suid_binary_execution.toml

* Update privilege_escalation_suspicious_suid_binary_execution.toml

---------

Co-authored-by: Ruben Groenewoud <78494512+Aegrah@users.noreply.github.com>

(cherry picked from commit f0467c8bed)
2026-04-30 16:40:55 +00:00
Eric Forte 059ac3b8cd [New] Potential Copy Fail (CVE-2026-31431) Exploitation via AF_ALG Socket (#6015)
* initial draft rule too noisy atm

* Switch To Sequence Rule
Co-authored-by: Samirbous <64742097+Samirbous@users.noreply.github.com>
Co-authored-by: Ruben Groenewoud <78494512+Aegrah@users.noreply.github.com>
Co-authored-by: Mika Ayenson, PhD <Mikaayenson@users.noreply.github.com>

---------

Co-authored-by: Samirbous <64742097+Samirbous@users.noreply.github.com>
Co-authored-by: Ruben Groenewoud <78494512+Aegrah@users.noreply.github.com>
Co-authored-by: Mika Ayenson, PhD <Mikaayenson@users.noreply.github.com>

(cherry picked from commit 3371938045)
2026-04-30 16:26:50 +00:00
Ruben Groenewoud 03cbf70b10 [New Rules] False Negatives for New BPFDoor Variants (#5939)
* [New Rules] False Negatives for New BPFDoor Variants

* Update defense_evasion_file_creation_world_writeable_dir_by_unusual_process.toml

* Update defense_evasion_file_creation_world_writeable_dir_by_unusual_process.toml

* IG Additions

---------

Co-authored-by: Colson Wilhoit <48036388+DefSecSentinel@users.noreply.github.com>

(cherry picked from commit 4512ec1735)
2026-04-22 06:06:38 +00:00
Terrance DeJesus 906c43891c [Rule Tuning] Change event.dataset to data_stream.dataset (#5943)
* [Rule Tuning] Change event.dataset to data_stream.dataset

* updating ESQL field names

Removed changes from:
- rules/cross-platform/execution_d4c_k8s_mda_direct_interactive_kubernetes_api_request_by_usual_utilities.toml
- rules/cross-platform/execution_d4c_k8s_mda_forbidden_direct_interactive_kubernetes_api_request.toml
- rules/cross-platform/execution_d4c_k8s_mda_kubernetes_api_activity_by_unusual_utilities.toml
- rules/cross-platform/execution_d4c_k8s_mda_service_account_token_access_followed_by_kubernetes_api_request.toml
- rules/cross-platform/initial_access_elastic_defend_alert_genai_utility_descendant.toml
- rules/cross-platform/initial_access_elastic_defend_alert_package_manager_ancestor.toml
- rules/cross-platform/multiple_alerts_llm_compromised_user_triage.toml
- rules/cross-platform/multiple_elastic_defend_behavior_rules_same_host_prevalence.toml

(selectively cherry picked from commit deab1c0161)
2026-04-10 16:31:06 +00:00
Ruben Groenewoud 33cfadaaba [Rule Tuning] Potential snap-confine Privilege Escalation (#5889)
* [Rule Tuning] Potential snap-confine Privilege Escalation via CVE-2026-3888

* ++

(cherry picked from commit 778781cc13)
2026-04-02 09:24:06 +00:00
Mika Ayenson, PhD 44f69a586b [Rule Tuning] Add Supplemental Mitre Mappings (#5876)
---------

Co-authored-by: Ruben Groenewoud <78494512+Aegrah@users.noreply.github.com>
Co-authored-by: Isai <59296946+imays11@users.noreply.github.com>
Co-authored-by: terrancedejesus <terrance.dejesus@elastic.co>
Co-authored-by: Jonhnathan <26856693+w0rk3r@users.noreply.github.com>
Co-authored-by: eric-forte-elastic <eric.forte@elastic.co>

Removed changes from:
- rules/cross-platform/command_and_control_kubectl_networking_modification.toml
- rules/cross-platform/defense_evasion_potential_kubectl_impersonation.toml
- rules/cross-platform/defense_evasion_potential_kubectl_masquerading.toml
- rules/cross-platform/discovery_kubectl_permission_discovery.toml
- rules/cross-platform/execution_d4c_k8s_mda_direct_interactive_kubernetes_api_request_by_usual_utilities.toml
- rules/cross-platform/execution_d4c_k8s_mda_forbidden_direct_interactive_kubernetes_api_request.toml
- rules/cross-platform/execution_d4c_k8s_mda_kubernetes_api_activity_by_unusual_utilities.toml
- rules/cross-platform/execution_d4c_k8s_mda_service_account_token_access_followed_by_kubernetes_api_request.toml
- rules/cross-platform/execution_kubernetes_direct_api_request_via_curl_or_wget.toml
- rules/integrations/azure/ml_azure_rare_method_by_city.toml
- rules/integrations/azure/ml_azure_rare_method_by_country.toml
- rules/integrations/azure/ml_azure_rare_method_by_user.toml
- rules/integrations/cloud_defend/command_and_control_curl_socks_proxy_detected_inside_container.toml
- rules/integrations/cloud_defend/command_and_control_interactive_file_download_from_internet.toml
- rules/integrations/cloud_defend/command_and_control_tunneling_and_port_forwarding.toml
- rules/integrations/cloud_defend/credential_access_cloud_creds_search_inside_a_container.toml
- rules/integrations/cloud_defend/credential_access_collection_sensitive_files_compression_inside_a_container.toml
- rules/integrations/cloud_defend/credential_access_sensitive_keys_or_passwords_search_inside_a_container.toml
- rules/integrations/cloud_defend/credential_access_service_account_token_or_cert_read.toml
- rules/integrations/cloud_defend/defense_evasion_decoded_payload_piped_to_interpreter.toml
- rules/integrations/cloud_defend/defense_evasion_file_creation_execution_deletion_cradle.toml
- rules/integrations/cloud_defend/defense_evasion_interactive_process_execution_from_suspicious_directory.toml
- rules/integrations/cloud_defend/defense_evasion_ld_preload_shared_object_modified_inside_a_container.toml
- rules/integrations/cloud_defend/defense_evasion_potential_evasion_via_encoded_payload.toml
- rules/integrations/cloud_defend/discovery_dns_enumeration.toml
- rules/integrations/cloud_defend/discovery_environment_enumeration.toml
- rules/integrations/cloud_defend/discovery_kubelet_certificate_file_access.toml
- rules/integrations/cloud_defend/discovery_kubelet_pod_discovery_via_builtin_utilities.toml
- rules/integrations/cloud_defend/discovery_privilege_boundary_enumeration_from_interactive_process.toml
- rules/integrations/cloud_defend/discovery_service_account_namespace_read.toml
- rules/integrations/cloud_defend/discovery_suspicious_network_tool_launched_inside_a_container.toml
- rules/integrations/cloud_defend/execution_container_management_binary_launched_inside_a_container.toml
- rules/integrations/cloud_defend/execution_direct_interactive_kubernetes_api_request.toml
- rules/integrations/cloud_defend/execution_interactive_file_creation_in_system_binary_locations.toml
- rules/integrations/cloud_defend/execution_kubeletctl_execution.toml
- rules/integrations/cloud_defend/execution_netcat_listener_established_inside_a_container.toml
- rules/integrations/cloud_defend/execution_payload_downloaded_and_piped_to_shell.toml
- rules/integrations/cloud_defend/execution_potential_direct_kubelet_access_via_process_args.toml
- rules/integrations/cloud_defend/execution_suspicious_file_made_executable_via_chmod_inside_a_container.toml
- rules/integrations/cloud_defend/execution_suspicious_interactive_interpreter_command_execution.toml
- rules/integrations/cloud_defend/execution_tool_installation.toml
- rules/integrations/cloud_defend/persistence_modification_of_persistence_relevant_files.toml
- rules/integrations/cloud_defend/persistence_ssh_authorized_keys_modification_inside_a_container.toml
- rules/integrations/cloud_defend/persistence_suspicious_echo_or_printf_execution.toml
- rules/integrations/cloud_defend/persistence_suspicious_webserver_child_process_execution.toml
- rules/integrations/cloud_defend/privilege_escalation_debugfs_launched_inside_a_privileged_container.toml
- rules/integrations/cloud_defend/privilege_escalation_potential_container_escape_via_modified_release_agent_file.toml
- rules/integrations/gcp/ml_gcp_rare_method_by_city.toml
- rules/integrations/gcp/ml_gcp_rare_method_by_country.toml
- rules/integrations/gcp/ml_gcp_rare_method_by_user.toml
- rules/linux/discovery_docker_socket_discovery.toml
- rules/linux/discovery_kubeconfig_file_discovery.toml
- rules/linux/execution_kubectl_apply_pod_from_url.toml
- rules/linux/lateral_movement_kubeconfig_file_activity.toml
- rules/linux/persistence_kubernetes_sensitive_file_activity.toml
- rules_building_block/discovery_kubectl_workload_and_cluster_discovery.toml

(selectively cherry picked from commit 8993d1450b)
2026-04-01 14:15:58 +00:00
Ruben Groenewoud 8f495edf9b [Rule Tuning] Python Path File (pth) Creation (#5880)
* [Rule Tuning] Python Path File (pth) Creation

* ++

* ++

* ++

---------

Co-authored-by: Samirbous <64742097+Samirbous@users.noreply.github.com>

(cherry picked from commit befd78524e)
2026-03-26 16:00:18 +00:00
Samirbous 8f8f6ed323 [Tuning] Expand compatibility to extra OS (#5883)
* Update and rename exfiltration_potential_curl_data_exfiltration.toml to exfiltration_potential_curl_data_exfiltration.toml

* Update exfiltration_potential_curl_data_exfiltration.toml

* Update exfiltration_potential_curl_data_exfiltration.toml

* Update exfiltration_potential_curl_data_exfiltration.toml

* Update execution_kubernetes_direct_api_request_via_curl_or_wget.toml

* ++

* ++

* Update rules/cross-platform/execution_kubernetes_direct_api_request_via_curl_or_wget.toml

Co-authored-by: Ruben Groenewoud <78494512+Aegrah@users.noreply.github.com>

* Update rules/cross-platform/discovery_kubectl_secrets_all_namespaces.toml

Co-authored-by: Ruben Groenewoud <78494512+Aegrah@users.noreply.github.com>

* Update rules/cross-platform/exfiltration_potential_curl_data_exfiltration.toml

Co-authored-by: Ruben Groenewoud <78494512+Aegrah@users.noreply.github.com>

---------

Co-authored-by: Ruben Groenewoud <78494512+Aegrah@users.noreply.github.com>

Removed changes from:
- rules/linux/command_and_control_kubectl_networking_modification.toml
- rules/linux/defense_evasion_potential_kubectl_impersonation.toml
- rules/linux/defense_evasion_potential_kubectl_masquerading.toml
- rules/linux/discovery_kubectl_permission_discovery.toml
- rules/linux/execution_kubernetes_direct_api_request_via_curl_or_wget.toml

(selectively cherry picked from commit 5d5e1d9ca4)
2026-03-26 12:13:20 +00:00
shashank-elastic fdbe0fa3ac Add investigation guide for database dumping activity (#5871)
(cherry picked from commit 07ccecb94b)
2026-03-23 16:55:59 +00:00
Ruben Groenewoud 9fc8bc1527 [New Rules] AppArmor Exploitation (CrackArmor) (#5842)
* [New Rule] AppArmor Profile Compilation via apparmor_parser

* [New Rule] Suspicious Write Attempt to AppArmor Policy Management Files

* ++

* 2 more rules for Auditd

* ++

* Update defense_evasion_apparmor_profile_compilation.toml

* Apply suggestion from @Aegrah

* Update rules/linux/defense_evasion_apparmor_profile_compilation.toml

(cherry picked from commit 5216bf2d0c)
2026-03-23 08:40:50 +00:00
Ruben Groenewoud 87b4501859 [New Rule] Potential snap-confine Privilege Escalation via CVE-2026-3888 (#5845)
* [New Rule] Potential snap-confine Privilege Escalation via CVE-2026-3888

* Added IG

* ++

* ++

* IG fix

(cherry picked from commit de6eb0f10d)
2026-03-20 08:37:30 +00:00
Ruben Groenewoud 5bcc899513 [New/Tuning] New DB Dump Rule & Tuning wget/curl DRs (#5832)
* [Rule Tuning] Tuning wget/curl DRs

* [New Rule] Potential Database Dumping Activity

* Update exfiltration_potential_curl_data_exfiltration.toml

* Expand URL patterns in curl data exfiltration rule

* Update rules/linux/exfiltration_potential_wget_data_exfiltration.toml

Co-authored-by: Samirbous <64742097+Samirbous@users.noreply.github.com>

* Simplify process name conditions for database dumping

---------

Co-authored-by: Samirbous <64742097+Samirbous@users.noreply.github.com>

(cherry picked from commit a4b614c681)
2026-03-19 13:01:21 +00:00
Ruben Groenewoud 44f0ceeae9 [Rule Tuning] Dynamic Linker Copy (#5841)
(cherry picked from commit 5d3e17eaff)
2026-03-17 16:18:13 +00:00
Ruben Groenewoud 1d2d55723e [Rule Tuning] Base64 Decoded Payload Piped to Interpreter (#5811)
(cherry picked from commit 99bdb22a8d)
2026-03-09 14:09:33 +00:00
Ruben Groenewoud f0b3313ce0 [Rule Tuning] agent.id --> host.id new_terms Key Modification (#5802)
* [Rule Tuning] `agent.id` --> `host.id` Migration

* Updated_date bump

(cherry picked from commit aaf99b1873)
2026-03-02 12:27:33 +00:00
Eric Forte 80a2570ea0 [Rule Tuning] Telnet Authentication Bypass Rule Tuning (#5771)
* Add xinetd in process names

(cherry picked from commit 4201fe6f8a)
2026-02-25 20:46:45 +00:00
Ruben Groenewoud 85fcbc2798 [New Rules] Kernel Discovery & BPF Load/Tampering via bpftool (#5743)
* [New Rules] BPF Load & Tampering via bpftool

* Update persistence_bpf_program_or_map_load.toml

* [New Rule] Kernel Instrumentation Discovery via kprobes and tracefs

* Update defense_evasion_bpf_program_tampering.toml

* Update persistence_bpf_program_or_map_load.toml

* Enhance note with investigation and response details

Added detailed investigation guide and response steps for kernel instrumentation discovery via kprobes and tracefs.

(cherry picked from commit c349c8eca7)
2026-02-23 15:36:42 +00:00
Ruben Groenewoud f7b949c3a9 [New/Tuning] New LKM Load Rule & FN Tuning Tunneling Rules (#5742)
* [New/Tuning] New LKM Load Rule & FN Tuning Tunneling Rules

* ++

* Update persistence_kernel_module_load_from_unusual_location.toml

* Update persistence_kernel_module_load_from_unusual_location.toml

* Apply suggestion from @Aegrah

* Update persistence_kernel_module_load_from_unusual_location.toml

(cherry picked from commit 56c737c1d0)
2026-02-23 09:04:58 +00:00
Ruben Groenewoud 960eb209d0 [Rule Tuning] Kernel Module Load via Built-in Utility (#5736)
* [Rule Tuning] Kernel Module Load via Built-in Utility

* Apply suggestion from @eric-forte-elastic

Co-authored-by: Eric Forte <119343520+eric-forte-elastic@users.noreply.github.com>

* Refine process.args conditions for modprobe

* Refactor notes and references in kernel module load rule

Removed detailed notes and investigation steps related to kernel module loading via insmod utility. Updated note section and added a reference link.

* Update persistence_insmod_kernel_module_load.toml

* Update persistence_insmod_kernel_module_load.toml

* Update kernel module load rule for clarity and tactics

---------

Co-authored-by: Eric Forte <119343520+eric-forte-elastic@users.noreply.github.com>

(cherry picked from commit e012e88342)
2026-02-23 08:51:10 +00:00
Ruben Groenewoud 6cdff4389c [Rule Tuning] System Information Discovery via dmidecode from Parent Shell (#5732)
(cherry picked from commit 0c7e6516f9)
2026-02-17 16:53:26 +00:00
Ruben Groenewoud 7bfa2fbfb2 [Rule Tuning] Dormant & Deprecated Rule Clean-Up (#5672)
* Updated kubernetes.audit.requestObject.spec.containers.image type of text to Keyword

* [Rule Tuning] Dormant & Deprecated Rule Clean-Up

* [Rule Tuning] Dormant & Deprecated Rule Clean-Up

* Few more deprecations

* ++

* Update unit test syntax fix

* Update bad bytes

* ++

(cherry picked from commit 3cba3d7982)
2026-02-05 12:27:46 +00:00
Samirbous dfdb8fa24a [Tuning] ESQL Dynamic unique value fields (#5569)
* [Tuning] Extract dynamic field with 1 value to ECS fields for alerts exclusion

Extract dynamic field with 1 value to ECS fields for alerts exclusion:

Esql.host_id_values -> host.is
Esql.agent_id_values -> agent.id
Esql.host_name_values -> host.name

* Update multiple_alerts_by_host_ip_and_source_ip.toml

* Update newly_observed_elastic_defend_alert.toml

* Update defense_evasion_base64_decoding_activity.toml

* Update discovery_subnet_scanning_activity_from_compromised_host.toml

* Update persistence_web_server_sus_command_execution.toml

* Update persistence_web_server_sus_child_spawned.toml

* Update rules/cross-platform/multiple_alerts_elastic_defend_netsecurity_by_host.toml

Co-authored-by: Mika Ayenson, PhD <Mikaayenson@users.noreply.github.com>

* Update rules/linux/impact_potential_bruteforce_malware_infection.toml

Co-authored-by: Mika Ayenson, PhD <Mikaayenson@users.noreply.github.com>

* Update rules/linux/command_and_control_frequent_egress_netcon_from_sus_executable.toml

Co-authored-by: Mika Ayenson, PhD <Mikaayenson@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Mika Ayenson, PhD <Mikaayenson@users.noreply.github.com>

* Update rules/cross-platform/multiple_alerts_elastic_defend_netsecurity_by_host.toml

Co-authored-by: Mika Ayenson, PhD <Mikaayenson@users.noreply.github.com>

* Update rules/cross-platform/newly_observed_elastic_defend_alert.toml

Co-authored-by: Mika Ayenson, PhD <Mikaayenson@users.noreply.github.com>

* Update rules/cross-platform/newly_observed_elastic_detection_rule.toml

Co-authored-by: Mika Ayenson, PhD <Mikaayenson@users.noreply.github.com>

* Update rules/windows/credential_access_rare_webdav_destination.toml

Co-authored-by: Mika Ayenson, PhD <Mikaayenson@users.noreply.github.com>

* Update credential_access_rare_webdav_destination.toml

---------

Co-authored-by: Mika Ayenson, PhD <Mikaayenson@users.noreply.github.com>

(cherry picked from commit 88e0b14709)
2026-01-26 16:37:21 +00:00
Ruben Groenewoud 177a3a2443 [Rule Tuning] Several Community DR Issues (#5615)
* [Rule Tuning] Suspicious Network Connection via systemd

* [Rule Tuning] Systemd-udevd Rule File Creation

* ++

(cherry picked from commit 6626475119)
2026-01-26 16:11:54 +00:00
Mika Ayenson, PhD 295b363171 Revert "[Rule Tuning] Adding D4C Compatibility to Compatible K8s-related Rules (#5578)" (#5620)
This reverts commit c608b673bf.

(cherry picked from commit bbe83452b4)
2026-01-26 14:34:57 +00:00
Ruben Groenewoud cb65831518 [Rule Tuning] Adding D4C Compatibility to Compatible K8s-related Rules (#5578)
* [Rule Tuning] Adding D4C Compatibility to Compatible K8s-related Rules

* Update manifests & schemas

* [New/Updated] Migrated `process.command_line` --> `process.args` for Compatibility

* Pyproject.toml Patch

* ++

(cherry picked from commit c608b673bf)
2026-01-26 12:31:09 +00:00
Samirbous b351dae051 [New] Potential Telnet Authentication Bypass (CVE-2026-24061) (#5612)
* [New] Potential Telnet Authentication Bypass (CVE-2026-24061)

https://www.safebreach.com/blog/safebreach-labs-root-cause-analysis-and-poc-exploit-for-cve-2026-24061/"

https://security-tracker.debian.org/tracker/CVE-2026-24061

* Update lateral_movement_telnet_auth_bypass_via_envar.toml

* Update lateral_movement_telnet_auth_bypass_via_envar.toml

* Update lateral_movement_telnet_auth_bypass_via_envar.toml

* Apply suggestion from @Aegrah

Co-authored-by: Ruben Groenewoud <78494512+Aegrah@users.noreply.github.com>

* Update initial_access_telnet_auth_bypass_via_user_envar.toml

* Update rules/linux/initial_access_telnet_auth_bypass_via_user_envar.toml

* added rule for auditd

* Update rules/linux/initial_access_telnet_auth_bypass_envar_auditd.toml

* Update rules/linux/initial_access_telnet_auth_bypass_envar_auditd.toml

* Update initial_access_telnet_auth_bypass_envar_auditd.toml

---------

Co-authored-by: Ruben Groenewoud <78494512+Aegrah@users.noreply.github.com>

(cherry picked from commit 3497c7b0b5)
2026-01-26 10:21:21 +00:00
ailiffa 7bf418d498 [Rule Tuning] Potential Disabling of AppArmor - Restore AppArmor service filters (#5574)
(cherry picked from commit e459d8c25a)
2026-01-19 12:22:27 +00:00
shashank-elastic 49e6970d22 Prep for Release 9.3 (#5548)
Removed changes from:
- detection_rules/etc/packages.yaml

(selectively cherry picked from commit 1ce072a4e5)
2026-01-12 15:40:35 +00:00
Ruben Groenewoud b372bb99a6 [New/Tuning] Several New Linux Rules (#5531)
* [New/Tuning] Several New Linux Rules

* Update collection_potential_video_recording_or_screenshot_activity.toml

* Update discovery_dmidecode_system_discovery.toml

* Update rules/linux/collection_potential_audio_recording_activity.toml

Co-authored-by: Eric Forte <119343520+eric-forte-elastic@users.noreply.github.com>

* Update exfiltration_potential_wget_data_exfiltration.toml

* [New Rule] Linux User or Group Deletion

---------

Co-authored-by: Eric Forte <119343520+eric-forte-elastic@users.noreply.github.com>

(cherry picked from commit 11769a4be3)
2026-01-08 15:04:35 +00:00
Ruben Groenewoud ca9415d7c5 [New Rule] Potential Password Spraying Attack via SSH (#5515)
* [New Rule] Potential Password Spraying Attack via SSH

* ++

* Update rules/linux/credential_access_potential_password_spraying_attack.toml

Co-authored-by: Jonhnathan <26856693+w0rk3r@users.noreply.github.com>

* Update credential_access_potential_password_spraying_attack.toml

* Update credential_access_potential_password_spraying_attack.toml

* Change time bucket duration from 1 to 5 minutes

---------

Co-authored-by: Jonhnathan <26856693+w0rk3r@users.noreply.github.com>

(cherry picked from commit ee936cb154)
2026-01-08 12:47:53 +00:00
Ruben Groenewoud e3fbfd0569 [Rule Tuning] Linux DR Tuning - 3 (#5483)
* [Rule Tuning] Linux DR Tuning - 3

* Update rules/linux/credential_access_aws_creds_search_inside_container.toml

* Adjust thresholds and expand event action handling

* Update credential_access_potential_linux_ssh_bruteforce_external.toml

* Increase threshold for SSH brute force detection

* Update credential_access_potential_linux_ssh_bruteforce_internal.toml

* Update credential_access_ssh_backdoor_log.toml

Removed 'auditbeat-*' from the index list.

* Refactor credential access rule for clarity

Removed redundant event.action expansion and filtering logic.

* Refactor ESQL query for SSH brute force detection

Refactor ESQL query to improve readability and maintainability by moving the event.action expansion and filtering logic.

* Update credential_access_potential_linux_ssh_bruteforce_internal.toml

* Update credential_access_potential_successful_linux_ftp_bruteforce.toml

* Update credential_access_potential_successful_linux_rdp_bruteforce.toml

* Update credential_access_potential_linux_ssh_bruteforce_internal.toml

* Add time window truncation to bruteforce rule

* Add time window truncation to SSH brute force rule

* Update credential_access_potential_linux_ssh_bruteforce_internal.toml

* Update SSH brute force detection rule to EQL

* Update CIDR match conditions for SSH brute force rule

* Update EQL query for SSH brute force detection

(cherry picked from commit 1c1632e0b9)
2026-01-08 12:36:38 +00:00
Ruben Groenewoud f396f0ff47 [Rule Tuning] Linux DR Tuning - 7 (#5504)
* [Rule Tuning] Linux DR Tuning - 7

* Update execution_egress_connection_from_entrypoint_in_container.toml

* Update execution_kubernetes_direct_api_request_via_curl_or_wget.toml

* Update rules/linux/execution_perl_tty_shell.toml

* Update execution_perl_tty_shell.toml

* Update rules/linux/execution_unix_socket_communication.toml

* Update execution_file_made_executable_via_chmod_inside_container.toml

* Remove duplicate Crowdstrike data source entry

---------

Co-authored-by: Colson Wilhoit <48036388+DefSecSentinel@users.noreply.github.com>

(cherry picked from commit e1698890a4)
2026-01-08 10:14:32 +00:00
Ruben Groenewoud 88c9d804fb [Rule Tuning] Linux DR Tuning - 6 (#5497)
* [Rule Tuning] Linux DR Tuning - 6

* Fix syntax error in discovery_esxi_software_via_grep.toml

* Update discovery_pam_version_discovery.toml

* Update discovery_virtual_machine_fingerprinting.toml

* Revise investigation title for kernel module enumeration

Updated the title of the investigation section to clarify focus on unusual kernel module enumeration.

* Update discovery_port_scanning_activity_from_compromised_host.toml

* Enhance ESQL query for subnet scanning detection

Updated ESQL query to include additional fields and conditions for better analysis of connection attempts from compromised hosts.

* Remove Elastic Endgame data source from rule

---------

Co-authored-by: Colson Wilhoit <48036388+DefSecSentinel@users.noreply.github.com>

(cherry picked from commit ccd3f70ee8)
2026-01-08 09:49:22 +00:00
Ruben Groenewoud 19e7c98786 [Rule Tuning] Linux DR Tuning - 4 (#5484)
* [Rule Tuning] Linux DR Tuning - 4

* Update defense_evasion_file_mod_writable_dir.toml

* Update command_and_control_frequent_egress_netcon_from_sus_executable.toml

* Remove duplicate host.name entry in TOML file

* Fix formatting in defense_evasion_file_mod_writable_dir.toml

* Update command_and_control_frequent_egress_netcon_from_sus_executable.toml

* Add additional fields to base64 decoding activity rule

---------

Co-authored-by: Colson Wilhoit <48036388+DefSecSentinel@users.noreply.github.com>

(cherry picked from commit c2747b0b29)
2026-01-08 09:14:48 +00:00
Ruben Groenewoud 4b5db2b1f5 [Rule Tuning] Linux DR Tuning - 8 (#5505)
* [Rule Tuning] Linux DR Tuning - 8

* Revise investigation guide for THC tool downloads

Updated investigation guide to reflect THC tool instead of SSH-IT worm. Enhanced description for clarity.

* Update exfiltration_unusual_file_transfer_utility_launched.toml

* Refine ESQL query for brute force malware detection

Updated the query to include additional fields and modified the conditions for filtering events.

---------

Co-authored-by: Colson Wilhoit <48036388+DefSecSentinel@users.noreply.github.com>

(cherry picked from commit b13afcdeaa)
2026-01-08 09:05:06 +00:00
Ruben Groenewoud d2439bb4ea [Rule Tuning] Linux DR Tuning - 10 (#5510)
* [Rule Tuning] Linux DR Tuning - 10

* Update persistence_udev_rule_creation.toml

* Refactor ESQL query for Linux process events

* Refactor query in persistence_web_server_sus_command_execution rule

Removed unnecessary fields from the query and added new fields for event dataset and data stream namespace.

* Update persistence_systemd_netcon.toml

* Update persistence_web_server_sus_child_spawned.toml

* Refactor process.parent.name conditions in TOML file

* Update persistence_web_server_unusual_command_execution.toml

* Update persistence_web_server_unusual_command_execution.toml

---------

Co-authored-by: Colson Wilhoit <48036388+DefSecSentinel@users.noreply.github.com>

(cherry picked from commit d968f62a5a)
2026-01-08 08:36:28 +00:00
Ruben Groenewoud 6b3c102003 [Rule Tuning] Linux DR Tuning - 11 (#5511)
* [Rule Tuning] Linux DR Tuning - 11

* Update privilege_escalation_potential_suid_sgid_exploitation.toml

* Update rules/linux/privilege_escalation_suspicious_uid_guid_elevation.toml

* Update privilege_escalation_docker_escape_via_nsenter.toml

---------

Co-authored-by: Colson Wilhoit <48036388+DefSecSentinel@users.noreply.github.com>

(cherry picked from commit 80ee91b0f2)
2026-01-07 15:35:05 +00:00