Traverse window rights issue

First, the problem: get the desktop window data, but in the system privileges and session0, acquisition window in less than a non-system permissions and session1.

  Analysis: traversing the window at session0 and session1 different privileges, whether there is a window of data acquisition impact?

Second, the process privilege:

  For security system, Windows system into a variety of permissions to control user access to data and programs that can effectively prevent attacks from viruses. Especially when the beginning of the vista system, Windows provides the UAC mechanism, even if the currently logged on user rights administrator, run programs or modify certain administrative privileges required data administrator privileges, the system will pop up a desktop window covers, whether the user is prompted to perform an operation or cancel the operation. So why the administrator account will be blocked off UAC? Here, probably explain the internal mechanisms under UAC, UAC when the system is turned on, if the current administrator account login, the system will save the token token and an administrator of a general authority, using ordinary rights token by default. If the current ordinary account login, the system will save the token of a common authority. When you run the data required administrator privileges or administrator privileges to modify the system will start UAC mechanism, covering desktop pop-pop. Currently Windows permissions system provides: Ultra-pipe (above the system privileges), system privileges, rights administrator, normal user privileges. Carry out their duties in different processes in different jurisdictions. Among them, system privileges and above process (usually service process), running session0 layer is generally not receive Windows messages, which is why no window service program.

  

 

 

             (UAC arranged inlet (Vista system))

 

Third, the problem of verification:

  1, ordinary permissions:

    

 

     Timely other windows corresponding process rights are an administrator, you can also scan to normal.

 

  2, administrator privileges:

  

 

     Session1 lower layer administrator privileges, to the normal scanning window: for example: everything.

  3, system permissions:

 

     seesion0 layer is the service layer, not the display window, you can view by debugview. The system authority session1 layer, scanning the Windows system permissions are the session1.

 

IV Summary:

  For some of the features of Windows window involves seesion1 layer, such as scan, a window, shots (not involving driving layer), etc. Do not use the system privileges and session (session layer) not in the service layer, or it may lead to failure. webrtc screenshot function, the system can start the process privilege, but certainly non-session0 layer. If in some cases, the process is necessary to use the system privileges, but some threads functions related to administrator rights, this can be achieved, but must be thread down the right, but does not guarantee the right to be able to function properly after the drop achieved.

Guess you like

Origin www.cnblogs.com/smartNeo/p/11441562.html