Setup the Instrument Cluster Simulator (ICSIM) in Kali
- Author: Dr. Jim Marquardson (jimarqua@nmu.edu)
- Updated 2024-06-11
The Instrument Cluster Simulator (ICSim) is a tool for learning how to work with sensors and controllers. In this exercise, you will install ICSim and related tools.
Learning Objectives
In this exercise, you will:
- update Kali Linux's software,
- download source code from GitHub,
- compile programs in Linux.
Prerequisites
To complete this exercise, you will need:
- Kali Linux, and
- internet access.
Update Software
- Start your Kali VM.
- Launch the terminal.
- As you run the following commands, remember that Linux is case-sensitive. Many of the commands are lower-case, but there are some capital letters that must be typed exactly as written here.
- Ensure that Kali has the latest list of available software. If prompted, enter the Kali password.
sudo apt update
- Install the software required by ICSim. Enter
y
when prompted if you want to install the software.
sudo apt install libsdl2-dev libsdl2-image-dev can-utils
- Ensure that you are in your home directory.
cd ~
- Download two different software repositories from GitHub--ICSim and the CAN Utils. These commands will create two new directories in your home directory. If you are prompted for a password, there is a typo in your command.
git clone https://github.com/zombieCraig/ICSim.git
git clone https://github.com/linux-can/can-utils
- Navigate to the newly created
can-utils
directory.
cd can-utils
Note that your Kali prompt should look like:
--(kali@kali)-[~/can-utils]
- Compile the program using the
make
command.
make
- Install the can-utils program on the system.
sudo make install
At this point, can-utils is ready. Next, you will complete the ICSim setup.
- Copy the necessary library (i.e., a package of code) to the ICSim directory.
cp lib.o ~/ICSim
- Change directories to the ICSim directory in your home directory.
cd ~/ICSim
Note that your Kali prompt should look like:
--(kali@kali)-[~/ICSim]
- Compile ICSim using
make
.
make clean
make
Verification
- Run the following command to verify that can-utils is installed.
candump -?
You should see the help documentation.
(kali@kali)-[~/ICSim]
$ candump -?
candump - dump CAN bus traffic.
Usage: candump [options] <CAN interface>+
(use CTRL-C to terminate candump)
- Run the following to verify that ICSim is installed. Notice that the command starts with
./
.
./icsim
(kali@kali)-[~/ICSim]
$ ./icsim
You must specify at least one can device
Usage: icsim [options] <can>
-r randomize IDs
-s seed value
-d debug mode
-m model NAME (Ex: -m bmw)
Note that because can-utils was installed on the system, its commands can be run from any directory. But, ICSim tools must be run in the ~/ICSim
directory.
Challenge
- Close the terminal.
- Launch a new terminal.
- Run
candump -?
. Note that you can now runcandump
in any working directory in your terminal. - Change directories to the ICSim directory.
- Run
icsim
to show the documentation. Note that your working directory must be/home/kali/ICSim
to run theicsim
program.
Reflection
- How does the software installation process here differ from other computers you've used?
- What is compiling?
- What are some different ways that programmers distribute their applications?