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

Related rules

to-top