Such a pain I wrote “I Just Wanted to Install My Dam Driver on Windows 7…”
http://ndis.blogspot.com/2009/03/i-just-wanted-to-install-my-dam-driver.html
Thomas
From: Gary G. Little
Sent: Monday, May 17, 2010 4:39 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Getting a driver handle
PITA agreed.
Thanks for the reply Thomas.
Unfortuantely, or maybe fortunately, XP compatibility is not an option since this is a Windows Filtering Platform driver which is not compatible with XP. So, I shall attempt my very first ever ACL list and have something other than a NULL in that third parameter.
Gary G. Little
H (952) 223-1349
C (952) 454-4629
xxxxx@comcast.net
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Thomas F. Divine
Sent: Monday, May 17, 2010 3:29 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Getting a driver handle
When you create your symbolic link DACL use something other than NULL DACL. Try this:
“D:(D;OICI;GA;;;BG)(D;OICI;GA;;;AN)(A;OICI;GRGWGX;;;AU)(A;OICI;GA;;;BA)”
This discretionary ACL:
* Deny access to Built-in Guests
* Deny access to Anonymous Logon
* Allow read/write/execute to Authenticated Users
* Allow full control to Administrators
Windows 7 is more restrictive than prior versions when it comes to DACLs.
You can also run your app in XP compatibility mode. This bales the security operations more like the XP versions you are used to.
PITA.
Hope this helps.
Thomas F. Divine
From: Gary G. Little
Sent: Monday, May 17, 2010 4:16 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Getting a driver handle
I’ve done this many times, but this is the first time on Win7 . I need to open a handle to my driver from a user application, but I keep getting an access denied error code. I’ve based the code on NonPnp in the latest WinDDK, and from desk checking I don’t see anything that could cause the problem. The code is different because the task at hand is different, but the basics of creating the driver and device objects appear to be the same. I do set the file for exclusive open since it is imperative that only one handle be open to the driver at a time.
The parameter list I use for CreateFile is as follows:
name,
GENERIC_READ | GENERIC_WRITE,
0,
NULL,
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED ,
NULL
I have even used this variant:
GENERIC_READ | GENERIC_WRITE,
0,
NULL,
CREATE_ALWAYS,
FILE_ATTRIBUTE_NORMAL,
NULL
But with the same result: Access Denied.
I’ve also tested opening \.\PhysicalDrive0 and that succeeded. That tends to tell me that my problem resides in the kernel side. Is an access list required for opening a handle to a device driver now, or must access be set prior to opening that handle? Hmpf, or have I simply bolaxed up the interface?
Gary G. Little
H (952) 223-1349
C (952) 454-4629
xxxxx@comcast.net
__________ Information from ESET Smart Security, version of virus signature database 5122 (20100517) __________
The message was checked by ESET Smart Security.
http://www.eset.com
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
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
__________ Information from ESET Smart Security, version of virus signature database 5122 (20100517) __________
The message was checked by ESET Smart Security.
http://www.eset.com
__________ Information from ESET Smart Security, version of virus signature database 5122 (20100517) __________
The message was checked by ESET Smart Security.
http://www.eset.com
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