28 Jan, 2022

How Should New Generation Automobile Safety Tests Be Performed? [2]

Can-Utils veya SocketCAN

The most common protocol now used in cars, controller Area Network or CAN basics, we can now proceed to setup can-utils. Can-Utils A set of Linux-specific utilities that allow Linux to communicate with the CAN network in the vehicle. In this way, the car can spoof and sniff attacks and our own CAN packages.

otomobil güvenlik testi

 

What is Can-Utils?

CAN is a message-based network protocol designed for vehicles.

Step 1: installing can- utils.

Kali or other Debian based repositories, 

apt-get install can-utils  

 You can download and install it.

otomobil güvenlik testi

Basics of Can-Utils

CAN utilities are tools for working with in-vehicle CAN communications from the Linux operating system . These tools can be divided into several functional groups;

  • Essential tools for viewing, recording, generating and replaying CAN traffic

candump: Displays, filters and saves CAN data to files.

canplayer: Replay CAN log files.

cansend: send a single frame.

cangen: (random) Generate CAN traffic.

cansniffer: Displays CAN data content differences (11-bit CAN IDs only).

  • Access via IP sockets with Can

canlogserver: log CAN frames from a remote/local host.

bcmserver: interactive BCM configuration (remote/local).

socketcand: Use RAW/BCM/ISO-TP sockets via TCP/IP sockets.

  • CAN in-core gateway configuration

cangw: CAN gateway userspace tool for netlink configuration.

  • CAN bus measurement and testing

canbusload: Calculates and displays the CAN bus load.

can-calc-bit-timing: userspace version of in-core bitrate calculation.

canfdtest: Full duplex test program (DUT and host part).

  • ISO-TP tools for Linux ISO15765-2:2016

İsotpsend: send a single ISO-TP PDU.

isotprecv: Get ISO-TP PDUs.

isotpsniffer: ‘listen’ ISO-TP PDU( s ).

isotpdump: ‘listening’ and interpreting CAN messages (CAN_RAW).

isotpserver: IP server for simple TCP/IP ISO 15765-2 bridging (ASCII HEX).

isotpperf: ISO15765-2 protocol performance visualization.

isotptun: Create a bidirectional IP tunnel over CAN via ISO-TP.

  •  Log file converters

asc2log: Convert ASC log file to compact CAN frame log file.

log2asc: convert compact CAN frame log file to ASC log file. 

log2long: convert compact CAN frame representation to user readable.

  •  Serial Line Discipline configuration ( for slcan driver)

slcan_attach: user area tool for serial line CAN interface configuration.

slcand: daemon for serial line CAN interface configuration.

slcanpty: slcan creates a pty for applications using the ASCII protocol.  

Various hardware devices can be connected to the CAN network. If you cannot or will not purchase one of these hardware devices, you can always set up a virtual CAN network.

Setting up a Virtual CAN Network

vcan first (virtual CAN) install the module;

kali>  modprobe vcan

otomobil güvenlik testi

Then set up your virtual interface;

kali> ip link add dev can0 type vcan

otomobil güvenlik testi

kali > ip link set up vcan0

otomobil güvenlik testi

We are now ready to start working with CAN communication. Now we just need to connect our Linux operating system to the vehicle. There are numerous devices, tools, and connection types to do this.

otomobil güvenlik testiotomobil güvenlik testi


You can access other parts of this content series at the following links:


Disclaimer

Dear visitor,

This blog post is for information purposes and has been prepared with the aim of raising awareness against attacks and taking measures in this direction. We remind you that it is not legal to use the information in this article for any other purpose. We declare that CyberArts company cannot be held responsible for direct or indirect damages and losses that may arise from what is explained.

To request a quotation for the following: Cyber Security, Digital Transformation, MSSP, Penetration Testing, KVKK, GDPR, ISO 27001 and ISO 27701, please click here.

 

About Content:
Share on Social Media:
Facebook
Twitter
LinkedIn
Telegram