what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

iis_impersonation.txt

iis_impersonation.txt
Posted Nov 13, 2002
Authored by Li0n | Site li0n.pe.kr

Microsoft IIS 4.0, 5.0, and 5.1 has a vulnerability in dllhost.exe which allows local users to gain 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.

tags | local
SHA-256 | 59f0eed38e0b61e096b9411bafd55ca8111563286a592ed9bc74f3da943e5263

iis_impersonation.txt

Change Mirror Download

*** A3 Security Consulting: CR@K Vulnerability Research ***


Title : MS IIS out of process privilege elevation vulnerability(A3CR@K-Vul-2002-06-002)
Reporter : li0n (li0n@a3sc.co.kr)
Affected software : IIS 4.0, 5.0, 5.1
Risk : High
Local/Remote : Local
Category : Windows - IIS - Privilege elevation
Date : June, 25, 2002

Advisory URL : http://www.li0n.pe.kr/eng/advisory/ms/iis_impersonation.txt



[1] Summary

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.



[2] Affected software

Internet Information Services 4.0
Internet Information Services 5.0
Internet Information Services 5.1



[3] Patch

http://www.microsoft.com/technet/treeview/default.asp?url=/technet/security/bulletin/MS02-062.asp



[4] Testing environments

Microsoft Windows 2000 advanced server with
Service pack2
Security rollup1
Cumulative Patch for Internet Information Services (Q319733)



[5] Required Knowledge

Architecture of Microsoft IIS
Impersonation



[6] 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.



[7] Exploit Code

Not included in this advisory on purpose



[8] Informations

** Vendor status **
Patch Released (MS02-062)


** Credit **
Discovery and exploitation Research : li0n@a3sc.co.kr
Advisor : CR@K TEAM


** Copyright (c) 1999-2002 A3 Security Consulting **
Permission is hereby granted for the redistribution of this alertelectronically.
It is not to be edited in any way without express consent of A3 Security Consulting.
If you wish to reprint the whole or any part of this alert in any other medium
excluding electronic medium, please e-mail li0n@a3sc.co.kr for permission.


** Disclaimer **
The information within this paper may change without notice.
Use of this information constitutes acceptance for use in an AS IS condition.
There are NO warranties with regard to this information. In no event shall the author
or an entity where he belongs be liable for any damages whatsoever arising out of or
in connection with the use or spread of this information.
Any use of this information is at the user's own risk.


** Feedback **
Please send suggestions, updates, and comments to:

A3 Security Consulting Co., Ltd.
http://www.a3sc.co.kr/
Official : li0n@a3sc.co.kr , Private : li0n@li0n.pe.kr


Login or Register to add favorites

File Archive:

September 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Sep 1st
    261 Files
  • 2
    Sep 2nd
    17 Files
  • 3
    Sep 3rd
    38 Files
  • 4
    Sep 4th
    52 Files
  • 5
    Sep 5th
    23 Files
  • 6
    Sep 6th
    27 Files
  • 7
    Sep 7th
    0 Files
  • 8
    Sep 8th
    1 Files
  • 9
    Sep 9th
    16 Files
  • 10
    Sep 10th
    38 Files
  • 11
    Sep 11th
    21 Files
  • 12
    Sep 12th
    40 Files
  • 13
    Sep 13th
    18 Files
  • 14
    Sep 14th
    0 Files
  • 15
    Sep 15th
    0 Files
  • 16
    Sep 16th
    21 Files
  • 17
    Sep 17th
    51 Files
  • 18
    Sep 18th
    23 Files
  • 19
    Sep 19th
    48 Files
  • 20
    Sep 20th
    36 Files
  • 21
    Sep 21st
    0 Files
  • 22
    Sep 22nd
    0 Files
  • 23
    Sep 23rd
    0 Files
  • 24
    Sep 24th
    0 Files
  • 25
    Sep 25th
    0 Files
  • 26
    Sep 26th
    0 Files
  • 27
    Sep 27th
    0 Files
  • 28
    Sep 28th
    0 Files
  • 29
    Sep 29th
    0 Files
  • 30
    Sep 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close