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"
 5updated_date = "2024/10/28"
 6min_stack_version = "8.14.0"
 7min_stack_comments = "Breaking change at 8.14.0 for the Windows Integration."
 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.sysmon_operational-*"]
17language = "eql"
18license = "Elastic License v2"
19name = "WebServer Access Logs Deleted"
20risk_score = 47
21rule_id = "665e7a4f-c58e-4fc6-bc83-87a7572670ac"
22setup = """## Setup
23
24If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2,
25events will not define `event.ingested` and default fallback for EQL rules was not added until version 8.2.
26Hence for this rule to work effectively, users will need to add a custom ingest pipeline to populate
27`event.ingested` to @timestamp.
28For more details on adding a custom ingest pipeline refer - https://www.elastic.co/guide/en/fleet/current/data-streams-pipeline-tutorial.html
29"""
30severity = "medium"
31tags = [
32    "Domain: Endpoint",
33    "OS: Linux",
34    "OS: Windows",
35    "OS: macOS",
36    "Use Case: Threat Detection",
37    "Tactic: Defense Evasion",
38    "Data Source: Elastic Defend",
39    "Data Source: Sysmon",
40]
41timestamp_override = "event.ingested"
42type = "eql"
43
44query = '''
45file where event.type == "deletion" and
46  file.path : ("C:\\inetpub\\logs\\LogFiles\\*.log",
47               "/var/log/apache*/access.log",
48               "/etc/httpd/logs/access_log",
49               "/var/log/httpd/access_log",
50               "/var/www/*/logs/access.log")
51'''
52
53
54[[rule.threat]]
55framework = "MITRE ATT&CK"
56[[rule.threat.technique]]
57id = "T1070"
58name = "Indicator Removal"
59reference = "https://attack.mitre.org/techniques/T1070/"
60
61
62[rule.threat.tactic]
63id = "TA0005"
64name = "Defense Evasion"
65reference = "https://attack.mitre.org/tactics/TA0005/"

Related rules

to-top