[Rule Tuning] Misc. Linux ES|QL Rules (#5050)
* [Rule Tuning] Misc. Linux ES|QL Rules * update date bump * ++ * Update persistence_web_server_sus_child_spawned.toml * Update working directory conditions in TOML file
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
creation_date = "2025/03/04"
|
||||
integration = ["endpoint"]
|
||||
maturity = "production"
|
||||
updated_date = "2025/07/16"
|
||||
updated_date = "2025/09/02"
|
||||
|
||||
[rule]
|
||||
author = ["Elastic"]
|
||||
@@ -101,7 +101,6 @@ tags = [
|
||||
]
|
||||
timestamp_override = "event.ingested"
|
||||
type = "esql"
|
||||
|
||||
query = '''
|
||||
from logs-endpoint.events.process-*
|
||||
| keep
|
||||
@@ -123,20 +122,30 @@ from logs-endpoint.events.process-*
|
||||
host.os.type == "linux" and
|
||||
event.type == "start" and
|
||||
event.action == "exec" and (
|
||||
(
|
||||
process.parent.name in (
|
||||
"apache", "nginx", "apache2", "httpd", "lighttpd", "caddy", "node", "mongrel_rails", "java", "gunicorn",
|
||||
"uwsgi", "openresty", "cherokee", "h2o", "resin", "puma", "unicorn", "traefik", "tornado", "hypercorn",
|
||||
"daphne", "twistd", "yaws", "webfsd", "httpd.worker", "flask", "rails", "mongrel"
|
||||
) or
|
||||
process.parent.name like "php-*" or
|
||||
process.parent.name like "python*" or
|
||||
process.parent.name like "ruby*" or
|
||||
process.parent.name like "perl*" or
|
||||
user.name in (
|
||||
"apache", "www-data", "httpd", "nginx", "lighttpd", "tomcat", "tomcat8", "tomcat9", "ftp", "ftpuser", "ftpd"
|
||||
) or
|
||||
user.id in ("99", "33", "498", "48") or
|
||||
process.working_directory like "/var/www/*"
|
||||
) or
|
||||
(
|
||||
(
|
||||
process.parent.name like "php-*" or
|
||||
process.parent.name like "python*" or
|
||||
process.parent.name like "ruby*" or
|
||||
process.parent.name like "perl*"
|
||||
) and (
|
||||
process.working_directory like "/var/www/*" or
|
||||
process.working_directory like "/srv/www/*" or
|
||||
process.working_directory like "/usr/share/nginx/*"
|
||||
)
|
||||
)
|
||||
) and
|
||||
process.name in ("bash", "dash", "sh", "tcsh", "csh", "zsh", "ksh", "fish") and
|
||||
process.command_line like "* -c *" and not (
|
||||
@@ -159,51 +168,51 @@ from logs-endpoint.events.process-*
|
||||
| limit 100
|
||||
'''
|
||||
|
||||
|
||||
[[rule.threat]]
|
||||
framework = "MITRE ATT&CK"
|
||||
|
||||
[[rule.threat.technique]]
|
||||
id = "T1505"
|
||||
name = "Server Software Component"
|
||||
reference = "https://attack.mitre.org/techniques/T1505/"
|
||||
|
||||
[[rule.threat.technique.subtechnique]]
|
||||
id = "T1505.003"
|
||||
name = "Web Shell"
|
||||
reference = "https://attack.mitre.org/techniques/T1505/003/"
|
||||
|
||||
|
||||
|
||||
[rule.threat.tactic]
|
||||
id = "TA0003"
|
||||
name = "Persistence"
|
||||
reference = "https://attack.mitre.org/tactics/TA0003/"
|
||||
|
||||
[[rule.threat]]
|
||||
framework = "MITRE ATT&CK"
|
||||
|
||||
[[rule.threat.technique]]
|
||||
id = "T1059"
|
||||
name = "Command and Scripting Interpreter"
|
||||
reference = "https://attack.mitre.org/techniques/T1059/"
|
||||
|
||||
[[rule.threat.technique.subtechnique]]
|
||||
id = "T1059.004"
|
||||
name = "Unix Shell"
|
||||
reference = "https://attack.mitre.org/techniques/T1059/004/"
|
||||
|
||||
|
||||
|
||||
[rule.threat.tactic]
|
||||
id = "TA0002"
|
||||
name = "Execution"
|
||||
reference = "https://attack.mitre.org/tactics/TA0002/"
|
||||
|
||||
[[rule.threat]]
|
||||
framework = "MITRE ATT&CK"
|
||||
|
||||
[[rule.threat.technique]]
|
||||
id = "T1071"
|
||||
name = "Application Layer Protocol"
|
||||
reference = "https://attack.mitre.org/techniques/T1071/"
|
||||
|
||||
|
||||
[rule.threat.tactic]
|
||||
id = "TA0011"
|
||||
name = "Command and Control"
|
||||
reference = "https://attack.mitre.org/tactics/TA0011/"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user