Skip to content

Commit 5155f47

Browse files
[Rule Tuning] Event Aggregation - Fix event.action & event.type conditions (#4445)
* [Rule Tuning] Event Aggregation - Fix `event.action` & `event.type` conditions * . --------- Co-authored-by: Colson Wilhoit <[email protected]>
1 parent 2bf4cf0 commit 5155f47

5 files changed

+11
-11
lines changed

rules/integrations/cloud_defend/execution_interactive_shell_spawned_from_inside_a_container.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
creation_date = "2023/04/26"
33
integration = ["cloud_defend"]
44
maturity = "production"
5-
updated_date = "2025/01/15"
5+
updated_date = "2025/02/04"
66

77
[rule]
88
author = ["Elastic"]
@@ -41,8 +41,8 @@ process where container.id: "*" and
4141
event.type== "start" and
4242
4343
/*D4C consolidates closely spawned event.actions, this excludes end actions to only capture ongoing processes*/
44-
event.action in ("fork", "exec") and event.action != "end"
45-
and process.entry_leader.same_as_process== false and
44+
event.action in ("fork", "exec") and
45+
process.entry_leader.same_as_process== false and
4646
(
4747
(process.executable: "*/*sh" and process.args: ("-i", "-it")) or
4848
process.args: "*/*sh"

rules/integrations/cloud_defend/lateral_movement_ssh_process_launched_inside_a_container.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
creation_date = "2023/05/12"
33
integration = ["cloud_defend"]
44
maturity = "production"
5-
updated_date = "2025/01/15"
5+
updated_date = "2025/02/04"
66

77
[rule]
88
author = ["Elastic"]
@@ -45,7 +45,7 @@ type = "eql"
4545

4646
query = '''
4747
process where container.id: "*" and event.type== "start" and
48-
event.action in ("fork", "exec") and event.action != "end" and
48+
event.action in ("fork", "exec") and
4949
process.name: ("sshd", "ssh", "autossh")
5050
'''
5151
note = """## Triage and analysis

rules/linux/execution_tc_bpf_filter.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ integration = ["endpoint", "sentinel_one_cloud_funnel"]
44
maturity = "production"
55
min_stack_version = "8.13.0"
66
min_stack_comments = "Breaking change at 8.13.0 for SentinelOne Integration."
7-
updated_date = "2025/02/04"
7+
updated_date = "2025/02/07"
88

99
[rule]
1010
author = ["Elastic"]
@@ -66,7 +66,7 @@ timestamp_override = "event.ingested"
6666
type = "eql"
6767

6868
query = '''
69-
process where host.os.type == "linux" and event.type != "end" and process.executable == "/usr/sbin/tc" and
69+
process where host.os.type == "linux" and event.type == "start" and process.executable == "/usr/sbin/tc" and
7070
process.args == "filter" and process.args == "add" and process.args == "bpf" and
7171
not process.parent.executable == "/usr/sbin/libvirtd"
7272
'''

rules/macos/execution_scripting_osascript_exec_followed_by_netcon.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
creation_date = "2020/12/07"
33
integration = ["endpoint"]
44
maturity = "production"
5-
updated_date = "2025/02/04"
5+
updated_date = "2025/02/07"
66

77
[rule]
88
author = ["Elastic"]
@@ -61,7 +61,7 @@ type = "eql"
6161
query = '''
6262
sequence by host.id, process.entity_id with maxspan=30s
6363
[process where host.os.type == "macos" and event.type == "start" and process.name == "osascript"]
64-
[network where host.os.type == "macos" and event.type != "end" and process.name == "osascript" and destination.ip != "::1" and
64+
[network where host.os.type == "macos" and event.type == "start" and process.name == "osascript" and destination.ip != "::1" and
6565
not cidrmatch(destination.ip,
6666
"10.0.0.0/8", "127.0.0.0/8", "169.254.0.0/16", "172.16.0.0/12", "192.0.0.0/24", "192.0.0.0/29", "192.0.0.8/32",
6767
"192.0.0.9/32", "192.0.0.10/32", "192.0.0.170/32", "192.0.0.171/32", "192.0.2.0/24", "192.31.196.0/24",

rules/windows/persistence_local_scheduled_task_creation.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
creation_date = "2020/02/18"
33
integration = ["endpoint", "windows"]
44
maturity = "production"
5-
updated_date = "2025/01/15"
5+
updated_date = "2025/02/04"
66
min_stack_version = "8.14.0"
77
min_stack_comments = "Breaking change at 8.14.0 for the Windows Integration."
88

@@ -40,7 +40,7 @@ type = "eql"
4040

4141
query = '''
4242
sequence with maxspan=1m
43-
[process where host.os.type == "windows" and event.type != "end" and
43+
[process where host.os.type == "windows" and event.type == "start" and
4444
((process.name : ("cmd.exe", "wscript.exe", "rundll32.exe", "regsvr32.exe", "wmic.exe", "mshta.exe",
4545
"powershell.exe", "pwsh.exe", "powershell_ise.exe", "WmiPrvSe.exe", "wsmprovhost.exe", "winrshost.exe") or
4646
process.pe.original_file_name : ("cmd.exe", "wscript.exe", "rundll32.exe", "regsvr32.exe", "wmic.exe", "mshta.exe",

0 commit comments

Comments
 (0)