Skip to content

Response, New York. Noah Park: Check Point Patches Actively Exploited Management Server Path Traversal. Detection, Dallas. Ava Okello: Report Finds Nearly Half of Deployed Detections Need Attention Before SOCs Can Trust Them.

SOCtember

Always First. Fast SOC News.

Microsoft Learn, Audit File System, page explaining that audit events are generated only for objects that have configured system access control lists and only when the access type and account match the SACL.
Screenshot: Microsoft Learn, Audit File System, Microsoft (fair use).

Detection

Did You Know: Turning On Windows File System Auditing Logs Nothing for a Folder Until Someone Gives It a SACL, so Event 4663 Stays Silent Where No One Asked for It

A detection rule that watches Windows Event 4663 for reads or deletions on a sensitive share depends on two settings, not one. Microsoft documents that the Audit File System policy only produces events for files and folders whose system access control list asks for them, and that the default lists produce none.

Ava Okello, DetectionLondon3 min read

LONDON - A Windows detection for someone reading a payroll folder, or deleting files on a finance share, usually rests on Event 4663 in the Security log. Turning on the audit policy is only half of the job. Microsoft's page for the Audit File System subcategory says it "determines whether the operating system generates audit events when users attempt to access file system objects," and then sets the condition: "Audit events are generated only for objects that have configured system access control lists (SACLs), and only if the type of access requested (such as Write, Read, or Modify) and the account making the request match the settings in the SACL." The same page adds: "No audit events are generated for the default file system SACLs."

Microsoft Learn, 4663(S): An attempt was made to access an object, sample event showing a file object, the process name, WriteData and AppendData accesses, and the description that the event generates only if the object's SACL has the required ACE.
Screenshot: Microsoft Learn, 4663(S): An attempt was made to access an object, Microsoft (fair use).

Event 4663 carries the same dependency. Microsoft's reference says "This event generates only if object's SACL has required ACE to handle specific access right use." It also separates 4663 from its neighbor: unlike Event 4656, which records that a handle was requested, "4663 shows that access right was used instead of just requested and 4663 doesn't have Failure events." Failed attempts therefore surface in 4656, not 4663.

Microsoft Learn, 4663(S), access rights table listing DeleteChild, ReadAttributes, WriteAttributes, DELETE as 0x10000, READ_CONTROL and WRITE_DAC.
Screenshot: Microsoft Learn, 4663(S): An attempt was made to access an object, Microsoft (fair use).

What an analyst can see in a 4663 record depends on what the SACL audits. The event lists the account, the object name, the process that touched it and the access used, which Microsoft maps to masks such as WriteData at 0x2 and DELETE at 0x10000. For files that need watching, Microsoft's monitoring advice is to "monitor this event for Object Name in relation to Access Request Information\Accesses."

Microsoft Learn, 4660(S): An object was deleted, text stating that the event does not contain the name of the deleted object, only the Handle ID, and that 4663 with DELETE access is better for tracking deletion.
Screenshot: Microsoft Learn, 4660(S): An object was deleted, Microsoft (fair use).

Deletions add one more trap. Event 4660 records that an object was deleted, but Microsoft notes that "This event doesn't contain the name of the deleted object (only the Handle ID)." Its advice is to use 4663 with DELETE access instead, correlating the two by Handle ID when needed, while keeping in mind that 4663 "also generates during other actions, such as object renaming."

Microsoft Learn, Apply a basic audit policy on a file or folder, Important note that object access auditing must be enabled first, and considerations that auditing works only on NTFS drives and the security log is limited in size.
Screenshot: Microsoft Learn, Apply a basic audit policy on a file or folder, Microsoft (fair use).

The order of setup matters too. Microsoft's guide to auditing a file or folder warns that object access auditing has to be enabled first: "If you don't enable object access auditing, you'll receive an error message when you set up auditing for files and folders, and no files or folders will be audited." The SACL itself is set on the folder's Security tab under Advanced, then Auditing, by a member of the Administrators group or an account with Manage auditing and security log rights, and only on NTFS drives.

For a detection team, three checks follow. List the folders and shares the rules claim to cover, and confirm each one carries a SACL entry for the accesses the rule looks for, such as Write or Delete, for the accounts that matter. Confirm the Audit File System subcategory is enabled for success, and for failure if 4656 failures are wanted, on the servers that host them. And size the Security log for the volume, since Microsoft warns "Do not enable this subcategory if you have not planned how to use and analyze the collected information" and recommends deleting excess SACLs. A rule built on 4663 cannot fire for a folder that was never told to report.

About the Author

Ava Okello

Ava Okello covers detection engineering, EDR telemetry, and SOC hunting for SOCtember from London.

Related stories

Detection desk