-
Notifications
You must be signed in to change notification settings - Fork 566
Add tests to ensure rules are properly deprecated #1050
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Deprecating rules | ||
|
||
Rules that have been version locked (added to [version.lock.json](../etc/version.lock.json)), which also means they | ||
have been added to the detection engine in Kibana, must be properly [deprecated](#steps-to-properly-deprecate-a-rule). | ||
|
||
If a rule was never version locked (not yet pushed to Kibana or still in non-`production` `maturity`), the rule can | ||
simply be removed with no additional changes, or updated the `maturity = "development"`, which will leave it out of the | ||
release package to Kibana. | ||
|
||
|
||
## Steps to properly deprecate a rule | ||
|
||
1. Update the `maturity` to `deprecated` | ||
2. Move the rule file to [rules/_deprecated](../rules/_deprecated) | ||
|
||
Next time the versions are locked, the rule will be added to the [deprecated_rules.json](../etc/deprecated_rules.json) | ||
file. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,7 @@ | ||
{} | ||
{ | ||
"3a86e085-094c-412d-97ff-2439731e59cb": { | ||
"deprecation_date": "2021-03-03", | ||
"rule_name": "Setgid Bit Set via chmod", | ||
"stack_version": "7.13" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. from the name, it's not clear whether this was the first version where this was removed, or the last version this was included There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's a good point. I think I can better handle this when expanding for #958, so I will punt this to that |
||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
[metadata] | ||
creation_date = "2020/04/23" | ||
maturity = "deprecated" | ||
updated_date = "2021/03/16" | ||
brokensound77 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
[rule] | ||
author = ["Elastic"] | ||
description = """ | ||
An adversary may add the setgid bit to a file or directory in order to run a file with the privileges of the owning | ||
group. An adversary can take advantage of this to either do a shell escape or exploit a vulnerability in an application | ||
with the setgid bit to get code running in a different user’s context. Additionally, adversaries can use this mechanism | ||
on their own malware to make sure they're able to execute in elevated contexts in the future. | ||
""" | ||
from = "now-9m" | ||
index = ["auditbeat-*", "logs-endpoint.events.*"] | ||
language = "lucene" | ||
license = "Elastic License" | ||
max_signals = 33 | ||
name = "Setgid Bit Set via chmod" | ||
risk_score = 21 | ||
rule_id = "3a86e085-094c-412d-97ff-2439731e59cb" | ||
severity = "low" | ||
tags = ["Elastic", "Host", "Linux", "Threat Detection", "Privilege Escalation"] | ||
timestamp_override = "event.ingested" | ||
type = "query" | ||
|
||
query = ''' | ||
event.category:process AND event.type:(start or process_started) AND process.name:chmod AND process.args:(g+s OR /2[0-9]{3}/) AND NOT user.name:root | ||
''' | ||
|
||
|
||
[[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/" |
Uh oh!
There was an error while loading. Please reload this page.