Windows API reference
SetFileTime
Sets file creation, access and write timestamps.
- Library
- Kernel32.dll
- Category
- Evasion
- Suspicion
- medium
- MITRE ATT&CK
- T1070.006 Indicator Removal: Timestomp
Detection summary
SetFileTime maps to Sysmon Event 2 and Microsoft-Windows-Kernel-File; these events record the OS effect, not the API call.
- Sysmon: Sysmon Event 2
- ETW: Microsoft-Windows-Kernel-File
- Notes: Sysmon Event 2 records a changed file creation timestamp; correlate it with later writes or renames of the same path. Microsoft-Windows-Kernel-File records file create, read, write, rename and close operations when enabled.
Sources and documentation
- Microsoft Learn documentation (direct documentation)
Not yet human-reviewed. Page metadata generated .
Legitimate use
Backup, archive and file-management tools that preserve timestamps; also used for timestomping.