Windows API reference
SetEndOfFile
Sets the physical end of a file at the current file pointer.
- Library
- Kernel32.dll
- Category
- Helper, Ransomware
- Suspicion
- low
- MITRE ATT&CK
- T1485 Data Destruction
Detection summary
SetEndOfFile maps to Microsoft-Windows-Kernel-File; these events record the OS effect, not the API call.
- Sysmon: No Sysmon event mapped
- ETW: Microsoft-Windows-Kernel-File
- Notes: 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
Common in general Windows applications; usage varies by application type.
Related APIs
- SetFilePointer — Kernel32.dll