Research Article
Vehicular Multilevel Data Arrangement-Based Intrusion Detection System for In-Vehicle CAN
Algorithm 1
Algorithm for intrusion detection.
(1) | Input: | | cas_map: the data arrangement order for MLDA compression. | | threshold: maximum value of the degree of variation in normal state. | | limit_changes: maximum acceptable limit of abnormal data frames in normal state. | (2) | Initialize: | | prev_msg ← 0 | | attack_cnt ← 0 | (3) | while message with ID arrives do | (4) | xor_msg ← prev_msg ^ message | (5) | comp_msg ← compress_with_v_mlda(xor_msg, cas_map) | (6) | degree ← (bit_length(comp_msg)/bit_length(message)) ∗ 100. | (7) | if degree > threshold then | (8) | attack_cnt ← attack_cnt +1 | (9) | else | (10) | attack_cnt ← 0 | (11) | if attack_cnt > limit_changes then | (12) | notify_attack() | (13) | prev_msg ← message |
|