我们为Windows服务编写了服务描述符,在该服务中,用户没有特权开始/停止服务,但管理员可以启动/停止服务

发布于 2025-02-13 11:46:33 字数 535 浏览 1 评论 0原文

我们正在尝试制作一项完全由管理员控制的服务,并且用户无法访问诸如START,STOP,REST,重新启动或更改服务的启动类型或使用任务管理器结束服务。 在此阶段,我们的SDDL看起来像:d:p(a ;; cclcswrplocrrcwd ;;; sy)(a ;; cclcswlocrrcwd ;; su ;; su)(a ;; cclcswrplocrrcwd ;; ;; wd)

此SDDL给出以下许可: NT Authority \ Service:访问:允许,权限:仅此对象 - createChild,self,listObject,extendedRight,generiteCexecute,WritedAcl 权威\系统:访问:允许,权限:仅此对象 - createchild,self,gentendedRight,generread,WritedAcl 内置\管理员:访问:允许,权限:仅此对象 - createchild,self,extendedRight,genitedAcl,WritedAcl

当前没有人可以停止服务,但是我们只希望管理员才有特权来停止服务,我们需要设置帮助向上sddl相同!

We are trying to make a service which is entirely controlled by the admin and the user does not have access to do anything like start, stop, restart or change startup type of the service or end the service using task manager.
At this stage our SDDL looks like: D:P(A;;CCLCSWRPLOCRRCWD;;;SY)(A;;CCLCSWLOCRRCWD;;;SU)(A;;CCLCSWRPLOCRRCWD;;;BA)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)

This SDDL gives the following permissions:
NT AUTHORITY\SERVICE: Access: Allow, Permissions: This Object Only - CreateChild, Self, ListObject, ExtendedRight, GenericExecute, WriteDacl
AUTHORITY\SYSTEM: Access: Allow, Permissions: This Object Only - CreateChild, Self, ExtendedRight, GenericRead, WriteDacl
BUILTIN\Administrators: Access: Allow, Permissions: This Object Only - CreateChild, Self, ExtendedRight, GenericRead, WriteDacl

Currently no one can stop the service, but we want only the admin to have privilege to stop the service, We need help with setting up SDDL for the same!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

回梦 2025-02-20 11:46:33

我不确定它是否仍然相关,但是您需要ACE字符串“ WP”。这允许相关的身份(在SID字符串中提到)开始/停止服务。因此,如果您想让管理员停止和启动的能力,则需要使用以下内容(“ BA” SID字符串代表内置管理员,也可以添加管理员帐户的SID)

D:(A;;CCLCSWRPLOCRRCWDWP;;;BA)

:您写道:

D:P(A;;CCLCSWRPLOCRRCWD;;;SY)(A;;CCLCSWLOCRRCWD;;;SU)(A;;CCLCSWRPLOCRRCWDWP;;;BA)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)

I am not sure if it is still relevant, but you need the ACE string "WP". This allows the relevant identity (mentioned in the SID string) to start/stop the service. So if you want to let admins the ability to stop and start, you need to use the following (the "BA" SID string stands for Built-in administrators, you can also add the SID of the administrator account):

D:(A;;CCLCSWRPLOCRRCWDWP;;;BA)

In context of what you wrote:

D:P(A;;CCLCSWRPLOCRRCWD;;;SY)(A;;CCLCSWLOCRRCWD;;;SU)(A;;CCLCSWRPLOCRRCWDWP;;;BA)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文