What are the security risks in running a Windows Service as “Local System”?

前端 未结 3 1348
遇见更好的自我
遇见更好的自我 2021-01-04 20:11

I have written a .NET Windows service which runs as \"Local System\". Recently I read that, running as local system might expose system credential to hackers enabling them t

3条回答
  •  悲&欢浪女
    2021-01-04 20:48

    Services running as LocalSystem are part of the system's trusted space. Technically speaking, they have the SeTcbName privilege. This means, inter alia, that such services can alter any security settings, grant themselves any privileges, and generally do anything Windows can do.

    As a result, any flaw in your service — unsanitized input passed to system functions, bad dll search paths, buffer overruns, whatever — becomes a critical security hole. This is why no system administrator in an enterprise environment will permit your service to be installed if it runs under LocalSystem. Use the LocalService and NetworkService accounts.

提交回复
热议问题