Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB.NET
A while back I posted an article on using the service controller to stop the Microsoft Security Essentials service when you need to since they did not add that ability to the program like most AV’s do.
Since then there have been several security updates and now the program no longer works, and returns an inner exception message of Access Denied.
After some research I have narrowed down the problem to the services access control list.
The list from the file menu for the file itself is different than the list when viewed using either Process Explorer or the SC command.
What I am trying to do is find a way to Enumerate the DACL for a given service like using “sc sdshow [service name]” but only prettier in a win forms application.
I have found several examples of getting the DACL for the registry and for files but nothing for services.
Would someone please point me in the right direction?
Thank you for your time.
Posted 21-Nov-12 9:56am
ledtech39.3K
Comments
ledtech3 at 23-Nov-12 0:30am
   
It is begining to look like I will have to learn how to use the API function QueryServiceObjectSecurity located here http://msdn.microsoft.com/en-us/library/windows/desktop/aa379312(v=vs.85).aspx Then I can convert it to the String Format found here http://msdn.microsoft.com/en-us/library/windows/desktop/aa379570(v=vs.85).aspx

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Short of Using the Windows API the best way is to use the command line utility "SC.exe" using the command
sc sdshow [ServiceName]
 
Then Convert it by hand using the list here on MSDN.
http://msdn.microsoft.com/en-us/library/aa374928(v=vs.85).aspx[^]
Or create your own parser.
  Permalink  
Comments
ledtech3 at 6-Jun-13 9:49am
   
Got it.See article Here.
http://www.codeproject.com/Articles/603173/GetplustheplusSecurityplusDescriptorplusofplusaplu

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web01 | 2.8.141022.2 | Last Updated 3 Dec 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100