Defense evasion · Windows · LOLBAS
fsutil.exe
File System utility
Manages NTFS and volumes. Deleting the USN change journal hides recent file activity, and its file commands can zero out or inflate files, so journal and file operations are worth checking.
Legitimate use
Admins use it to query and manage NTFS features, quotas and volumes.
Subcommands
USN change journal context. deletejournal removes the record of recent file changes.
HighDeletes the USN journal on a volume, hiding recent file creation and change activity.
HighFile operations. setzerodata zeroes a file; createnew can inflate a file to exhaust disk.
MediumZeroes out the content of a file, destroying it in place.
HighVolume operations, including dismount.
LowCommand lines to worry about
- High
USN journal deleted
Deleting the USN change journal removes a record of recent file creation and change. A targeted anti-forensics step.
Detection regex
fsutil(\.exe)?\s+usn\s+deletejournal\b - High
File zeroed out
setzerodata overwrites a file's content with zeros, destroying it in place rather than just deleting it.
Detection regex
fsutil(\.exe)?\s+file\s+setzerodata\b
Where it is recorded
- Security4688Process creation with the full command line, when command-line auditing is enabled.
- Sysmon1Process creation with command line, hashes and parent process.
Community detections
4 SigmaHQ rules for fsutil.exe. The explainer checks every pasted command line against all of them.
- HighFsutil Suspicious Invocation
Detects suspicious parameters of fsutil (deleting USN journal, configuring it with small size, etc). Might be used by ransomwares during the attack (seen by NotPetya and others).
T1070T1485by Ecco, E.M. Anhaus, oscd.community
- HighSuspicious Spool Service Child Process
Detects suspicious print spool service (spoolsv.exe) child processes.
T1203T1068by Justin C. (@endisphotic), @dreadphones (detection), Thomas Patzke (Sigma rule)
- HighWebshell Hacking Activity Patterns
Detects certain parent child patterns found in cases in which a web shell is used to perform certain credential dumping or exfiltration activities on a compromised system
T1505.003T1018T1033T1087by Florian Roth (Nextron Systems)
- LowFsutil Drive Enumeration
Attackers may leverage fsutil to enumerated connected drives.
T1120by Christopher Peacock '@securepeacock', SCYTHE '@scythe_io'
Rules from SigmaHQ (rules/windows/process_creation), Detection Rule License (DRL) 1.1. Each rule links to its source and credits its authors.