Since an administrator on a Windows system can install a service that logs on as LocalSystem, is it considered bad practice to allow that service to execute programs in a directory known to be protected?
For example, the administrator loads a 3rd-party service that uses CreateProcess to launch an arbitrary executable from a folder (say Program Files). Since that administrator can also change the executable in that folder, is it safe to assume that this is also secure?
Or, could this be abused by someone who happens to gain administrator access, but then use the service to launch a custom process as LocalSystem, which could theoretically hide their tracks, or be a risk for some other reason?
The concern is allowing a Windows service we control to be used to execute arbitrary code, even if it is controlled by a local administrator. Or, should all code executed by the service be signed, and known to the service?