6555bba965
* [New Rule] Persistence via PowerShell profile * Apply suggestions from code review Co-authored-by: Samirbous <64742097+Samirbous@users.noreply.github.com> * Update persistence_powersshell_profiles.toml Co-authored-by: Samirbous <64742097+Samirbous@users.noreply.github.com>
58 lines
1.8 KiB
TOML
58 lines
1.8 KiB
TOML
[metadata]
|
|
creation_date = "2022/10/13"
|
|
maturity = "production"
|
|
min_stack_comments = "New fields added: required_fields, related_integrations, setup"
|
|
min_stack_version = "8.3.0"
|
|
updated_date = "2022/10/13"
|
|
|
|
[rule]
|
|
author = ["Elastic"]
|
|
description = """
|
|
Identifies the creation or modification of a PowerShell profile. PowerShell profile is a script that is executed when
|
|
PowerShell starts to customize the user environment, which can be abused by attackers to persist in a environment where
|
|
PowerShell is common.
|
|
"""
|
|
from = "now-9m"
|
|
index = ["winlogbeat-*", "logs-endpoint.events.*", "logs-windows.*"]
|
|
language = "eql"
|
|
license = "Elastic License v2"
|
|
name = "Persistence via PowerShell profile"
|
|
references = [
|
|
"https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_profiles",
|
|
"https://www.welivesecurity.com/2019/05/29/turla-powershell-usage/"
|
|
]
|
|
risk_score = 47
|
|
rule_id = "5cf6397e-eb91-4f31-8951-9f0eaa755a31"
|
|
severity = "medium"
|
|
tags = ["Elastic", "Host", "Windows", "Threat Detection", "Persistence"]
|
|
timestamp_override = "event.ingested"
|
|
type = "eql"
|
|
|
|
query = '''
|
|
file where event.type != "deletion" and
|
|
file.path : ("?:\\Users\\*\\Documents\\WindowsPowerShell\\*",
|
|
"?:\\Users\\*\\Documents\\PowerShell\\*",
|
|
"?:\\Windows\\System32\\WindowsPowerShell\\*") and
|
|
file.name : ("profile.ps1", "Microsoft.Powershell_profile.ps1")
|
|
'''
|
|
|
|
|
|
[[rule.threat]]
|
|
framework = "MITRE ATT&CK"
|
|
[[rule.threat.technique]]
|
|
id = "T1546"
|
|
name = "Event Triggered Execution"
|
|
reference = "https://attack.mitre.org/techniques/T1546/"
|
|
[[rule.threat.technique.subtechnique]]
|
|
id = "T1546.013"
|
|
name = "PowerShell Profile"
|
|
reference = "https://attack.mitre.org/techniques/T1546/013/"
|
|
|
|
|
|
|
|
[rule.threat.tactic]
|
|
id = "TA0003"
|
|
name = "Persistence"
|
|
reference = "https://attack.mitre.org/tactics/TA0003/"
|
|
|