Yes, on the file system device. You don’t own that device object though so
setting flags on it might not be the best idea. A cleaner solution would be
to do the security checks yourself from a filter. This will also give you
finer control to selectively exclude things that won’t be happy about the
restriction.
The particular behavior that I’m talking about is described here:
http://msdn.microsoft.com/en-us/library/ff542068(VS.85).aspx
Aside from that, the usual reading suggestions apply (Windows Internals, the
WDM book, etc) paying close attention to the object manager and security
reference monitor sections.
-scott
–
Scott Noone
Consulting Associate
OSR Open Systems Resources, Inc.
http://www.osronline.com
“Brian” wrote in message news:xxxxx@ntdev…
> So it sounds like a simple file filter driver would be needed as well to
> communicate between my device and this other device. Hmmm at least it’s
> something to experiment with.
>
> What exactly would the FILE_DEVICE_SECURE_OPEN have to be set on, the
> filesystem device? Or something else. Any good recommended readings on
> the subject?
>
> Thanks.
>
> Sent from my iPhone
>
> Brian
>
>
> On Apr 13, 2010, at 5:58 AM, “Scott Noone” wrote:
>
>>> Is there a way to bridge that gap? Ie set a sddl string on "c:" and
>>> all of it’s child objects/containers from the kernel, specifically my
>>> disk filter?
>>
>> That’s exactly what the FILE_DEVICE_SECURE_OPEN device object flag does,
>> so if you could somehow convince the FS to set this bit then it would
>> work. But, I don’t think that there’s any way to do that, so you’d need
>> a filter that would perform the access check for every open.
>>
>> I’ll warn though that this won’t likely lead to the results that you
>> expect. Lots of applications ask for write access even though then never
>> plan on writing to the file. In fact, for application compatibility
>> reasons neither FAT nor NTFS fail opens with write access on read only
>> volumes.
>>
>> -scott
>>
>> –
>> Scott Noone
>> Consulting Associate
>> OSR Open Systems Resources, Inc.
>> http://www.osronline.com
>>
>>
>> “Brian” wrote in message news:xxxxx@ntdev…
>>> Thanks Scott.
>>>
>>> Is there a way to bridge that gap? Ie set a sddl string on "c:" and
>>> all of it’s child objects/containers from the kernel, specifically my
>>> disk filter? For example my driver already determined the drive
>>> letter that matches the partition I physically filter over. I
>>> appreciate your comments.
>>>
>>> Sent from my iPhone
>>>
>>> Brian
>>>
>>> On Apr 13, 2010, at 4:36 AM, “Scott Noone” wrote:
>>>
>>>> You’re up the wrong tree I think. Security only applies to named
>>>> objects, the non-control FS device objects (like the one you got out
>>>> of the VPB) are unnamed.
>>>>
>>>> I don’t have the code in front of me, but I suspect that Device Tree
>>>> is just showing the default DACL since there’s no security on the
>>>> object.
>>>>
>>>> All that you’re doing with locking down the disk/partition/volume
>>>> devices is locking down raw access to the volume. So, if the user
>>>> opens “c:” then your security descriptor will be applied. However, if
>>>> the user opens "c:" then the access check is not performed. At that
>>>> point it becomes the job of the file system to enforce the security
>>>> and you’re in the realm of a file system filter driver.
>>>>
>>>> -scott
>>>>
>>>> –
>>>> Scott Noone
>>>> Consulting Associate
>>>> OSR Open Systems Resources, Inc.
>>>> http://www.osronline.com
>>>>
>>>>
>>>> wrote in message news:xxxxx@ntdev…
>>>>> ok… applying ZwSetSecurityObject on pDeviceObjectTemp-
>>>>> >Vpb-
>>>>> >DeviceObject yeilds a STATUS_NO_SECURITY_ON_OBJECT “Indicates an
>>>>> attempt was made to operate on the security of an object that does
>>>>> not have security associated with it.” So… that didn’t work. If
>>>>> the filesystem device object cannot have a security_descriptor how
>>>>> does DeviceTree show it having a DACL of everyone full access? I’m
>>>>> missing something. But out of ideas for now…
>>>>>
>>>>> Anyone have any suggestions?
>>>>
>>>> —
>>>> NTDEV is sponsored by OSR
>>>>
>>>> For our schedule of WDF, WDM, debugging and other seminars visit:
>>>> http://www.osr.com/seminars
>>>>
>>>> To unsubscribe, visit the List Server section of OSR Online at
>>>> http://www.osronline.com/page.cfm?name=ListServer
>>
>> —
>> NTDEV is sponsored by OSR
>>
>> For our schedule of WDF, WDM, debugging and other seminars visit:
>> http://www.osr.com/seminars
>>
>> To unsubscribe, visit the List Server section of OSR Online at
>> http://www.osronline.com/page.cfm?name=ListServer
>