Files
sigma-rules/rules/windows/persistence_powersshell_profiles.toml
T
Terrance DeJesus 4312d8c958 [FR] Add Endpoint, APM and Windows Integration Tags to Rules and Supportability (#2429)
* initial commit

* addressing flake errors

* added apm to _get_packagted_integrations logic

* addressed flake errors

* adjusted integration schema and updated rules to be a list

* updated several rules and removed a unit test

* updated rules with logs-* only index patterns

* Update tests/test_all_rules.py

Co-authored-by: Mika Ayenson <Mikaayenson@users.noreply.github.com>

* addressed flake errors

* integration is none is windows, endpoint or apm

* adding rules with accepted incoming changes from main

* fixed tag and tactic alignment errors from unit testing

* adjusted unit testing logic for integration tags; added more exclusion rules

* adjusted test_integration logic to be rule resistent and skip if -8.3

* adjusted comments for unit test skip

* fixed merge conflicts from main

* changing test_integration_tag to remove logic for rule version comparisons

* added integration tag to new rule

* adjusted rules updated_date value

* ignore guided onboarding rule in unit tests

* added integration tag to new rule

Co-authored-by: Mika Ayenson <Mikaayenson@users.noreply.github.com>
2023-01-04 09:30:07 -05:00

59 lines
1.8 KiB
TOML

[metadata]
creation_date = "2022/10/13"
integration = ["endpoint", "windows"]
maturity = "production"
min_stack_comments = "New fields added: required_fields, related_integrations, setup"
min_stack_version = "8.3.0"
updated_date = "2022/12/14"
[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/"