Create a new process, three functions CreateProcessAsUser createprocesswithlogonw createprocesswithtokenw (with user's process)

Source: Internet
Author: User
Tags session id

How can createprocessasuser still need a password?

First, Wtsgetactiveconsolesessionid get the current processing activation state SessionID

OpenProcessToken get token of service process

Duplicatetokenex Copy a token

Settokeninformation uses this function to set the session ID of the token to be copied to the SessionID that is activated above.

CreateProcessAsUser Create a user process using the SessionID that you just set up SessionID, this process is created by the user who is logged on,

------------------------------------------------------------------------------------------------

You can try this, using CreateRemoteThread () to create a remote thread execution CreateProcess () in the Explorer.exe process

------------------------------------------------------------------------------------------------

Createprocesswithtoken is possible, but XP does not support this function

In addition, the system permission to use this function can make the created process user into administrator, but not the session ID is still the system

Calling Settokeninformation doesn't seem to work either.

http://bbs.csdn.net/topics/390248917

Create a new process, three functions CreateProcessAsUser createprocesswithlogonw createprocesswithtokenw (with user's process)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.