[New Rule] Potential Persistence via Periodic Tasks (#898)

* [New Rule] Potential Persistence via Periodic Tasks

* Update rules/macos/persistence_periodic_tasks_file_mdofiy.toml

Co-authored-by: Andrew Pease <7442091+peasead@users.noreply.github.com>

* Update rules/macos/persistence_periodic_tasks_file_mdofiy.toml

Co-authored-by: Andrew Pease <7442091+peasead@users.noreply.github.com>

* Update rules/macos/persistence_periodic_tasks_file_mdofiy.toml

Co-authored-by: Andrew Pease <7442091+peasead@users.noreply.github.com>

* Update rules/macos/persistence_periodic_tasks_file_mdofiy.toml

Co-authored-by: Andrew Pease <7442091+peasead@users.noreply.github.com>

* Update rules/macos/persistence_periodic_tasks_file_mdofiy.toml

Co-authored-by: Andrew Pease <7442091+peasead@users.noreply.github.com>

* Update rules/macos/persistence_periodic_tasks_file_mdofiy.toml

Co-authored-by: Brent Murphy <56412096+bm11100@users.noreply.github.com>

* Update rules/macos/persistence_periodic_tasks_file_mdofiy.toml

Co-authored-by: Brent Murphy <56412096+bm11100@users.noreply.github.com>

* relinted

Co-authored-by: Andrew Pease <7442091+peasead@users.noreply.github.com>
Co-authored-by: Brent Murphy <56412096+bm11100@users.noreply.github.com>
This commit is contained in:
Samirbous
2021-02-03 18:15:25 +01:00
committed by GitHub
parent d733971e99
commit 8878104f54
@@ -0,0 +1,51 @@
[metadata]
creation_date = "2021/01/21"
maturity = "production"
updated_date = "2021/01/21"
[rule]
author = ["Elastic"]
description = """
Identifies the creation or modification of the default configuration for periodic tasks. Adversaries may abuse periodic
tasks to execute malicious code or maintain persistence.
"""
from = "now-9m"
index = ["auditbeat-*", "logs-endpoint.events.*"]
language = "kuery"
license = "Elastic License"
name = "Potential Persistence via Periodic Tasks"
references = [
"https://opensource.apple.com/source/crontabs/crontabs-13/private/etc/defaults/periodic.conf.auto.html",
"https://www.oreilly.com/library/view/mac-os-x/0596003706/re328.html",
"https://github.com/D00MFist/PersistentJXA/blob/master/PeriodicPersist.js",
]
risk_score = 21
rule_id = "48ec9452-e1fd-4513-a376-10a1a26d2c83"
severity = "low"
tags = ["Elastic", "Host", "macOS", "Threat Detection", "Persistence"]
type = "query"
query = '''
event.category:"file" and not event.type:"deletion" and
file.path:(/private/etc/periodic/* or /private/etc/defaults/periodic.conf or /private/etc/periodic.conf)
'''
[[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.tactic]
id = "TA0003"
name = "Persistence"
reference = "https://attack.mitre.org/tactics/TA0003/"