J-Security Center

Title: MS IIS/PWS Escaped Characters Decoding Command Execution Vulnerability

Severity: CRITICAL

Description:

A vulnerability in Microsoft IIS could enable a remote user to execute arbitrary commands. This issue stems from the handling of CGI filename program requests.

By default, IIS performs two seperate actions on CGI requests:

1. IIS decodes the filename to determine the filetype (.exe, .com, etc.) and the legitimacy of the file. IIS then carries out a security check.

2. IIS decodes CGI parameters to determine whether the file will be processed or not.

The final process includes an undocumented third action: Not only does IIS identify the supplied CGI parameters, it also decodes the CGI filename previously approved during the security check. Therefore, if a filename composed of escaped characters passes the security check, the second process will unescape the escaped characters contained in the filename, revealing the intended actions. Depending on what the escaped characters represent, varying actions may be performed. For example, '..%255c' represents '..\', so decoding '..%255c' to '..\' could leverage director-traversal attacks. Attackers may also be able to execute arbitrary commands.

Note that arbitrary commands will be run with the IUSR_machinename account privileges. An attacker exploiting this vulnerability may be able to gain access to the host with these privileges. The attacker may be able to gain further privileges and completely compromise the system from this point.

Reportedly, various encoding combinations under Windows 2000 Server and Professional may yield different outcomes.

Personal Web Server 1.0 and 3.0 are reported vulnerable to this issue.

The worm Nimda(and variants) actively exploit this vulnerability.

Affected Products:

  • Cisco Building Broadband Service Manager 5.0.0
  • Cisco Call Manager 1.0.0
  • Cisco Call Manager 2.0.0
  • Cisco Call Manager 3.0.0
  • Cisco ICS 7750 0.0.0
  • Cisco IP/VC 3540 Video Rate Matching Module 0.0.0
  • Cisco Unity Server 2.0.0
  • Cisco Unity Server 2.2.0
  • Cisco Unity Server 2.3.0
  • Cisco Unity Server 2.4.0
  • Cisco uOne 1.0.0
  • Cisco uOne 2.0.0
  • Cisco uOne 3.0.0
  • Cisco uOne 4.0.0
  • Microsoft BackOffice 4.0.0
  • Microsoft BackOffice 4.5.0
  • Microsoft IIS 3.0.0
  • Microsoft IIS 4.0.0
  • Microsoft IIS 5.0
  • Microsoft NT Option Pack for NT 4.0 0.0.0
  • Microsoft Personal Web Server 1.0.0
  • Microsoft Personal Web Server 3.0.0
  • Microsoft Windows 2000 Advanced Server
  • Microsoft Windows 2000 Professional
  • Microsoft Windows 2000 Server
  • Microsoft Windows 95
  • Microsoft Windows 98
  • Microsoft Windows NT 4.0 Option Pack
  • Microsoft Windows NT 4.0 SP6a
  • Microsoft Windows NT Enterprise Server 4.0 SP6a
  • Microsoft Windows NT Server 4.0 SP6a
  • Microsoft Windows NT Terminal Server 4.0 SP6a
  • Microsoft Windows NT Workstation 4.0 SP6a

References:

Juniper Networks provides this content via a wide variety of sources and production methods. If notified of errors or omissions in the content of this page, Juniper Networks, at its discretion, will modify or remove the page or leave the content as is, depending on various factors including but not limited to the reputation and authority of the party providing the notification. Please use the contact information displayed elsewhere on this page to report any errors or omissions regarding the content on this page.