Enable Security Auditing using VBSCRIPT

Enable Security Auditing using VBSCRIPT

Secure Home | Search | About
 Microsoft Applications Security    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content add this group's latest topics to your Google content
Subject Author Date
Enable Security Auditing using VBSCRIPT Jef Dye 06-04-2007
Posted by =?Utf-8?B?SmVmIER5ZQ==?= on June 4, 2007, 7:27 pm
If you were  Registered and logged in, you could reply and use other advanced thread options
I have a project for Windows XP and 2003 where I need to enable auditing to
record failed access on the C:\ or some if its folders. I wan to do it with
VBSCRIPT. Does anyone have a script to do that?

Normally, you would set this by selecting properties of a folder, and
clicking on the security tab. Next click on Advanced and then the Auditing
tab. Click Add and then type in "everyone" and click OK. Finally, select the
Failed Full Control check box and click OK, OK, and OK.

Thanks. Jef


Posted by S. Pidgorny on June 5, 2007, 5:04 am
If you were  Registered and logged in, you could reply and use other advanced thread options
SACL manipulation can be done using WMI.
http://msdn2.microsoft.com/en-us/library/aa393592.aspx gives an idea and
some sample code.

--
--
Svyatoslav Pidgorny, MS MVP - Security, MCSE
-= F1 is the key =-

* http://sl.mvps.org * http://msmvps.com/blogs/sp *

>I have a project for Windows XP and 2003 where I need to enable auditing to
> record failed access on the C:\ or some if its folders. I wan to do it
> with
> VBSCRIPT. Does anyone have a script to do that?
>
> Normally, you would set this by selecting properties of a folder, and
> clicking on the security tab. Next click on Advanced and then the Auditing
> tab. Click Add and then type in "everyone" and click OK. Finally, select
> the
> Failed Full Control check box and click OK, OK, and OK.
>
> Thanks. Jef
>



Posted by =?Utf-8?B?SmVmIER5ZQ==?= on June 6, 2007, 12:45 pm
If you were  Registered and logged in, you could reply and use other advanced thread options

I looked threw all of the info on the link but none of it covers the adding
of audit functions to a folder or drive. Does anyone have any other ideas?

Thanks in advance.

Jef


"S. Pidgorny <MVP>" wrote:

> SACL manipulation can be done using WMI.
> some sample code.
>
> --
> --
> Svyatoslav Pidgorny, MS MVP - Security, MCSE
> -= F1 is the key =-
>
> * http://sl.mvps.org * http://msmvps.com/blogs/sp *
>
> >I have a project for Windows XP and 2003 where I need to enable auditing to
> > record failed access on the C:\ or some if its folders. I wan to do it
> > with
> > VBSCRIPT. Does anyone have a script to do that?
> >
> > Normally, you would set this by selecting properties of a folder, and
> > clicking on the security tab. Next click on Advanced and then the Auditing
> > tab. Click Add and then type in "everyone" and click OK. Finally, select
> > the
> > Failed Full Control check box and click OK, OK, and OK.
> >
> > Thanks. Jef
> >
>
>
>

Posted by Roger Abell [MVP] on June 6, 2007, 1:05 pm
If you were  Registered and logged in, you could reply and use other advanced thread options

>
> I looked threw all of the info on the link but none of it covers the
> adding
> of audit functions to a folder or drive. Does anyone have any other ideas?
>
Actually, what Slav provided in link is relevant. One just needs to
access the SACL instead of the DACL in the SD. That is, where that
sample uses "DACL = wmiSecurityDescriptor.DACL" one would
instead use "SACL = wmiSecurityDescriptor.SACL"
Since what you get is of Win32_ACE Wmi class, the rest of the
code is no different in what properties and methods may be used
or how.

If you go to microsoft.com/downloads and get the xcacls.vbs script
you will have a code that can modify any aspect of a DACL. It is a
trivial modification per the above info to manipulate the SACL instead
of the DACL and the xcacls.vbs provides examples of doing so.

You may need to do some reading branching off from
http://msdn2.microsoft.com/en-us/library/aa384905.aspx
which is a link on the page to which Slav pointed you.

Roger

>
> "S. Pidgorny <MVP>" wrote:
>
>> SACL manipulation can be done using WMI.
>> some sample code.
>>
>> --
>> --
>> Svyatoslav Pidgorny, MS MVP - Security, MCSE
>> -= F1 is the key =-
>>
>> * http://sl.mvps.org * http://msmvps.com/blogs/sp *
>>
>> >I have a project for Windows XP and 2003 where I need to enable auditing
>> >to
>> > record failed access on the C:\ or some if its folders. I wan to do it
>> > with
>> > VBSCRIPT. Does anyone have a script to do that?
>> >
>> > Normally, you would set this by selecting properties of a folder, and
>> > clicking on the security tab. Next click on Advanced and then the
>> > Auditing
>> > tab. Click Add and then type in "everyone" and click OK. Finally,
>> > select
>> > the
>> > Failed Full Control check box and click OK, OK, and OK.
>> >
>> > Thanks. Jef
>> >
>>
>>
>>



Similar ThreadsPosted
Enable file auditing on many servers December 22, 2006, 2:21 pm
How to enable Auditing to trace who disabled user's account. January 20, 2006, 12:05 pm
Auditing / File Security May 22, 2008, 1:02 pm
Security Event Log Performance for File and Folder Auditing January 26, 2007, 3:59 pm
Checking Folder Ownership and Permissions in VBScript November 11, 2005, 2:50 pm
Expired Code Signing Cert with VBScript September 12, 2006, 9:17 am
Problem with system account, tasks, VBScript, .NET and Components! October 17, 2006, 7:16 am
Should I enable TLS 1.0? October 27, 2006, 7:38 pm
GPO Enable Volume Icon in Systray March 23, 2006, 9:40 am
How To enable windows defender to run on startup July 24, 2006, 11:00 pm

The site map in XML format XML site map

Contact Us | Privacy Policy