File Creation Time Changed

Identifies modification of a file creation time. Adversaries may modify file time attributes to blend malicious content with existing files. Timestomping is a technique that modifies the timestamps of a file often to mimic files that are in trusted directories.

Elastic rule (View on GitHub)

 1[metadata]
 2creation_date = "2023/01/17"
 3integration = ["windows"]
 4maturity = "production"
 5min_stack_comments = "New fields added: required_fields, related_integrations, setup"
 6min_stack_version = "8.3.0"
 7updated_date = "2024/03/08"
 8
 9[rule]
10author = ["Elastic"]
11description = """
12Identifies modification of a file creation time. Adversaries may modify file time attributes to blend
13malicious content with existing files. Timestomping is a technique that modifies the timestamps of 
14a file often to mimic files that are in trusted directories.
15"""
16from = "now-9m"
17index = ["winlogbeat-*", "logs-windows.sysmon_operational-*"]
18language = "eql"
19license = "Elastic License v2"
20name = "File Creation Time Changed"
21risk_score = 47
22rule_id = "166727ab-6768-4e26-b80c-948b228ffc06"
23severity = "medium"
24tags = [
25    "Domain: Endpoint",
26    "OS: Windows",
27    "Use Case: Threat Detection",
28    "Tactic: Defense Evasion",
29    "Data Source: Sysmon"
30]
31timestamp_override = "event.ingested"
32type = "eql"
33
34query = '''
35file where host.os.type == "windows" and event.code : "2" and
36
37 /* Requires Sysmon EventID 2 - File creation time change */
38 event.action : "File creation time changed*" and 
39 
40 not process.executable : 
41          ("?:\\Program Files\\*", 
42           "?:\\Program Files (x86)\\*", 
43           "?:\\Windows\\system32\\cleanmgr.exe",
44           "?:\\Windows\\system32\\msiexec.exe", 
45           "?:\\Windows\\syswow64\\msiexec.exe", 
46           "?:\\Windows\\system32\\svchost.exe", 
47           "?:\\WINDOWS\\system32\\backgroundTaskHost.exe",
48           "?:\\Users\\*\\AppData\\Local\\Google\\Chrome\\Application\\chrome.exe", 
49           "?:\\Users\\*\\AppData\\Local\\Mozilla Firefox\\firefox.exe",
50           "?:\\Users\\*\\AppData\\Local\\slack\\app-*\\slack.exe", 
51           "?:\\Users\\*\\AppData\\Local\\GitHubDesktop\\app-*\\GitHubDesktop.exe",
52           "?:\\Users\\*\\AppData\\Local\\Microsoft\\Teams\\current\\Teams.exe", 
53           "?:\\Users\\*\\AppData\\Local\\Microsoft\\OneDrive\\OneDrive.exe") and 
54 not file.extension : ("temp", "tmp", "~tmp", "xml", "newcfg") and not user.name : ("SYSTEM", "Local Service", "Network Service") and
55 not file.name : ("LOG", "temp-index", "license.rtf", "iconcache_*.db")
56'''
57
58
59[[rule.threat]]
60framework = "MITRE ATT&CK"
61[[rule.threat.technique]]
62id = "T1070"
63name = "Indicator Removal"
64reference = "https://attack.mitre.org/techniques/T1070/"
65[[rule.threat.technique.subtechnique]]
66id = "T1070.006"
67name = "Timestomp"
68reference = "https://attack.mitre.org/techniques/T1070/006/"
69
70
71[rule.threat.tactic]
72id = "TA0005"
73name = "Defense Evasion"
74reference = "https://attack.mitre.org/tactics/TA0005/"

Related rules

to-top