Link to home
Start Free TrialLog in
Avatar of McKnife
McKnifeFlag for Germany

asked on

NTFS auditing - how to disable recording the creation of alternate data streams?

Hi experts.

I guess this is a tough one:
I have enabled auditing on a folder and let windows record write access to it ("create files/write data").
When I insert "ordinary" files, this works well and 1 file creates 1 eventlog entry - nice.
But If I copy files into it that have alternate data streams, I get 2 eventlog entries, which is very unpleasant, because I use eventlog task-triggering.

Can we tell windows somehow not to create separate event entries for alternate data streams?
--
Example log entry (on windows 8.1):
Object Name:      \Device\HarddiskVolume8\auditFolder\testfile.pdf:Zone.Identifier
Avatar of Coralon
Coralon
Flag of United States of America image

There isn't a practical way to do this.  The alternate data stream support has been around forever in NTFS for Macintosh support.  

You might have an easier time configuring your eventlog triggering to ignore mulitple events that are very close together (i.e. less than 1/2 second etc.)

Coralon
or skip processing if the file name contains ":Zone"
Avatar of McKnife

ASKER

Hi.

I have asked this in another forum and got solutions.
Anyway, I'd like to know, Coralon, how would I "configure eventlog triggering to ignore multiple events that are very close together"
And David, how would I skip this? Auditing is not configurable.
if (filename like "*:Zone") return; //do nothing
else process file
Avatar of McKnife

ASKER

I have setup auditing, auditing writes event, those events trigger a script. So removing/excluding needs to be done at the start of that chain and there is no script to do that. Please note, that this .zone.identifier file is not even visible to explorer, nor to scripts, because it is no file but a stream of another file.
The solution is to use another folder and use eventtriggering again to start this:
remove-item 'c:\folder\*.*' -Stream Zone.Identifier

Open in new window


Edit: @Coralon: I could edit the task so that it won't start again when already running, yes. But unfortunately, I have more than one task that gets triggered, so I would need a way to tell task B: "don't start if task A is already running" which is possible, too, but produces other unwanted effects. So I'll close this and use what I found myself. Thanks!
Avatar of McKnife

ASKER

I've requested that this question be closed as follows:

Accepted answer: 0 points for McKnife's comment #a41017607

for the following reason:

self-solved
please share your solution
ASKER CERTIFIED SOLUTION
Avatar of McKnife
McKnife
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You weren't talking about removing the streams.. you were talking about preventing their creation and dealing with the duplicate events.

Had you been talking about just removing the streams, I'd have recommended using sysinternals streams.exe to delete the extra streams.  But, the powershell stuff obviously works.

Coralon
Avatar of McKnife

ASKER

self-solved