Skip to content

Commit 9fa4ac1

Browse files
Aegrahgithub-actions[bot]
authored andcommitted
[Rule Tuning] Q2 Linux DR Tuning - BBR (#4171)
* [Rule Tuning] Q2 Linux DR Tuning - BBR * Update discovery_kernel_module_enumeration_via_proc.toml * Update discovery_linux_modprobe_enumeration.toml * Update discovery_linux_sysctl_enumeration.toml * Update discovery_potential_memory_seeking_activity.toml * Update discovery_potential_memory_seeking_activity.toml (cherry picked from commit 592ad0f)
1 parent 3f7e43c commit 9fa4ac1

5 files changed

+38
-33
lines changed

rules_building_block/discovery_capnetraw_capability.toml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ integration = ["endpoint"]
55
maturity = "production"
66
min_stack_comments = "Linux effective and permitted process capability data sources were added in version 8.11.0"
77
min_stack_version = "8.11.0"
8-
updated_date = "2024/09/01"
8+
updated_date = "2024/10/18"
99

1010
[rule]
1111
author = ["Elastic"]
@@ -27,7 +27,6 @@ risk_score = 21
2727
rule_id = "e28b8093-833b-4eda-b877-0873d134cf3c"
2828
setup = """## Setup
2929
30-
3130
This rule requires data coming in from Elastic Defend.
3231
3332
### Elastic Defend Integration Setup
@@ -52,7 +51,14 @@ For more details on Elastic Agent configuration settings, refer to the [helper g
5251
For more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).
5352
"""
5453
severity = "low"
55-
tags = ["Domain: Endpoint", "OS: Linux", "Use Case: Threat Detection", "Tactic: Discovery", "Data Source: Elastic Defend", "Rule Type: BBR"]
54+
tags = [
55+
"Domain: Endpoint",
56+
"OS: Linux",
57+
"Use Case: Threat Detection",
58+
"Tactic: Discovery",
59+
"Data Source: Elastic Defend",
60+
"Rule Type: BBR"
61+
]
5662
timestamp_override = "event.ingested"
5763
type = "new_terms"
5864
query = '''
@@ -76,7 +82,7 @@ reference = "https://attack.mitre.org/tactics/TA0007/"
7682

7783
[rule.new_terms]
7884
field = "new_terms_fields"
79-
value = ["host.id", "user.id", "process.executable"]
85+
value = ["process.executable"]
8086

8187
[[rule.new_terms.history_window_start]]
8288
field = "history_window_start"

rules_building_block/discovery_kernel_module_enumeration_via_proc.toml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
creation_date = "2020/04/12"
33
integration = ["auditd_manager"]
44
maturity = "production"
5-
updated_date = "2024/05/21"
5+
updated_date = "2024/10/18"
66

77
[rule]
88
author = ["Elastic"]
@@ -54,31 +54,28 @@ tags = [
5454
]
5555
timestamp_override = "event.ingested"
5656
type = "new_terms"
57-
5857
query = '''
5958
host.os.type:linux and event.category:file and event.action:"opened-file" and file.path:"/proc/modules" and
60-
not process.name:(grep or python* or chef-client)
59+
not process.name:(python* or chef-client)
6160
'''
6261

63-
6462
[[rule.threat]]
6563
framework = "MITRE ATT&CK"
64+
6665
[[rule.threat.technique]]
6766
id = "T1082"
6867
name = "System Information Discovery"
6968
reference = "https://attack.mitre.org/techniques/T1082/"
7069

71-
7270
[rule.threat.tactic]
7371
id = "TA0007"
7472
name = "Discovery"
7573
reference = "https://attack.mitre.org/tactics/TA0007/"
7674

7775
[rule.new_terms]
7876
field = "new_terms_fields"
79-
value = ["host.id", "process.executable"]
77+
value = ["process.executable"]
78+
8079
[[rule.new_terms.history_window_start]]
8180
field = "history_window_start"
82-
value = "now-7d"
83-
84-
81+
value = "now-14d"

rules_building_block/discovery_linux_modprobe_enumeration.toml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
creation_date = "2023/06/08"
33
integration = ["auditd_manager"]
44
maturity = "production"
5-
updated_date = "2024/05/21"
5+
updated_date = "2024/10/18"
66

77
[rule]
88
author = ["Elastic"]
@@ -57,30 +57,28 @@ type = "new_terms"
5757
query = '''
5858
host.os.type:linux and event.category:file and event.action:"opened-file" and
5959
file.path : ("/etc/modprobe.conf" or "/etc/modprobe.d" or /etc/modprobe.d/*) and not process.name:(
60-
cp or dpkg or dockerd or lynis or mkinitramfs or snapd or systemd-udevd or grep or borg or auditbeat or lspci or
60+
cp or dpkg or dockerd or lynis or mkinitramfs or snapd or systemd-udevd or borg or auditbeat or lspci or
6161
aide or modprobe or python*
6262
)
6363
'''
6464

65-
6665
[[rule.threat]]
6766
framework = "MITRE ATT&CK"
67+
6868
[[rule.threat.technique]]
6969
id = "T1082"
7070
name = "System Information Discovery"
7171
reference = "https://attack.mitre.org/techniques/T1082/"
7272

73-
7473
[rule.threat.tactic]
7574
id = "TA0007"
7675
name = "Discovery"
7776
reference = "https://attack.mitre.org/tactics/TA0007/"
7877

7978
[rule.new_terms]
8079
field = "new_terms_fields"
81-
value = ["host.id", "process.executable"]
80+
value = ["process.executable"]
81+
8282
[[rule.new_terms.history_window_start]]
8383
field = "history_window_start"
8484
value = "now-14d"
85-
86-

rules_building_block/discovery_linux_sysctl_enumeration.toml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
creation_date = "2023/06/08"
33
integration = ["auditd_manager"]
44
maturity = "production"
5-
updated_date = "2024/05/21"
5+
updated_date = "2024/10/18"
66

77
[rule]
88
author = ["Elastic"]
@@ -57,29 +57,27 @@ type = "new_terms"
5757
query = '''
5858
host.os.type:linux and event.category:file and event.action:("opened-file" or "read-file" or "wrote-to-file") and
5959
file.path : ("/etc/sysctl.conf" or "/etc/sysctl.d" or /etc/sysctl.d/*) and not process.name:(
60-
dpkg or dockerd or unattended-upg or systemd-sysctl or python* or auditbeat or dpkg or grep or pool*
60+
dpkg or dockerd or unattended-upg or systemd-sysctl or python* or auditbeat or dpkg or pool*
6161
)
6262
'''
6363

64-
6564
[[rule.threat]]
6665
framework = "MITRE ATT&CK"
66+
6767
[[rule.threat.technique]]
6868
id = "T1082"
6969
name = "System Information Discovery"
7070
reference = "https://attack.mitre.org/techniques/T1082/"
7171

72-
7372
[rule.threat.tactic]
7473
id = "TA0007"
7574
name = "Discovery"
7675
reference = "https://attack.mitre.org/tactics/TA0007/"
7776

7877
[rule.new_terms]
7978
field = "new_terms_fields"
80-
value = ["host.id", "process.executable"]
79+
value = ["process.executable"]
80+
8181
[[rule.new_terms.history_window_start]]
8282
field = "history_window_start"
8383
value = "now-14d"
84-
85-

rules_building_block/discovery_potential_memory_seeking_activity.toml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ bypass_bbr_timing = true
33
creation_date = "2024/02/01"
44
integration = ["endpoint"]
55
maturity = "production"
6-
updated_date = "2024/05/21"
6+
updated_date = "2024/10/18"
77

88
[rule]
99
author = ["Elastic"]
@@ -32,27 +32,33 @@ tags = [
3232
]
3333
timestamp_override = "event.ingested"
3434
type = "eql"
35-
3635
query = '''
3736
process where host.os.type == "linux" and event.type == "start" and event.action in ("exec", "exec_event") and (
38-
(process.name == "tail" and process.args == "-c") or
37+
(process.name == "tail" and process.args in ("-c", "--bytes")) or
3938
(process.name == "cmp" and process.args == "-i") or
4039
(process.name in ("hexdump", "xxd") and process.args == "-s") or
4140
(process.name == "dd" and process.args : ("skip*", "seek*"))
41+
) and not (
42+
process.parent.args like ("/opt/error_monitor/error_monitor.sh", "printf*") or
43+
process.parent.name in ("acme.sh", "dracut", "leapp") or
44+
process.parent.executable like (
45+
"/bin/cagefs_enter", "/opt/nessus_agent/sbin/nessus-service", "/usr/libexec/platform-python*",
46+
"/usr/libexec/vdsm/vdsmd", "/usr/local/bin/docker-entrypoint.sh", "/usr/lib/module-init-tools/lsinitrd-quick"
47+
) or
48+
process.parent.command_line like "sh*acme.sh*" or
49+
process.args like "/var/tmp/dracut*"
4250
)
4351
'''
4452

45-
4653
[[rule.threat]]
4754
framework = "MITRE ATT&CK"
55+
4856
[[rule.threat.technique]]
4957
id = "T1057"
5058
name = "Process Discovery"
5159
reference = "https://attack.mitre.org/techniques/T1057/"
5260

53-
5461
[rule.threat.tactic]
5562
id = "TA0007"
5663
name = "Discovery"
5764
reference = "https://attack.mitre.org/tactics/TA0007/"
58-

0 commit comments

Comments
 (0)