Potential Timestomp in Executable Files

Last updated a month ago on 2026-02-12
Created 3 years ago on 2023-01-17

About

Identifies the modification of a file creation time for executable files in sensitive system directories. Adversaries may modify file time attributes to blend malicious executables with legitimate system files. Timestomping is a technique that modifies the timestamps of a file often to mimic files that are in trusted directories.
Tags
Domain: EndpointOS: WindowsUse Case: Threat DetectionTactic: Defense EvasionData Source: SysmonLanguage: eql
Severity
medium
Risk Score
47
MITRE ATT&CK™

Defense Evasion (TA0005)(external, opens in a new tab or window)

License
Elastic License v2(external, opens in a new tab or window)

Definition

Rule Type
Event Correlation Rule
Integration Pack
Prebuilt Security Detection Rules
Index Patterns
winlogbeat-*logs-windows.sysmon_operational-*
Related Integrations

windows(external, opens in a new tab or window)

Query
text code block:
file where host.os.type == "windows" and event.provider == "Microsoft-Windows-Sysmon" and event.code == "2" and file.extension : ( "exe", "dll", "sys", "msi", "scr", "pif", "lnk" ) and file.path : ( "?:\\Windows\\System32\\*", "?:\\Windows\\SysWOW64\\*", "?:\\ProgramData\\*", "?:\\Users\\Public\\*", "?:\\Users\\*\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\*", "?:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\*" ) and not process.executable : ( "?:\\Program Files\\*", "?:\\Program Files (x86)\\*", "?:\\Windows\\system32\\cleanmgr.exe", "?:\\Windows\\system32\\msiexec.exe", "?:\\Windows\\syswow64\\msiexec.exe", "?:\\Windows\\system32\\svchost.exe", "?:\\Windows\\System32\\Robocopy.exe", "?:\\Windows\\SysWOW64\\Robocopy.exe" ) and not (process.executable : "?:\\Windows\\System32\\spoolsv.exe" and file.path : "?:\\Windows\\System32\\spool\\*") and not user.name : ("SYSTEM", "Local Service", "Network Service")

Install detection rules in Elastic Security

Detect Potential Timestomp in Executable Files in the Elastic Security detection engine by installing this rule into your Elastic Stack.

To setup this rule, check out the installation guide for Prebuilt Security Detection Rules(external, opens in a new tab or window).