Is there more information available on the ISS Security Alert "Multiple PHP Vulnerabilities - Remote Compromise Exploit"?
Technote #1434373 - Internet Scanner FlexCheck to Identify PHP Installations
INTERNET SECURITY SYSTEMS SECURITY ALERT
February 27, 2002
Multiple PHP Vulnerabilities: Remote Compromise Exploit in Circulation
ISS X-Force has learned of multiple buffer overflow vulnerabilities present in the PHP (Hypertext Preprocessor) scripting language. PHP is a popular server-side scripting language that is used heavily throughout the Internet. PHP is most commonly used in Apache Web server environments, but it is supported by all major Web servers and operating systems. X-Force has verified that a functional exploit for one of the vulnerabilities exists and may be actively circulating in the computer underground.
Netcraft reports that as of January 2002, there are over 20.8 million active Apache installations, which account for 57% of the sites surveyed. Secure Space reports that PHP is the most popular Apache module available and there are over 1.44 million active installations.
- PHP version 3.10-3.18
- PHP version 4.0.1-4.03pl1
- PHP version 4.0.2-4.05
- PHP version 4.0.6-4.0.7RC2
- PHP version 4.0.7RC3-4.1.1
The PHP 4.2.0-dev distribution is not vulnerable.
PHP supports file uploads via HTTP POST by any RFC-1867 compliant Web browser. This feature allows Web site visitors to upload files, scripting, or any type of content to the server, where it can then be stored, displayed, or operated upon, depending on the design of the server. This feature is considered a potential security risk and many security mechanisms have been added to PHP over time to limit its abuse.
Multiple buffer overflow vulnerabilities exist within the HTTP POST file upload functionality. To successfully exploit these vulnerabilities, attackers must upload a PHP form containing specially crafted MIME encoded data. In the exploit X-Force has analyzed, this data is passed in a buffer to a routine that locates the MIME boundary. A pointer is set to point to the end of the boundary, and then the "Content- disposition" header is parsed. A logic flaw in the parsing routine may cause PHP to miscalculate the remaining byte count within the allocated buffer. Under certain circumstances, this may lead to a one-byte overflow within the heap memory management data.
Heap overflows are inherently difficult to exploit because the nature of the memory heap is much more dynamic then that of the stack. The environment of the heap management system must be favorable to the attacker to successfully exploit this vulnerability. Web servers are constantly allocating more memory dynamically and are serving many clients at any given time. This environment is quite chaotic and decreases the chances of successful exploitation in real-world conditions.
X-Force has analyzed and tested a functional exploit. This exploit is believed to be circulating in the underground community and in use to a limited degree. It contains nine separate exploit vectors for versions of Debian and Red Hat Linux running various versions of Apache Web server and PHP. X-Force predicts newer versions of this exploit may support exploit vectors covering additional operating systems.
The exploit that X-Force has analyzed appears to be an early version, and is somewhat unreliable. X-Force has been able to compromise remote servers with this current exploit in a lab environment. Newer and more effective versions may be circulating as well. The maintainers of PHP have updated the PHP CVS source code repository to fix this vulnerability. X-Force recommends that Web site administrators upgrade to the latest versions available for their PHP distributions. PHP downloads are available at: http://www.php.net/downloads.php
The vulnerability associated with the exploit has been fixed in the file "php4/main/rfc1867.c". PHP4 administrators should verify that the revision of this file is 22.214.171.124 or higher. The latest PHP version 4.1.2 packages contain the patched version of "rfc1867.c".
As a workaround, the file upload support can be disabled on Web servers running PHP 4.0.3 or above. Open the php.ini file and modify the line file_uploads = On to file_uploads = Off. After modifying the php.ini file, the Web server must be restarted if PHP is running as module.
An X-Press Update for RealSecure Network Sensor will be available soon to provide detection support for these vulnerabilities. An Internet Scanner Flex Check will be released today to find vulnerable versions of PHP. These updates will be available at the ISS Download Center at: http://www.iss.net/download
PHP Downloads, http://www.php.net/downloads.php
Apache Module Report, http://www.securityspace.com/s_survey/data/man.200201/apachemods.html
ISS would like to thank Snort for providing the exploit for this vulnerability.
If the above information does not resolve your issue, please contact IBM Security Systems Technical Support.
|Security||Proventia Web Filter||IBM Security Virtual Server Protection for Vmware|
General Security Information
Proventia Web Filter
Proventia Filter Reporter
IBM Proventia Network IDS - A
IBM Proventia Network IPS - G
IBM Proventia Network MFS - M
Proventia Mail Filter
RealSecure Server Sensor
RealSecure Network Sensor
SiteProtector Security Fusion Module
SiteProtector Event Collector
Proventia Server - Windows
Proventia Network ADS
Proventia Server - Linux
Proventia Network Mail Security
Proventia for Crossbeam
Lotus Protector for Mail Security
Lotus Protector Mail
Proventia Network Security Controller
Proventia Network IPS Virtual Appliance
Proventia Web Protection
Proventia Endpoint Secure Control
Proventia Network Active Bypass
Virtual Server Security for VMware
Proventia Server for VMWare