存在真正的“提升进程(线程)权限”程序吗?

据我所知,从用户态角度来说,是不可能的。

 

网上流传的两个提升权限API :公开的AdjustTokenPrivileges or 未公开的RtlAdjustPrivliege 其实只是将进程(线程)Access Token中已经拥有的特权(Previlege)从Disable改为Enable。

 

未公开的RtlAdjustPrivilege在内部也是通过调用AdjustTokenPrivileges。而MSDN对AdjustTokenPrivileges的说明如下:

 

1、The AdjustTokenPrivileges function cannot add new privileges to the access token. It can only enable or disable the token's existing privileges.

 

2、The NewState parameter can specify privileges that the token does not have, without causing the function to fail. In this case, the function adjusts the privileges that the token does have and ignores the other privileges so that the function succeeds.

 

网上给的例子之所以成功,原因是:运行“提升权限”程序的Access Token本身就是系统管理员;系统管理员的特权最高。所以,AdjustTokenPrivileges总是成功。

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值