|
|
|
|
| |
An impersonation vulnerability of dllhost.exe allows a local user to gain the SYSTEM privilege.
This vulnerability arises from the fact that the process of dllhost.exe harbors an impersonation token of SYSTEM account while processing user's request. Because a process of dllhost.exe is executed with IWAM_machinename privilege, an attacker can manipulate the process's memory space and steal the SYSTEM privilege when the process has the impersonation token of SYSTEM account. In other words, an attacker can execute arbitrary codes with SYSTEM privilege through this impersonation. |
| |
Credit:
The original advisory can be downloaded at:
http://www.li0n.pe.kr/eng/advisory/ms/iis_impersonation.txt
The information has been provided by li0n.
|
| |
Vulnerable systems:
* Internet Information Services 4.0
* Internet Information Services 5.0
* Internet Information Services 5.1
Patch:
http://www.microsoft.com/technet/treeview/default.asp?url=/technet/security/bulletin/MS02-062.asp
Technical Details:
Microsoft IIS provides two protection modes, in-process mode and out-of-process mode. If IIS is set to in-process mode, .asp request and ISAPI DLLs are executed within inetinfo.exe process that is running with SYSTEM privilege. So, an attacker can obtain SYSTEM privilege easily with some effort to control the process to serve his purpose.
On the other hand, if IIS is set to out-of-process mode, .asp request and ISAPI DLLs are executed within dllhost.exe process which is running with IWAM_machinename account. In this case, an attacker can only obtain IWAM_machinename account even if he or she is successful with the attack. For reference, the default setting for IIS4 is in-process and the default setting for IIS5 is out-of-process.
dllhost.exe process calls ole32!CoImpersonateClient function to process user's request. If CoImpersonateClient function returns successfully, the process becomes to harbor an impersonation token of SYSTEM account for a moment. Later on, dllhost.exe process finishes up its impersonated SYSTEM privilege by calling RevertToSelf function to destroy SYSTEM privilege and returns to IWAM_machinename privilege.
Because a process of dllhost.exe is executed with IWAM_machinename privilege, an attacker can manipulate the process's memory space and steal the SYSTEM privilege when the process has the impersonation token of SYSTEM account.
For an example, an attacker can make dllhost.exe process call MyCoImpersonateClient function instead of ole32!CoImpersonateClient function using API hooking technique. An attacker can forge a MyCoImpersonateClient function and he or she can execute malicious code using SYSTEM privilege.
Another method to execute malicious code is to attach the dllhost.exe process to a debugger and modify dllhost.exe process's memory contents.
An attacker can create and assign an arbitrary account to the local administrator group exploiting this vulnerability and execute programs with administrator privilege.
|
|
|
|
|