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/scanner/ipmi/ipmi_cipher_zero.rb
Views: 11784
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##456class MetasploitModule < Msf::Auxiliary7include Msf::Auxiliary::Report8include Msf::Auxiliary::UDPScanner910def initialize11super(12'Name' => 'IPMI 2.0 Cipher Zero Authentication Bypass Scanner',13'Description' => %q|14This module identifies IPMI 2.0-compatible systems that are vulnerable15to an authentication bypass vulnerability through the use of cipher16zero.17|,18'Author' => [ 'Dan Farmer <zen[at]fish2.com>', 'hdm' ],19'License' => MSF_LICENSE,20'References' =>21[22['CVE', '2013-4782'],23['URL', 'http://fish2.com/ipmi/cipherzero.html'],24['OSVDB', '93038'],25['OSVDB', '93039'],26['OSVDB', '93040'],2728],29'DisclosureDate' => 'Jun 20 2013'30)3132register_options(33[34Opt::RPORT(623)35])3637end3839def scanner_prescan(batch)40print_status("Sending IPMI requests to #{batch[0]}->#{batch[-1]} (#{batch.length} hosts)")41@res = {}42end4344def scan_host(ip)45console_session_id = Rex::Text.rand_text(4)46scanner_send(47Rex::Proto::IPMI::Utils.create_ipmi_session_open_cipher_zero_request(console_session_id),48ip, datastore['RPORT']49)50end5152def scanner_process(data, shost, sport)53info = Rex::Proto::IPMI::Open_Session_Reply.new.read(data)# rescue nil54return unless info && info.session_payload_type == Rex::Proto::IPMI::PAYLOAD_RMCPPLUSOPEN_REP5556# Ignore duplicate replies57return if @res[shost]5859@res[shost] ||= info6061if info.error_code == 062print_good("#{shost}:#{sport} - IPMI - VULNERABLE: Accepted a session open request for cipher zero")63report_vuln(64:host => shost,65:port => datastore['RPORT'].to_i,66:proto => 'udp',67:sname => 'ipmi',68:name => 'IPMI 2.0 RAKP Cipher Zero Authentication Bypass',69:info => "Accepted a session open request for cipher zero",70:refs => self.references71)72else73vprint_status("#{shost}:#{sport} - IPMI - NOT VULNERABLE: Rejected cipher zero with error code #{info.error_code}")74end75end76end777879