Exploits for CVE-2015-2331 spotted in the Wild (Oct 02, 2015)
Integer overflow in the _zip_cdir_new function in zip_dirent.c in libzip, as used in the ZIP extension in PHP allows remote attackers to cause a denial of service (application crash) or possibly execute arbitrary code via a ZIP archive that contains many entries, leading to a heap-based buffer overflow (CVE-2015-2331)
The Zip file consists of many records. One of the sections of Zip64 record is “total number of entries in the central directory on this disk”. When PHP is used to open a ZIP archive, the “total number of entries in the central directory on this disk” is used to allocate the size of heap buffer. A large number in it will cause the buffer to overflow.
CVE-2015-2331 attacks have been spotted in the wild.
The binary has malicious bytes in the [total number of entries in the central directory on this disk ] section of the zip.
This causes the buffer overflow which is used to drop exe on the infected system and opens up a winrar dialog box.
The exe also makes registry entry
Dell SonicWALL Threat Research Team has researched this vulnerability and released following signature to protect their customers.
- IPS 10853 : PHP _zip_cdir_new Function Integer Overflow 1
- IPS 10854 : PHP _zip_cdir_new Function Integer Overflow 2