Sysinternals Homepage
Forum Home Forum Home > Windows Discussions > Development
  New Posts New Posts RSS Feed: Recreate Process Token
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Recreate Process Token

 Post Reply Post Reply
Author
Message Reverse Sort Order
Matts_User_Name View Drop Down
Senior Member
Senior Member
Avatar

Joined: 10 August 2006
Location: USA
Online Status: Offline
Posts: 675
Post Options Post Options   Quote Matts_User_Name Quote  Post ReplyReply Direct Link To This Post Topic: Recreate Process Token
    Posted: 08 August 2008 at 8:41pm
Eh in that case I would just have the thread impersonate the token I wanted and then do a CreateProcessAsUser, although I was just curious if someone has actually tried to recreate a process token before (and perhaps give some feedback on if it is do-able or not)

It's more of an experimental project than anything else (want to see if it will be possible to modify a token using a higher token to replace a lower one, which in turn could "Enable" privileges not held[Removed Privileges]), but I figured I might as well ask first before I try it eventually, just to know incase it is not possible and I start flipping out about how much time I wasted on a deadend project haha.
Back to Top
Diablo View Drop Down
Senior Member
Senior Member
Avatar

Joined: 16 July 2008
Location: Western Sahara
Online Status: Offline
Posts: 251
Post Options Post Options   Quote Diablo Quote  Post ReplyReply Direct Link To This Post Posted: 08 August 2008 at 8:09pm
You can create process yourself, reproduce all windows steps and try to create appreciate token for the process.
Back to Top
Matts_User_Name View Drop Down
Senior Member
Senior Member
Avatar

Joined: 10 August 2006
Location: USA
Online Status: Offline
Posts: 675
Post Options Post Options   Quote Matts_User_Name Quote  Post ReplyReply Direct Link To This Post Posted: 08 August 2008 at 7:33pm


Hey there.

I am wondering if it is possible to Recreate a process's  token without restarting it? I know you can with a thread (using impersonation), so I am curious if the same can be done with a process, where its token can possibly be changed as well.

I know the caller will need SeAssignPrimaryTokenPrivilege and will have to have TOKEN_ASSIGN_PRIMARY (Token-Specific Object access right) to the target's token object (handle).

Once I have this privilege (in the caller's token) and access right (to the targets token) do you know of an API that will do this (Replace the current token with the new one that I specify, without having to rerun the prcoess?)

I was thinking one these might work:
NtCreateToken
CreateRestrictedToken
SetTokenInformation

Any Ideas?



Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down