WebServer Access Logs Deleted

Identifies the deletion of WebServer access logs. This may indicate an attempt to evade detection or destroy forensic evidence on a system.

Elastic rule (View on GitHub)

 1[metadata]
 2creation_date = "2020/11/03"
 3integration = ["endpoint", "windows"]
 4maturity = "production"
 5min_stack_comments = "New fields added: required_fields, related_integrations, setup"
 6min_stack_version = "8.3.0"
 7updated_date = "2023/06/22"
 8
 9[rule]
10author = ["Elastic"]
11description = """
12Identifies the deletion of WebServer access logs. This may indicate an attempt to evade detection or destroy forensic
13evidence on a system.
14"""
15from = "now-9m"
16index = ["auditbeat-*", "winlogbeat-*", "logs-endpoint.events.*", "logs-windows.*"]
17language = "eql"
18license = "Elastic License v2"
19name = "WebServer Access Logs Deleted"
20note = """## Setup
21
22If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.
23"""
24risk_score = 47
25rule_id = "665e7a4f-c58e-4fc6-bc83-87a7572670ac"
26severity = "medium"
27tags = ["Domain: Endpoint", "OS: Linux", "OS: Windows", "OS: macOS", "Use Case: Threat Detection", "Tactic: Defense Evasion", "Data Source: Elastic Defend"]
28timestamp_override = "event.ingested"
29type = "eql"
30
31query = '''
32file where event.type == "deletion" and
33  file.path : ("C:\\inetpub\\logs\\LogFiles\\*.log",
34               "/var/log/apache*/access.log",
35               "/etc/httpd/logs/access_log",
36               "/var/log/httpd/access_log",
37               "/var/www/*/logs/access.log")
38'''
39
40
41[[rule.threat]]
42framework = "MITRE ATT&CK"
43[[rule.threat.technique]]
44id = "T1070"
45name = "Indicator Removal"
46reference = "https://attack.mitre.org/techniques/T1070/"
47
48
49[rule.threat.tactic]
50id = "TA0005"
51name = "Defense Evasion"
52reference = "https://attack.mitre.org/tactics/TA0005/"

Setup

If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define event.ingested and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate event.ingested to @timestamp for this rule to work.

Related rules

to-top