Click here to Skip to main content
15,867,835 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have retrieved and duplicated a token (via
OpenProcessToken()
and
DuplicateTokenEx()
) from a process running under the context of a Standard User.

Is it possible to provide this token alone with administrative privileges so that such user can access network shares etc ?

If yes, please share a code fragment or article(s) which achieves this.

Thanks

What I have tried:

At this point I have been able to duplicate a token from a process running under a low privilege user, but I would like to know how to modify that token alone to provide admin rights to it.
Posted
Updated 6-Oct-20 2:19am
Comments
Richard Deeming 6-Oct-20 5:12am    
I suspect that would be a massive security vulnerability if it were possible.
curiousward 6-Oct-20 6:11am    
This application is a service running under Local System.

1 solution

You cant "elevate" tokens or processes because of security reasons Microsoft doenst allow that.

For your case it is best to create a new process with CreateProcessWithLogonW.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900