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/post/hardware/automotive/diagnostic_state.rb
Views: 11784
##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' => 'Diagnostic State',11'Description' => ' This module will keep the vehicle in a diagnostic state on rounds by sending tester present packet',12'License' => MSF_LICENSE,13'Author' => ['Jay Turla'],14'Platform' => ['hardware'],15'SessionTypes' => ['hwbridge'],16'Notes' => {17'Stability' => [CRASH_SAFE],18'SideEffects' => [PHYSICAL_EFFECTS],19'Reliability' => []20}21)22)23register_options([24OptString.new('ARBID', [false, 'CAN ID to perform Diagnostic State', '0x7DF']),25OptString.new('CANBUS', [false, 'CAN Bus to perform scan on, defaults to connected bus', nil]),26OptInt.new('ROUNDS', [true, 'Number of executed rounds', 500])27])28end2930def run31unless client.automotive32print_error('The hwbridge requires a functional automotive extention')33return34end35print_status('Putting the vehicle in a diagnostic state...')36print_status('In order to keep the vehicle in this state, you need to continuously send a packet to let the vehicle know that a diagnostic technician is present.')37datastore['ROUNDS'].times do38client.automotive.cansend(datastore['CANBUS'], datastore['ARBID'], '013E')39end40end4142end434445