Windows API reference
SetFileAttributesW
Changes file attributes such as hidden, system or read-only.
- Library
- Kernel32.dll
- Category
- Evasion
- Suspicion
- medium
Detection summary
SetFileAttributesW 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
File managers, installers and backup tools; hidden or system attributes are also used for concealment.