User Security for a File

I am trying to write relevance to find if users have read access to the file C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config. I have tried the following, but I am not sure how to interpret it.

dacls of security descriptors of File "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config" as string

Returns: D:(A;ID;0x1200a9;;;IS)(A;ID;FA;;;SY)(A;ID;FA;;;BA)(A;ID;0x1200a9;;;BU)

Try this!

trustees of (entries of dacl of security descriptors of file "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config")

Returns:

A: NT AUTHORITY\SYSTEM
A: BUILTIN\Administrators
A: BUILTIN\Users
A: APPLICATION PACKAGE AUTHORITY\ALL APPLICATION PACKAGES

This will return users and groups that have access!

2 Likes

Thats awesome. I don’t think I knew about that.

I’ve done it this way in the past:

1245631 != effective access mode for "Users" of dacl of security descriptor of

Related:

2 Likes