Launching an administrative interactive process when a standard user is logged on

蓝咒 提交于 2019-11-27 09:23:36

You can duplicate your own token, then change the session on the duplicated token using the SetTokenInformation function to put it into the interactive session.

As you note, running as SYSTEM in an interactive session is discouraged because it gives the interactive user openings to attack your process, potentially gaining elevated privileges. (Search for "shatter attack" for more information.) However, this concern applies equally well to a process running as an administrative user in a non-administrative user's session.

Ideally, you should use a non-administrative process in the interactive session, to perform functions which require an interactive session, while using the service to perform functions which require administrative privilege. There shouldn't be any functions that require both, but if NVAPI breaks this rule, there's not much you can do about it.

Consider launching the process into a specially created (and appropriately secured) workstation in the interactive user's session in order to minimize this risk.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!