Lab

Build your first ICSim lab

The simplest way to practise car hacking, with no car and no risk: a dashboard simulator that reacts to a real CAN bus. You install it, launch it, and run your first attack.

Why ICSim

ICSim, for Instrument Cluster Simulator, is a dashboard simulator written by Craig Smith, the author of the Car Hacker's Handbook. It shows a speed, turn signals and door locks, listens to a CAN bus, and reacts to real frames the way a car's instrument cluster would.

  • Free and open source, it runs entirely in memory: no car, no hardware.
  • It is real software reacting to real frames, not a scripted animation.
  • The method is exactly that of a real vehicle: read, isolate, decode, inject.
  • You can randomise the identifiers to turn each session into a genuine exercise.

What you need

A Linux system, native or in a virtual machine. Three things to install: the SDL2 graphics library, the build tools (git, make), and can-utils to watch the bus.

Install ICSim

Dependencies, download and build
# dependencies (Debian, Ubuntu)
sudo apt-get install can-utils libsdl2-dev libsdl2-image-dev git build-essential

# clone and build
git clone https://github.com/zombieCraig/ICSim
cd ICSim && make

Launch the simulator

ICSim ships a script that creates the virtual bus vcan0, then two programs: the dashboard and the controls. You run them in two windows.

Prepare the bus and launch both programs
# create the bundled virtual bus
./setup_vcan.sh

# window 1, the dashboard
./icsim vcan0

# window 2, the controls
./controls vcan0

The controls window is your car: the arrow keys accelerate and work the turn signals, and Shift combinations open and close the doors. It emits the real frames, and icsim displays them. Click inside the controls window first so it receives the keyboard.

Up arrow
Accelerates: the speed needle rises.
Left and right arrows
Left and right turn signals.
Shift combinations
Lock and unlock the doors. The exact combinations are listed in the ICSim README.

Your first attack

Now the method. Goal: find the frame that drives the speed, then forge it to display a speed without touching the accelerator.

  1. In a terminal, run cansniffer vcan0: it groups frames by identifier and colours the bytes that change.
  2. In the controls window, accelerate. One line stirs in cansniffer: that is the speed frame. Note its identifier and the bytes that move.
  3. Release the accelerator: the bytes freeze. You now have the identifier and the position of the signal.
  4. Forge the frame with the value you want: cansend vcan0 identifier#bytes. The icsim needle climbs, even though the controls window sent nothing.

Raising the difficulty

By default the identifiers are always the same, and you end up knowing them by heart. ICSim can randomise them from a seed, forcing you to truly reverse engineer every session.

Randomise the identifiers
# icsim picks a random seed and prints it
./icsim -r vcan0

# controls must use the same seed
./controls -s SEED vcan0

With a different seed on each launch, no memory helps you: you must find each signal through the method. It is the training that comes closest to an unknown vehicle.

What next

Once the method is second nature on the simulator, there are two directions: deepen the tools, or move to hardware.

Frequently asked questions

What is ICSim?
A dashboard simulator (Instrument Cluster Simulator) created by Craig Smith. It reacts to a CAN bus the way a car's real instrument cluster would, which makes it a free, risk-free training ground.
Do you need a car or hardware?
No. Everything runs on a virtual CAN bus in memory, on your Linux machine. No vehicle, no adapter.
Does ICSim work on Mac or Windows?
It needs SocketCAN, which is Linux-specific. On Mac or Windows, run it in a Linux virtual machine, or through WSL2 on Windows.
Why do the identifiers change from one session to the next?
With the randomisation option, ICSim changes the CAN identifiers on each launch. It is deliberate: it forces you to find the signals through the method rather than memorise them.
Does it really resemble a real car?
The method is identical: read the bus, isolate a signal, decode it, inject it. A real vehicle adds noise, far more frames and protections, but the basic move is learned in full here.