Skip to main content

Watched files on Windows

These four decoys install nothing on the server. They use Windows file auditing and a scheduled task that alerts the node's beacon receiver, so they need that receiver deployed and verified.

  • Ransomware sentinel: creates three files (.xlsx, .docx and .csv) in each folder you specify. Paths are local, on the server itself; a NAS won't work.
  • Bait KeePass: download the database from the decoy's page and leave it at the path you specified before running the steps. Opening or copying it alerts, and its credentials lead to your decoys.
  • Fake password in SYSVOL: leaves a Groups.xml with a cpassword in an unlinked GPO with its settings disabled, which no machine processes: whoever reads it is walking SYSVOL. The password is invented and gives access to nothing; this version alerts on the file being read, not on the password being used. Run the steps first on the domain controller with the PDC emulator role, which creates the GPO, and, once it has replicated, on each of the others: the audit rule and the task exist only where the steps are run, and whoever reads SYSVOL reaches the controller that serves them. To remove it, run the removal first on the other domain controllers and last on the PDC emulator, which deletes the GPO. The limit under "If you test it by hand" also applies here: what a controller reads from itself through \\domain\SYSVOL is not audited.
  • Folder that gives you away: creates a folder, with a subfolder inside, in the parent folder you specify, which must be a local path inside a shared resource. It alerts on who opens it with Explorer, with their account and their machine's IP. Seeing the folder when listing the parent does not alert, because the watched file is the subfolder's desktop.ini. It does not detect anyone who doesn't open it with Explorer: a command-line tool or a script that only lists it may not trigger it. If the folder already exists and the decoy didn't create it, the steps stop without touching anything. When removing it, if someone has left something inside, that folder is not deleted and the steps say so. On Windows 11 it doesn't depend on SMB signing or on blocking outbound NTLM. Verified from Windows 11 against Windows Server 2019: dir, dir /s and Get-ChildItem -Recurse do not alert; reading the subfolder's desktop.ini and robocopy /E do. Double-clicking in Explorer is still to be verified.

An administrator runs the steps in a PowerShell opened as administrator: the console does not connect to the server.

What alerts: a read is an alert; a write or a delete, a serious one. If backups read those files, add their account or their program under "Reads that don't alert". Writing or deleting always alerts, whoever does it. On network access, Windows gives the account and the machine's IP, but not the program: those reads can only be excluded by account.

If the test doesn't arrive: check that the machine can reach the beacon receiver and that no group policy prevents running PowerShell scripts.

If you test it by hand: do it through the local path (C:\...) or from another machine. What the server itself reads through \\server\folder is not audited and does not alert, verified on Windows Server 2019. For the same reason, an attacker who is already inside the server and reads through that path does not trigger the alert.

If a group policy turns auditing off: it happens with any policy that uses advanced auditing, even one that doesn't mention files: on every refresh it leaves unaudited whatever it doesn't mention. The task detects it and turns it back on within seconds. So that gap doesn't remain, also enable "Audit File System" in the policy.

If the machine stops giving signs of life: the task sends one signal a day. After three days without it, the decoy shows as degraded and, if you have health alerts enabled, the alert reaches you. When you remove it, the steps remove the task and the files and leave auditing as it was.