Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docs | Rule Tuning] Add blog references to rules #4097

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
creation_date = "2020/05/04"
integration = ["endpoint", "auditd_manager"]
maturity = "production"
updated_date = "2024/07/05"
updated_date = "2024/09/23"

[rule]
author = ["Elastic"]
Expand All @@ -15,6 +15,7 @@ index = ["logs-endpoint.events.*", "endgame-*", "auditbeat-*", "logs-auditd_mana
language = "eql"
license = "Elastic License v2"
name = "Tampering of Shell Command-Line History"
references = ["https://www.elastic.co/security-labs/detecting-log4j2-with-elastic-security"]
risk_score = 47
rule_id = "7bcbb3ac-e533-41ad-a612-d6c3bf666aba"
setup = """## Setup
Expand Down
3 changes: 2 additions & 1 deletion rules/cross-platform/execution_revershell_via_shell_cmd.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
creation_date = "2020/01/07"
integration = ["endpoint"]
maturity = "production"
updated_date = "2024/05/21"
updated_date = "2024/09/23"

[rule]
author = ["Elastic"]
Expand Down Expand Up @@ -48,6 +48,7 @@ references = [
"https://github.com/swisskyrepo/PayloadsAllTheThings/blob/master/Methodology%20and%20Resources/Reverse%20Shell%20Cheatsheet.md",
"https://github.com/WangYihang/Reverse-Shell-Manager",
"https://www.netsparker.com/blog/web-security/understanding-reverse-shells/",
"https://www.elastic.co/security-labs/detecting-log4j2-with-elastic-security",
]
risk_score = 73
rule_id = "a1a0375f-22c2-48c0-81a4-7c2d11cc6856"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
creation_date = "2021/01/26"
integration = ["endpoint"]
maturity = "production"
updated_date = "2024/05/21"
updated_date = "2024/09/23"

[rule]
author = ["Elastic"]
Expand All @@ -15,6 +15,7 @@ index = ["auditbeat-*", "logs-endpoint.events.*"]
language = "kuery"
license = "Elastic License v2"
name = "Potential Privilege Escalation via Sudoers File Modification"
references = ["https://www.elastic.co/security-labs/primer-on-persistence-mechanisms"]
risk_score = 73
rule_id = "76152ca1-71d0-4003-9e37-0983e12832da"
severity = "high"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
creation_date = "2020/04/23"
integration = ["endpoint"]
maturity = "production"
updated_date = "2024/06/19"
updated_date = "2024/09/23"

[rule]
author = ["Elastic"]
Expand All @@ -19,6 +19,7 @@ language = "eql"
license = "Elastic License v2"
max_signals = 33
name = "SUID/SGID Bit Set"
references = ["https://www.elastic.co/security-labs/primer-on-persistence-mechanisms"]
risk_score = 21
rule_id = "8a1b0278-0f9a-487d-96bd-d4833298e87a"
severity = "low"
Expand All @@ -32,6 +33,7 @@ tags = [
]
timestamp_override = "event.ingested"
type = "eql"

query = '''
process where host.os.type == "linux" and event.type == "start" and event.action == "exec" and (
(process.name == "chmod" and (process.args : ("+s", "u+s", "g+s") or process.args regex "[24][0-9]{3}")) or
Expand All @@ -48,28 +50,29 @@ process where host.os.type == "linux" and event.type == "start" and event.action
)
'''


[[rule.threat]]
framework = "MITRE ATT&CK"

[[rule.threat.technique]]
id = "T1548"
name = "Abuse Elevation Control Mechanism"
reference = "https://attack.mitre.org/techniques/T1548/"

[[rule.threat.technique.subtechnique]]
id = "T1548.001"
name = "Setuid and Setgid"
reference = "https://attack.mitre.org/techniques/T1548/001/"



[rule.threat.tactic]
id = "TA0004"
name = "Privilege Escalation"
reference = "https://attack.mitre.org/tactics/TA0004/"

[[rule.threat]]
framework = "MITRE ATT&CK"

[rule.threat.tactic]
id = "TA0003"
name = "Persistence"
reference = "https://attack.mitre.org/tactics/TA0003/"

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
creation_date = "2020/04/13"
integration = ["endpoint"]
maturity = "production"
updated_date = "2024/05/21"
updated_date = "2024/09/23"

[rule]
author = ["Elastic"]
Expand All @@ -15,6 +15,7 @@ index = ["auditbeat-*", "logs-endpoint.events.*"]
language = "kuery"
license = "Elastic License v2"
name = "Sudoers File Modification"
references = ["https://www.elastic.co/security-labs/primer-on-persistence-mechanisms"]
risk_score = 47
rule_id = "931e25a5-0f5e-4ae0-ba0d-9e94eff7e3a4"
severity = "medium"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,27 +1,30 @@
[metadata]
creation_date = "2024/06/03"
maturity = "production"
integration = ["fim"]
updated_date = "2024/07/09"
maturity = "production"
updated_date = "2024/09/23"

[rule]
author = ["Elastic"]
description = """
This rule leverages the File Integrity Monitoring (FIM) integration to detect file modifications of files that are
commonly used for persistence on Linux systems. The rule detects modifications to files that are commonly used for
cron jobs, systemd services, message-of-the-day (MOTD), SSH configurations, shell configurations, runtime control,
init daemon, passwd/sudoers/shadow files, Systemd udevd, and XDG/KDE autostart entries. To leverage this rule, the
paths specified in the query need to be added to the FIM policy in the Elastic Security app.
commonly used for persistence on Linux systems. The rule detects modifications to files that are commonly used for cron
jobs, systemd services, message-of-the-day (MOTD), SSH configurations, shell configurations, runtime control, init
daemon, passwd/sudoers/shadow files, Systemd udevd, and XDG/KDE autostart entries. To leverage this rule, the paths
specified in the query need to be added to the FIM policy in the Elastic Security app.
"""
from = "now-9m"
index = ["logs-fim.event-*", "auditbeat-*"]
language = "eql"
license = "Elastic License v2"
name = "Potential Persistence via File Modification"
references = [
"https://www.elastic.co/security-labs/primer-on-persistence-mechanisms",
"https://www.elastic.co/security-labs/sequel-on-persistence-mechanisms",
]
risk_score = 21
rule_id = "192657ba-ab0e-4901-89a2-911d611eee98"
setup = """
## Setup
setup = """## Setup

This rule requires data coming in from the Elastic File Integrity Monitoring (FIM) integration.

Expand All @@ -46,10 +49,11 @@ tags = [
"Use Case: Threat Detection",
"Tactic: Persistence",
"Tactic: Privilege Escalation",
"Data Source: File Integrity Monitoring"
"Data Source: File Integrity Monitoring",
]
timestamp_override = "event.ingested"
type = "eql"

query = '''
file where host.os.type == "linux" and event.dataset == "fim.event" and event.action == "updated" and
file.path : (
Expand Down Expand Up @@ -112,29 +116,39 @@ file.path : (
)
'''


[[rule.threat]]
framework = "MITRE ATT&CK"

[[rule.threat.technique]]
id = "T1037"
name = "Boot or Logon Initialization Scripts"
reference = "https://attack.mitre.org/techniques/T1037/"

[[rule.threat.technique.subtechnique]]
id = "T1037.004"
name = "RC Scripts"
reference = "https://attack.mitre.org/techniques/T1037/004/"


[[rule.threat.technique]]
id = "T1136"
name = "Create Account"
reference = "https://attack.mitre.org/techniques/T1136/"
[[rule.threat.technique.subtechnique]]
id = "T1136.001"
name = "Local Account"
reference = "https://attack.mitre.org/techniques/T1136/001/"


[[rule.threat.technique]]
id = "T1543"
name = "Create or Modify System Process"
reference = "https://attack.mitre.org/techniques/T1543/"

[[rule.threat.technique.subtechnique]]
id = "T1543.002"
name = "Systemd Service"
reference = "https://attack.mitre.org/techniques/T1543/002/"


[[rule.threat.technique]]
id = "T1556"
name = "Modify Authentication Process"
Expand All @@ -144,51 +158,42 @@ reference = "https://attack.mitre.org/techniques/T1556/"
id = "T1574"
name = "Hijack Execution Flow"
reference = "https://attack.mitre.org/techniques/T1574/"

[[rule.threat.technique.subtechnique]]
id = "T1574.006"
name = "Dynamic Linker Hijacking"
reference = "https://attack.mitre.org/techniques/T1574/006/"

[[rule.threat.technique]]
id = "T1136"
name = "Create Account"
reference = "https://attack.mitre.org/techniques/T1136/"

[[rule.threat.technique.subtechnique]]
id = "T1136.001"
name = "Local Account"
reference = "https://attack.mitre.org/techniques/T1136/001/"

[rule.threat.tactic]
id = "TA0003"
name = "Persistence"
reference = "https://attack.mitre.org/tactics/TA0003/"

[[rule.threat]]
framework = "MITRE ATT&CK"

[[rule.threat.technique]]
id = "T1053"
name = "Scheduled Task/Job"
reference = "https://attack.mitre.org/techniques/T1053/"

[[rule.threat.technique.subtechnique]]
id = "T1053.003"
name = "Cron"
reference = "https://attack.mitre.org/techniques/T1053/003/"


[[rule.threat.technique]]
id = "T1548"
name = "Abuse Elevation Control Mechanism"
reference = "https://attack.mitre.org/techniques/T1548/"

[[rule.threat.technique.subtechnique]]
id = "T1548.003"
name = "Sudo and Sudo Caching"
reference = "https://attack.mitre.org/techniques/T1548/003/"



[rule.threat.tactic]
id = "TA0004"
name = "Privilege Escalation"
reference = "https://attack.mitre.org/tactics/TA0004/"

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
creation_date = "2022/08/24"
integration = ["google_workspace"]
maturity = "production"
updated_date = "2024/05/21"
updated_date = "2024/09/23"

[rule]
author = ["Elastic"]
Expand Down Expand Up @@ -76,7 +76,10 @@ The Google Workspace Fleet integration, Filebeat module, or similarly structured
- See the following references for further information:
- https://support.google.com/a/answer/7061566
- https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-google_workspace.html"""
references = ["https://support.google.com/a/answer/1247799?hl=en"]
references = [
"https://support.google.com/a/answer/1247799?hl=en",
"https://www.elastic.co/security-labs/google-workspace-attack-surface-part-two",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

]
risk_score = 47
rule_id = "07b5f85a-240f-11ed-b3d9-f661ea17fbce"
severity = "medium"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
creation_date = "2020/11/17"
integration = ["google_workspace"]
maturity = "production"
updated_date = "2024/05/21"
updated_date = "2024/09/23"

[rule]
author = ["Elastic"]
Expand Down Expand Up @@ -79,7 +79,10 @@ The Google Workspace Fleet integration, Filebeat module, or similarly structured
- See the following references for further information:
- https://support.google.com/a/answer/7061566
- https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-google_workspace.html"""
references = ["https://support.google.com/a/answer/2406043?hl=en"]
references = [
"https://support.google.com/a/answer/2406043?hl=en",
"https://www.elastic.co/security-labs/google-workspace-attack-surface-part-two",
]
risk_score = 47
rule_id = "ad3f2807-2b3e-47d7-b282-f84acbbe14be"
severity = "medium"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
creation_date = "2020/05/21"
integration = ["okta"]
maturity = "production"
updated_date = "2024/07/23"
updated_date = "2024/09/23"

[rule]
author = ["Elastic"]
Expand Down Expand Up @@ -58,6 +58,8 @@ references = [
"https://developer.okta.com/docs/reference/api/system-log/",
"https://developer.okta.com/docs/reference/api/event-types/",
"https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy",
"https://www.elastic.co/security-labs/monitoring-okta-threats-with-elastic-security",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"https://www.elastic.co/security-labs/okta-and-lapsus-what-you-need-to-know",
]
risk_score = 73
rule_id = "3805c3dc-f82c-4f8d-891e-63c24d3102b0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
creation_date = "2020/05/21"
integration = ["okta"]
maturity = "production"
updated_date = "2024/07/23"
updated_date = "2024/09/23"

[rule]
author = ["Elastic"]
Expand All @@ -28,6 +28,7 @@ references = [
"https://developer.okta.com/docs/reference/api/system-log/",
"https://developer.okta.com/docs/reference/api/event-types/",
"https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy",
"https://www.elastic.co/security-labs/monitoring-okta-threats-with-elastic-security",
]
risk_score = 21
rule_id = "729aa18d-06a6-41c7-b175-b65b739b1181"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
creation_date = "2023/02/22"
integration = ["endpoint"]
maturity = "production"
updated_date = "2024/08/08"
updated_date = "2024/09/23"

[rule]
author = ["Elastic"]
Expand All @@ -15,6 +15,7 @@ index = ["logs-endpoint.events.*", "endgame-*"]
language = "eql"
license = "Elastic License v2"
name = "Attempt to Disable IPTables or Firewall"
references = ["https://www.elastic.co/security-labs/detecting-log4j2-with-elastic-security"]
risk_score = 21
rule_id = "83e9c2b3-24ef-4c1d-a8cd-5ebafb5dfa2f"
setup = """## Setup
Expand Down Expand Up @@ -74,20 +75,22 @@ process where host.os.type == "linux" and event.type == "start" and event.action
)
'''


[[rule.threat]]
framework = "MITRE ATT&CK"

[[rule.threat.technique]]
id = "T1562"
name = "Impair Defenses"
reference = "https://attack.mitre.org/techniques/T1562/"

[[rule.threat.technique.subtechnique]]
id = "T1562.001"
name = "Disable or Modify Tools"
reference = "https://attack.mitre.org/techniques/T1562/001/"



[rule.threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"

Loading
Loading