2

I'm implementing file auditing on a directory on a IIS server in order to get notification when someone attempts to modify or delete any documents.

I set Advanced Auditing Policy\Audit Policies\Object Access:File System to audit Success and Failure.

The next stage according to all the documentation I've read is to set the SACL on whatever files/directories I need to monitor.

However, checking the Security event log before setting the SACLs shows many event id 4656 (A handle to an object was requested). Reading these events shows that they are being raised for access to various system files.

I accessed the Properties dialog for these files/directories and clicked on the Security tab. Next I clicked on Advanced button and selected the Auditing tab. There I see that auditing has been set up for the Everyone user to log all Writes.

I next ran a powershell script:

Get-ChildItem -Path "C:\" -Recurse | ForEach-Object {
    $file = $_.FullName
    $(Get-Acl -Audit $file).GetAuditRules($true,$false, [System.Security.Principal.SecurityIdentifier]) | ForEach-Object { Write-Output $file }
}

to list all files/directories with auditing enabled on them. It turns out that on this IIS box I have over 32,000 files with auditing enabled.

Thinking that I may have enabled these somehow in the past, I next ran the same script against a domain controller and counted a similar number. These were both in a test environment, so I next ran the scripts against another production IIS server (which I didn't build) and got similar results.

Therefore, my questions are:

Is this normal? Are over 32K files installed with Auditing SACLs on them, but the policy initially disabled? Enabling the policy causes the event logs to fill with useless events - on the test IIS server, I noticed about 100 events in an hour.

While I can easily modify the above script to remove these SACLs then add only the ones I need, is this a safe thing to do?

Even more general - have I missed something obvious?

  • Could you please check if you have followed all the steps correctly mentioned in below article : community.spiceworks.com/how_to/… I hope to get some clue of missing steps and take the required action accordingly. – user378448 Sep 30 '16 at 10:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.