This shows you the differences between two versions of the page.
|
rasb:lab:01 [2026/06/22 01:27] ciprian.popescu0411 |
rasb:lab:01 [2026/06/22 19:13] (current) ciprian.popescu0411 [Exercise 3: Kinetic Cyberattack via Digital Twin] |
||
|---|---|---|---|
| Line 40: | Line 40: | ||
| ==== Exercise 2: CAN Traffic Decoding ==== | ==== Exercise 2: CAN Traffic Decoding ==== | ||
| - | **Objective:** Parse and interpret raw CAN traffic using a pre-captured dataset. | + | **Objective:** Parse and interpret raw CAN traffic using pre-captured traffic. |
| You are provided with a CSV file containing CAN traffic. This data was extracted from the testbed's internal logic pins using a Kingst LA2016 high-speed logic analyzer. | You are provided with a CSV file containing CAN traffic. This data was extracted from the testbed's internal logic pins using a Kingst LA2016 high-speed logic analyzer. | ||
| Line 47: | Line 47: | ||
| Write a Python script to read the CSV file, extract the CAN IDs and data payloads, and translate them into actions using the provided ''CAN_ID.json'' dictionary. | Write a Python script to read the CSV file, extract the CAN IDs and data payloads, and translate them into actions using the provided ''CAN_ID.json'' dictionary. | ||
| - | **Implementation Guide:** | + | {{:rasb:lab:lab1_skel.zip|Download the starting code from here}} |
| - | * **File Parsing:** Use Python's ''csv'' module to read the dataset. | + | |
| - | * **Data Formatting:** Convert hexadecimal strings (e.g., ''"0x1B8"'') using ''int(value, 16)'' if necessary to match the JSON keys. | + | |
| - | * **Load JSON:** Use the ''json'' library to load ''CAN_ID.json'', which contains ''can_id'', ''type'', and ''data'' fields. | + | |
| - | * **Logic:** For each row, extract the CAN ID, look it up in the JSON dictionary, and print the Timestamp, Action Name, and raw payload. | + | |
| - | + | ||
| - | **Expected Outcome:** | + | |
| - | A terminal output displaying a chronological log of vehicle events. | + | |
| ==== Exercise 3: Kinetic Cyberattack via Digital Twin ==== | ==== Exercise 3: Kinetic Cyberattack via Digital Twin ==== | ||
| - | **Objective:** Execute a spoofing attack on the CAN bus and observe the kinetic impact in CARLA. | + | **Objective:** Execute an injection attack on the digital twin and observe the kinetic impact in CARLA. |
| The CAN protocol uses a broadcast mechanism without source authentication. | The CAN protocol uses a broadcast mechanism without source authentication. | ||
| **Task:** | **Task:** | ||
| - | Execute a Deterministic Frame Spoofing Attack. Inject a falsified message masquerading as a legitimate ECU (e.g., imitating the Chassis module to send a Powertrain command). | + | Inject a falsified message masquerading as a legitimate ECU (e.g., imitating the Chassis module to send a Powertrain command), causing the simulated vehicle to accelerate to 100% throttle and steer fully to the left. |
| **Steps:** | **Steps:** | ||
| * **Target Identification:** Use ''CAN_ID.json'' to find the CAN ID for the accelerator or brake pedal. | * **Target Identification:** Use ''CAN_ID.json'' to find the CAN ID for the accelerator or brake pedal. | ||
| - | * **Craft Payload:** Use the PyQt5 GUI / CAN-Simulator Bridge to construct a JSON payload with the target ''can_id'' and a modified ''data'' value (e.g., full braking). | + | * **Craft Payload:** Use the PyQt5 GUI / CAN-Simulator Bridge to construct a JSON payload with the target ''can_id'' and a modified ''data'' value. |
| - | * **Inject:** Run the injection script. | + | * **Inject:** Run the injection script as shown by the instructor. |
| **Questions & Observations:** | **Questions & Observations:** | ||
| * **Simulator Impact:** Observe the virtual car's reaction in CARLA. | * **Simulator Impact:** Observe the virtual car's reaction in CARLA. | ||
| - | * **Hardware Conflict:** Look for erratic behavior on the physical dashboard displays caused by the race condition on the bus. | ||
| * **Defense Mechanisms:** Consider how an Intrusion Detection System (IDS) could detect this based on message frequency and timing constraints. | * **Defense Mechanisms:** Consider how an Intrusion Detection System (IDS) could detect this based on message frequency and timing constraints. | ||
| + | |||
| + | [[https://github.com/ResearchYou/GUI-FOR-CARLA|CAN Bridge]] | ||
| + | |||
| + | [[https://tiny.carla.org/carla-0-9-11-windows|CARLA Simulator]] | ||