Click here to Skip to main content
15,881,092 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Comments
ledtech3 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

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.
 
Share this answer
 
Comments
ledtech3 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)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900