Exercise 1: Identifying UIPI
In this exercise you will investigate two processes that communicate via windows messages, but where communication fails (at least in one direction) due to unequal integrity levels.
Task 1– Make Sure UAC is Active
In this task, you will confirm that User Account Control (UAC) is active. This will allow the problem to occur.
From Start:
- Click Control Panel,
- Click User Accounts and Family Safety.
- Click User Accounts.
Click Change User Account Control Settings. A dialog box similar to the following should appear:
Help
Alternatively, click
Start, click
Run, and type
UAC. Then click
Change User Account Control Settings.
- Make sure the slider is set at the default level as pictured(you can set it to another level, but not to Never notify, as this disables UAC).
Click OK.
Task 2 – Identify the Problem
- Navigate to the PingPongBroken\Debug folder.
- Double-click BrokenNativePingPong.exe file. A blank window should appear.
Double-click BrokenNativePingPong.exe file again. You should see a message, “Ping Pong,” bouncing between two similar windows:
Help
This is the correct behavior. Both processes run with standard user privileges with the same integrity level. To verify this follow the next steps.
- Open Process Explorer from Windows Sysinternals. (You can install Process Explorer from www.microsoft.com/technet/sysinternals).
- Right-click the process view header.
Click Select Columns as shown in the following image.
- Make sure the Integrity Level check box is selected, or else you will not see and have hard time completing this lab.
Click OK to confirm your selection.
Navigate to the BrokenNativePingPong.Exe processes and look at the integrity level
Help
It should be medium. This is the default integrity level of processes started with standard user privileges.
- Close both Ping Pong windows
- Double-click BrokenNativePingPong.Exe to run the first instance as before.
- For the second instance, Right-click it
- Click Run as administrator
Satisfy the UAC prompt presented (alternatively, just double-click NativePingPongLoader.Exe and it will do both things automatically)
Watch Out
You’ll find that the message, “Ping Pong,” no longer works.
Open Process Explorer as before and look at the integrity levels:
Help
Running as administrator, the process is running with a high integrity level instead of normal integrity level. This is the cause of the problem. A process cannot send or post windows messages to another process with a higher integrity level.
- Close both Ping Pong windows