Commit Graph

275 Commits

Author SHA1 Message Date
Ruben Groenewoud ce984b8531 [Rule Tuning] Potential Reverse Shell via UDP (#3508)
(cherry picked from commit a6028b43b3)
2024-03-21 12:55:46 +00:00
Ruben Groenewoud 9f234eecc7 [New Rules] mprotect() RWX Binary Execution (#3507)
* [New Rules] mprotect() RWX Binary Execution

* Added rule names

* Update execution_netcon_from_rwx_mem_region_binary.toml

* Update execution_unknown_rwx_mem_region_binary_executed.toml

* Update execution_unknown_rwx_mem_region_binary_executed.toml

* Update execution_netcon_from_rwx_mem_region_binary.toml

* Update execution_netcon_from_rwx_mem_region_binary.toml

(cherry picked from commit 4179180fcb)
2024-03-13 21:17:57 +00:00
Ruben Groenewoud 578e86eeae [Tuning] event.action and event.type change (#3495)
Co-authored-by: Terrance DeJesus <99630311+terrancedejesus@users.noreply.github.com>

Removed changes from:
- rules/linux/discovery_process_capabilities.toml
- rules/linux/privilege_escalation_enlightenment_window_manager.toml
- rules/linux/privilege_escalation_gdb_sys_ptrace_elevation.toml
- rules/linux/privilege_escalation_gdb_sys_ptrace_netcon.toml
- rules/linux/privilege_escalation_suspicious_chown_fowner_elevation.toml
- rules/linux/privilege_escalation_suspicious_uid_guid_elevation.toml
- rules_building_block/discovery_capnetraw_capability.toml
- rules_building_block/persistence_cap_sys_admin_added_to_new_binary.toml

(selectively cherry picked from commit 9f8638a004)
2024-03-13 09:16:15 +00:00
Jonhnathan b1989a921b [Security Content] Small tweaks on the setup guides (#3308)
* [Security Content] Small tweaks on the setup guides

* Additional Fixes

* Avoid touching deprecated rules

Removed changes from:
- rules/integrations/beaconing/command_and_control_beaconing.toml
- rules/integrations/beaconing/command_and_control_beaconing_high_confidence.toml
- rules/linux/discovery_process_capabilities.toml
- rules/linux/privilege_escalation_dac_permissions.toml
- rules/linux/privilege_escalation_enlightenment_window_manager.toml
- rules/linux/privilege_escalation_gdb_sys_ptrace_elevation.toml
- rules/linux/privilege_escalation_gdb_sys_ptrace_netcon.toml
- rules/linux/privilege_escalation_suspicious_chown_fowner_elevation.toml
- rules/linux/privilege_escalation_suspicious_uid_guid_elevation.toml
- rules_building_block/discovery_capnetraw_capability.toml
- rules_building_block/persistence_cap_sys_admin_added_to_new_binary.toml

(selectively cherry picked from commit 458e67918a)
2024-03-11 12:14:53 +00:00
Ruben Groenewoud 2faa844301 [Tuning] Linux DR Tuning - Part 12 (#3464)
* [Tuning] Linux DR Tuning - Part 12

* Update persistence_shared_object_creation.toml

* Update privilege_escalation_dac_permissions.toml

* Update privilege_escalation_enlightenment_window_manager.toml

* Update privilege_escalation_enlightenment_window_manager.toml

* Min stack rule-bending test

* formatting fix

* Revert "Merge branch 'linux-dr-tuning-12' of https://github.com/elastic/detection-rules into linux-dr-tuning-12"

This reverts commit 0170cddd905b4b983f8413eebbc11c9c7b3719ce, reversing
changes made to 29d4a747603faf0ac7c2d502786533b0cd93a5d5.

* Revert "Min stack rule-bending test"

This reverts commit 29d4a747603faf0ac7c2d502786533b0cd93a5d5.

* Update privilege_escalation_enlightenment_window_manager.toml

* Update privilege_escalation_chown_chmod_unauthorized_file_read.toml

---------

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

Removed changes from:
- rules/linux/privilege_escalation_dac_permissions.toml

(selectively cherry picked from commit 9c4ba4559d)
2024-03-07 17:14:43 +00:00
Ruben Groenewoud 42dc87f2fb [Tuning] Linux DR Tuning - Part 14 (#3467)
* [Tuning] Linux DR Tuning - Part 14

* Update privilege_escalation_sudo_cve_2019_14287.toml

---------

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

(cherry picked from commit ed4a7fc15b)
2024-03-07 15:50:43 +00:00
Ruben Groenewoud a4af210ce5 [Tuning] Linux DR Tuning - Part 13 (#3465)
* [Tuning] Linux DR Tuning - Part 13

* updated date bump

* Update privilege_escalation_load_and_unload_of_kernel_via_kexec.toml

* Update privilege_escalation_netcon_via_sudo_binary.toml

* Update privilege_escalation_load_and_unload_of_kernel_via_kexec.toml

* Update rules/linux/privilege_escalation_shadow_file_read.toml

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

---------

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

(cherry picked from commit 60fda8d756)
2024-03-07 15:33:19 +00:00
Ruben Groenewoud 3c1ecce6dc [Tuning] Linux DR Tuning - Part 11 (#3463)
* [Tuning] Linux DR Tuning - Part 11

* Update persistence_message_of_the_day_creation.toml

* Update persistence_message_of_the_day_execution.toml

* Update rules/linux/persistence_message_of_the_day_execution.toml

* Update persistence_linux_user_added_to_privileged_group.toml

---------

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

(cherry picked from commit ef66c57030)
2024-03-07 11:25:29 +00:00
Ruben Groenewoud 5506f1bb26 [Tuning] Linux DR Tuning - Part 10 (#3462)
* [Tuning] Linux DR Tuning - Part 10

* updated_date bump

* Update persistence_kworker_file_creation.toml

* Update persistence_linux_backdoor_user_creation.toml

---------

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

(cherry picked from commit a76a3755d9)
2024-03-07 10:49:53 +00:00
Ruben Groenewoud 6d7c604257 [Tuning] Linux DR Tuning - Part 9 (#3461)
* [Tuning] Linux DR Tuning - Part 9

* Update persistence_credential_access_modify_ssh_binaries.toml

* Update lateral_movement_ssh_it_worm_download.toml

---------

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

(cherry picked from commit fd84573212)
2024-03-07 10:38:57 +00:00
Ruben Groenewoud aed3f6a735 [Tuning] Linux DR Tuning - Part 8 (#3460)
* [Tuning] Linux DR Tuning - Part 8

* Update impact_esxi_process_kill.toml

---------

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

(cherry picked from commit 08f946b394)
2024-03-07 10:05:56 +00:00
Ruben Groenewoud 0950594b49 [Tuning] Linux DR Tuning - Part 7 (#3458)
* [Tuning] Linux DR Tuning - Part 7

* Update execution_potential_hack_tool_executed.toml

---------

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

(cherry picked from commit c537fb9c22)
2024-03-07 09:51:37 +00:00
Ruben Groenewoud a0e8e5569d [Tuning] Linux DR Tuning - Part 6 (#3457)
* [Tuning] Linux DR Tuning - Part 6

* Update discovery_ping_sweep_detected.toml

---------

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

Removed changes from:
- rules/linux/discovery_process_capabilities.toml

(selectively cherry picked from commit f37a3bfd48)
2024-03-07 09:13:51 +00:00
Ruben Groenewoud fa13b92aca [Tuning] Linux DR Tuning - Part 5 (#3456)
* [Tuning] Linux DR Tuning - Part 6

* Update discovery_dynamic_linker_via_od.toml

* Update discovery_esxi_software_via_find.toml

* Update discovery_esxi_software_via_grep.toml

* Update discovery_linux_hping_activity.toml

* Update discovery_linux_nping_activity.toml

---------

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

(cherry picked from commit ae3f4737ab)
2024-03-07 08:59:03 +00:00
Ruben Groenewoud 1136d2f3c7 [Tuning] Auditbeat event.action Compatibility (#3471)
Co-authored-by: Colson Wilhoit <48036388+DefSecSentinel@users.noreply.github.com>

(cherry picked from commit 83abf8d42c)
2024-03-06 14:33:41 +00:00
Ruben Groenewoud 2bd89801ee [BBR Promotion] Linux BBR --> DR Promotion (#3472)
* [BBR Promotion] Linux BBR --> DR Promotion

* [BBR Promotion] Linux BBR --> DR Promotion

---------

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

(cherry picked from commit 5a80423003)
2024-03-06 13:54:31 +00:00
Ruben Groenewoud a04dfbd1ef [Tuning] Linux DR Tuning - Part 4 (#3455)
* [Tuning] Linux DR Tuning - Part 4

* Update defense_evasion_file_mod_writable_dir.toml

* Update defense_evasion_hidden_file_dir_tmp.toml

(cherry picked from commit 089e6671aa)
2024-02-20 14:43:36 +00:00
Ruben Groenewoud 3183bfea23 [Tuning] Event.dataset removal & Tag Addition (#3451)
* [Tuning] Removed event.dataset and added tag

* [Tuning] Removed event.dataset and added tag

* fixed typo

---------

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

Removed changes from:
- rules/linux/privilege_escalation_suspicious_chown_fowner_elevation.toml

(selectively cherry picked from commit 3484cac7eb)
2024-02-20 14:23:14 +00:00
Ruben Groenewoud bfe1fd6b20 [Tuning] Linux DR Tuning - Part 3 (#3454)
(cherry picked from commit 5e6e4a359b)
2024-02-20 13:55:44 +00:00
Ruben Groenewoud aefebccc06 [Tuning] Linux DR Tuning - Part 1 (#3452)
* [Tuning] Linux DR Tuning - Part 1

* Update command_and_control_linux_tunneling_and_port_forwarding.toml

* Update command_and_control_cat_network_activity.toml

(cherry picked from commit 1dc7fd6a42)
2024-02-20 13:43:33 +00:00
Ruben Groenewoud 24d4da7b5d [Tuning] Linux DR Tuning - Part 2 (#3453)
* [Tuning] Linux DR Tuning - Part 2

* Update defense_evasion_binary_copied_to_suspicious_directory.toml

* Update defense_evasion_base16_or_base32_encoding_or_decoding_activity.toml

(cherry picked from commit 0e48747aa6)
2024-02-20 13:22:16 +00:00
Ruben Groenewoud fa29e4b2b1 [New Rules] DDExec Analysis (#3408)
* [New Rules] DDExec Analysis

* Increased rule scope

* [New Rule] Dynamic Linker Discovery via od

* Revert "[New Rule] Dynamic Linker Discovery via od"

This reverts commit c58595b77f517d3f236a64a52c38804253db64cc.

* [New Rule] Dynamic Linker Discovery via od

* [New Rule] Potential Memory Seeking Activity

* [New BBR] Suspicious Memory grep Activity

* Added endgame + auditd_manager support

* Removed auditd_manager support for now

* Removed auditd_manager support for now

* Update discovery_suspicious_memory_grep_activity.toml

---------

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

(cherry picked from commit d41855a2ac)
2024-02-06 13:52:48 +00:00
Ruben Groenewoud 1db9de76b0 [New Rule] Executable Masquerading as Kernel Process (#3421)
* [New Rule] Executable Masquerading as Kernel Proc

* Bumped dates

* Added endgame support

* Added auditd_manager support

* Removed auditd_manager support for now

(cherry picked from commit 90d64f0714)
2024-02-06 09:54:24 +00:00
Ruben Groenewoud 103fa8d34a [New Rules] APT Package Manager Persistence (#3418)
* [New Rule] apt Package Manager Persistence

* [New Rules] APT Package Manager Persistence

* [New Rules] APT Package Manager Persistence

(cherry picked from commit 208b2e999c)
2024-02-06 09:34:07 +00:00
Ruben Groenewoud 6276d635b8 [New Rule] Suspicious Network Connection via systemd (#3420)
* [New Rule] Network Connection via systemd

* Removed space from description

* Added updated query

(cherry picked from commit 4f303ab77e)
2024-02-06 09:24:36 +00:00
Ruben Groenewoud ea7c83522b [New Rule] Suspicious Passwd File Event Action (#3396)
* [New Rule] Suspicious Passwd File Event Action

* Description fix

* Pot. UT fix

* Pot. UT fix.

---------

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

(cherry picked from commit 381ccf43ed)
2024-01-26 08:41:41 +00:00
Ruben Groenewoud 1160a91bb9 [New Rule] Potential Buffer Overflow Attack Detected (#3312)
* [New Rule] Potential Buffer Overflow Attack

* Added timestamp_override

* Update privilege_escalation_potential_bufferoverflow_attack.toml

* Update privilege_escalation_potential_bufferoverflow_attack.toml

* Update rules/linux/privilege_escalation_potential_bufferoverflow_attack.toml

* Update rules/linux/privilege_escalation_potential_bufferoverflow_attack.toml

---------

Co-authored-by: shashank-elastic <91139415+shashank-elastic@users.noreply.github.com>

(cherry picked from commit 48d8b650e5)
2024-01-22 15:33:29 +00:00
Ruben Groenewoud 469ddddafd [New Rule] Chroot Container Escape via Mount (#3387)
* [New Rule] Chroot Container Escape via Mount

* description fix

(cherry picked from commit ec5f4d596c)
2024-01-22 08:22:54 +00:00
Ruben Groenewoud 9ea63f9381 [Security Content] Add Investigation Guides to Linux Persistence Rules - 2 (#3350)
* [Security Content] Add IGs to Persistence - 2

* [Security Content] Add IGs to Persistence - 2

* fixes

* fix

* added ig note

(cherry picked from commit 26747aa8a4)
2024-01-20 18:41:15 +00:00
Terrance DeJesus 869988c20f [Rule Tuning] Update timestamp_override Unit Tests and Fix Rules Missing Field (#3368)
* updated timestamp override unit test; fixed rules missing this field

* fixed flake error

* simplified and consolidated logic

* Update tests/test_all_rules.py

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

* Update tests/test_all_rules.py

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

* added comments

* updated logic; added comments; removed unused variables

* removed custom python script

* updated dates

* removed deprecated rule change

* updated dates

---------

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

Removed changes from:
- rules/integrations/beaconing/command_and_control_beaconing.toml
- rules/integrations/beaconing/command_and_control_beaconing_high_confidence.toml

(selectively cherry picked from commit 1c10c37468)
2024-01-17 19:19:45 +00:00
Ruben Groenewoud bf71869f01 [New Rule] Network Connection via Sudo Binary (#3389)
* [New Rule] Network Connection via Sudo Binary

* description grammar fix

(cherry picked from commit 4301dacfb8)
2024-01-17 08:52:39 +00:00
Ruben Groenewoud ab977df20d [New Rule] Kernel Driver Load by non-root User (#3378)
* [New Rule] Kernel Driver Load by non-root User

* setup note change

* removed unnecessary index

(cherry picked from commit a9285445cf)
2024-01-17 08:40:55 +00:00
shashank-elastic 3302d03900 Linux Rule Tuning (#3379)
(cherry picked from commit 24d5528ab0)
2024-01-11 12:41:49 +00:00
Ruben Groenewoud 19c6cbf075 [Rule Tuning] Dynamic Linker Copy (#3349)
(cherry picked from commit df86882036)
2024-01-08 10:01:10 +00:00
Ruben Groenewoud e95745664f [Rule Tuning] Linux DR Tuning - Part 3 (#3322)
* [Rule Tuning] Linux DR Tuning - Part 3

* small fix

* typo

* coffee

* Update persistence_cron_job_creation.toml

* Update persistence_shared_object_creation.toml

(cherry picked from commit 6c91c1597d)
2024-01-08 09:21:32 +00:00
Ruben Groenewoud 629e4475f1 [Rule Tuning] Linux DR Tuning - Part 2 (#3321)
* [Rule Tuning] Linux DR Tuning - Part 2

* [Rule Tuning] Linux DR Tuning - Part 2

* fix

* Update execution_shell_suspicious_parent_child_revshell_linux.toml

(cherry picked from commit 36226e5428)
2024-01-08 09:12:16 +00:00
Ruben Groenewoud db58d0c5f2 [Rule Tuning] Linux DR Tuning - Part 1 (#3316)
* [Rule Tuning] Linux DR Tuning - Part 1

* fix

* Update command_and_control_linux_kworker_netcon.toml

* Update defense_evasion_binary_copied_to_suspicious_directory.toml

* Update defense_evasion_file_mod_writable_dir.toml

(cherry picked from commit b533642272)
2024-01-08 08:55:01 +00:00
Ruben Groenewoud 270a68c448 [Security Content] Add Investigation Guides to Linux C2 Rules (#3247)
* [Security Content] Add Investigation Guides to Linux C2 Rules

* Applied feedback

(cherry picked from commit 91a757a018)
2023-12-18 16:07:23 +00:00
Ruben Groenewoud ee5fa810aa [Tuning & New Rule] Linux Reverse Shell & DR Tuning (#3254)
* [Rule Tuning & New Rule] Linux Reverse Shell

* [Tuning & New Rule] Linux Reverse Shells

* Name change

* Update rules/linux/execution_shell_via_child_tcp_utility_linux.toml

Co-authored-by: shashank-elastic <91139415+shashank-elastic@users.noreply.github.com>

* Update execution_shell_via_child_tcp_utility_linux.toml

* Update execution_shell_via_background_process.toml

---------

Co-authored-by: shashank-elastic <91139415+shashank-elastic@users.noreply.github.com>

(cherry picked from commit 84824c67fd)
2023-12-18 08:41:02 +00:00
Ruben Groenewoud 0ed1db8aab [Security Content] Add Investigation Guides to Linux Persistence Rules - 1 (#3288)
* [Security Content] Add IGs to Persistence Rules

* Cleaned query

* IG description fix

* Added related rules

---------

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

(cherry picked from commit 6c614eb102)
2023-12-11 12:58:05 +00:00
Ruben Groenewoud 7c5664d34d [New Rule] Suspicious File Creation via Kworker (#3237)
* [New Rule] Suspicious File Creation via Kworker

* Update rules/linux/persistence_kworker_file_creation.toml

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

---------

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

(cherry picked from commit 840958d117)
2023-12-07 22:06:24 +00:00
Ruben Groenewoud 4d1fb91520 [New Rule] UID Elevation from Unknown Executable (#3239)
* [New Rule] UID Elevation from Unknown Executable

* type change

* bump min stack

* Added additional exclusions

* Update rules/linux/privilege_escalation_uid_elevation_from_unknown_executable.toml

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

* Update rules/linux/privilege_escalation_uid_elevation_from_unknown_executable.toml

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

* Update rules/linux/privilege_escalation_uid_elevation_from_unknown_executable.toml

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

---------

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

(cherry picked from commit 9c61231dc6)
2023-12-07 21:29:34 +00:00
Ruben Groenewoud 5aec8b4afe [New Rule] Suspicious Kworker UID Elevation (#3238)
* [New Rule] Suspicious Kworker UID Elevation

* Update privilege_escalation_kworker_uid_elevation.toml

---------

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

(cherry picked from commit 1071b12f00)
2023-12-07 20:03:34 +00:00
Ruben Groenewoud 7ab6b29c66 [Tuning] Small Linux DR Tuning (#3287)
(cherry picked from commit 38862b89e9)
2023-12-07 11:49:43 +00:00
shashank-elastic 9c271c6591 Enhance Setup Guide information (#3256)
(cherry picked from commit d52546eee5)
2023-11-03 13:41:40 +00:00
shashank-elastic 90c06f5fce Setup information for Linux Rules - Set8 (#3200)
(cherry picked from commit 5c5d1b214b)
2023-10-30 15:34:50 +00:00
Ruben Groenewoud 473039ceb8 [New Rule] Attempt to Clear Kernel Ring Buffer (#3217)
* [New Rule] Attempt to Clear Kernel Ring Buffer

* Update defense_evasion_clear_kernel_ring_buffer.toml

---------

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

(cherry picked from commit 618a1dbe06)
2023-10-30 08:42:54 +00:00
Ruben Groenewoud 85458c65cd [New Rule] Network Activity Detected via kworker (#3202)
* [New Rule] Potential curl CVE-2023-38545 Exploitation

* Revert "[New Rule] Potential curl CVE-2023-38545 Exploitation"

This reverts commit 9c04d1b53d3d63678289f43ec0c7b617d26f1ce0.

* [New Rule] Network Activity Detected via kworker

* White space

* Update rules/linux/command_and_control_linux_kworker_netcon.toml

* Update rules/linux/command_and_control_linux_kworker_netcon.toml

* Update rules/linux/command_and_control_linux_kworker_netcon.toml

* Update command_and_control_linux_kworker_netcon.toml

* Update rules/linux/command_and_control_linux_kworker_netcon.toml

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

* Update rules/linux/command_and_control_linux_kworker_netcon.toml

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

* Update command_and_control_linux_kworker_netcon.toml

---------

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

(cherry picked from commit 1ac3775743)
2023-10-25 13:30:50 +00:00
Ruben Groenewoud 8c03047130 [New Rule] Potential Linux Hack Tool Launched (#3125)
* [New Rule] Potential Linux Hack Tool Launched

* changed description slightly

* Updated description

* Update rules/linux/execution_potential_hack_tool_executed.toml

* Update rules/linux/execution_potential_hack_tool_executed.toml

(cherry picked from commit 3855dd06d8)
2023-10-23 19:42:37 +00:00
Ruben Groenewoud ab55bc399d [New Rule] Netcat Listener Established via rlwrap (#3124)
* [New Rule] Netcat Listener Established via rlwrap

* Update rules/linux/execution_nc_listener_via_rlwrap.toml

(cherry picked from commit ff268cc6a0)
2023-10-23 15:37:35 +00:00