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
LVL 60
McKnifeAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

CoralonCommented:
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
0
David Johnson, CD, MVPOwnerCommented:
or skip processing if the file name contains ":Zone"
0
McKnifeAuthor Commented:
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.
0
Top Threats of Q1 & How to Defend Against Them

WEBINAR: Join WatchGuard CTO and our Threat Research Team on Aug. 2nd to hear the findings from our Q1 Internet Security Report! Learn more about the top threats detected in the first quarter and how you can defend your business against them!

David Johnson, CD, MVPOwnerCommented:
if (filename like "*:Zone") return; //do nothing
else process file
0
McKnifeAuthor Commented:
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!
0
McKnifeAuthor Commented:
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
0
David Johnson, CD, MVPOwnerCommented:
please share your solution
0
McKnifeAuthor Commented:
I did already. You saw the code?
The entire code (here for pdf files in c:\folder) is
get-item 'C:\folder\*.pdf' -Stream * | ?{$_.Stream -notlike ':$DATA'} | %{remove-item $_.FileName -Stream $_.Stream -Force}

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
CoralonCommented:
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
0
McKnifeAuthor Commented:
self-solved
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Legacy OS

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.