枚举为运行服务DACL [英] Enumerate as running service DACL

查看:63
本文介绍了枚举为运行服务DACL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

前段时间我发布了一篇关于使用服务控制器停止Microsoft Security Essentials服务的文章,因为他们没有像大多数AV那样将该功能添加到程序中。

自然后有几个安全更新,现在程序不再有效,并返回Access Denied的内部异常消息。

经过一番研究后,我已将问题缩小到服务访问控制列表。

文件本身的文件菜单中的列表与使用查看时的列表不同Process Explorer或SC命令。

我想要做的是找到一种方法来枚举给定服务的DACL,比如使用sc sdshow [service name],但在胜利中只是更漂亮表格申请。

我找到了几个获取注册表和文件的DACL但没有服务的例子。

有人请指点我正确的方向吗? br />
感谢您的时间。

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.

推荐答案

使用Windows API的最佳方法是使用命令行实用程序SC.exe 使用命令
Short of Using the Windows API the best way is to use the command line utility "SC.exe" using the command
sc sdshow [ServiceName]





然后使用MSDN上的列表手动转换它。

http://msdn.microsoft.com/en-us/library/aa374928(v=vs.85).aspx [ ^ ]

或者创建自己的解析器。



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.


这篇关于枚举为运行服务DACL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆